Browse Source

调整

master
xzt 1 month ago
parent
commit
1fbb9dad81
  1. 53
      jwtech-admin-page/src/api/build/fundPayRuls.js
  2. 53
      jwtech-admin-page/src/api/build/investCompleteWarning.js
  3. 425
      jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/buildInfo.vue
  4. 467
      jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/buildSetting.vue
  5. 3
      jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/index.vue
  6. 587
      jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/list.vue
  7. 42
      jwtech-admin-page/src/views/building/projectInfo/costChangeWarning/costInfo.vue
  8. 9
      jwtech-admin-page/src/views/building/projectInfo/costChangeWarning/list.vue
  9. 466
      jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/fundInfo.vue
  10. 512
      jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/fundSetting.vue
  11. 11
      jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/index.vue
  12. 576
      jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/list.vue
  13. 351
      jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/info.vue
  14. 197
      jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/list.vue
  15. 393
      jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/setting.vue
  16. 114
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiConstProRuleController.java
  17. 93
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiConstProRule.java
  18. 16
      jwtech-system/src/main/java/com/kms/build/mapper/BsSgcJsjdBuiConstProRuleMapper.java
  19. 17
      jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiConstProRuleService.java

53
jwtech-admin-page/src/api/build/fundPayRuls.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询建设进度预警管理列表
export function listFundPayRuls(query) {
return request({
url: '/build/fundPayRuls/list',
method: 'post',
data: query
})
}
// 查询建设进度预警管理详细
export function getFundPayRuls(id) {
return request({
url: '/build/fundPayRuls/' + id,
method: 'get'
})
}
// 新增建设进度预警管理
export function addFundPayRuls(data) {
return request({
url: '/build/fundPayRuls',
method: 'post',
data: data
})
}
// 修改建设进度预警管理
export function updateFundPayRuls(data) {
return request({
url: '/build/fundPayRuls',
method: 'put',
data: data
})
}
// 删除建设进度预警管理
export function delFundPayRuls(id) {
return request({
url: '/build/fundPayRuls/' + id,
method: 'delete'
})
}
// 导出建设进度预警管理
export function exportFundPayRuls(query) {
return request({
url: '/build/fundPayRuls/export',
method: 'get',
params: query
})
}

53
jwtech-admin-page/src/api/build/investCompleteWarning.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询投资完成预警管理列表
export function listInvestCompleteWarning(query) {
return request({
url: '/build/investCompleteWarning/list',
method: 'post',
data: query
})
}
// 查询投资完成预警管理详细
export function getInvestCompleteWarning(id) {
return request({
url: '/build/investCompleteWarning/' + id,
method: 'get'
})
}
// 新增投资完成预警管理
export function addInvestCompleteWarning(data) {
return request({
url: '/build/investCompleteWarning',
method: 'post',
data: data
})
}
// 修改投资完成预警管理
export function updateInvestCompleteWarning(data) {
return request({
url: '/build/investCompleteWarning',
method: 'put',
data: data
})
}
// 删除投资完成预警管理
export function delInvestCompleteWarning(id) {
return request({
url: '/build/investCompleteWarning/' + id,
method: 'delete'
})
}
// 导出投资完成预警管理
export function exportInvestCompleteWarning(query) {
return request({
url: '/build/investCompleteWarning/export',
method: 'get',
params: query
})
}

425
jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/buildInfo.vue

@ -0,0 +1,425 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="预警描述" prop="ruleMsg">
<el-input
v-model="queryParams.data.ruleMsg"
placeholder="请输入预警描述"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="fundPayRulsList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120"/>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120"/>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120"/>
<el-table-column label="预警类型" align="center" prop="warnType" :formatter="typeFormat" min-width="120"/>
<el-table-column label="条件" align="center" prop="warnCondition" min-width="120"/>
<el-table-column label="判断符号" align="center" prop="judgeSymbol" min-width="120"/>
<el-table-column label="阈值" align="center" prop="threshold" min-width="120"/>
<el-table-column label="惩罚措施" align="center" prop="measures" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:fundPayRuls:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:fundPayRuls: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="预警类型" prop="warnType">
<el-select v-model="form.warnType" placeholder="请选择预警类型" style="width: 100%">
<el-option
v-for="dict in warningTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="条件" prop="warnCondition">
<el-input v-model="form.warnCondition" placeholder="请输入条件" />
</el-form-item>
<el-form-item label="判断符号" prop="judgeSymbol">
<el-input v-model="form.judgeSymbol" placeholder="请输入判断符号" />
</el-form-item>
<el-form-item label="阈值" prop="threshold">
<el-input v-model="form.threshold" placeholder="请输入阈值" />
</el-form-item>
<el-form-item label="惩罚措施" prop="measures">
<el-input v-model="form.measures" placeholder="请输入惩罚措施" />
</el-form-item>
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" type="textarea" :rows="5" 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 { listFundPayRuls, getFundPayRuls, delFundPayRuls, addFundPayRuls, updateFundPayRuls, exportFundPayRuls } from "@/api/build/fundPayRuls";
export default {
name: "FundPayRuls",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
fundPayRulsList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: '1'
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
warnType: [
{
required: true,
message: "请选择预警类型",
trigger: "change",
}
],
warnCondition: [
{
required: true,
message: "请输入条件",
trigger: "blur",
}
],
judgeSymbol: [
{
required: true,
message: "请输入判断符号",
trigger: "blur",
}
],
threshold: [
{
required: true,
message: "请输入阈值",
trigger: "blur",
}
],
measures: [
{
required: true,
message: "请输入惩罚措施",
trigger: "blur",
}
],
dateNode: [
{
required: true,
message: "请输入时间节点",
trigger: "change",
}
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
},
warningTypeOptions: []
};
},
created() {
this.getList()
this.getDictList()
},
methods: {
/** 查询建设进度预警管理列表 */
getList() {
this.loading = true;
listFundPayRuls(this.queryParams).then(response => {
this.fundPayRulsList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("warning_type").then((response) => {
this.warningTypeOptions = response.data;
})
},
typeFormat(row, column) {
return this.selectDictLabel(this.warningTypeOptions, row.warnType);
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "1"
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "1"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getFundPayRuls(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) {
updateFundPayRuls(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addFundPayRuls(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFundPayRuls(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportFundPayRuls(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

467
jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/buildSetting.vue

@ -0,0 +1,467 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="预警描述" prop="ruleMsg">
<el-input
v-model="queryParams.data.ruleMsg"
placeholder="请输入预警描述"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:fundPayRuls:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:fundPayRuls:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:fundPayRuls:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:fundPayRuls:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="fundPayRulsList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120"/>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120"/>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120"/>
<el-table-column label="预警类型" align="center" prop="warnType" :formatter="typeFormat" min-width="120"/>
<el-table-column label="条件" align="center" prop="warnCondition" min-width="120"/>
<el-table-column label="判断符号" align="center" prop="judgeSymbol" min-width="120"/>
<el-table-column label="阈值" align="center" prop="threshold" min-width="120"/>
<el-table-column label="惩罚措施" align="center" prop="measures" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:fundPayRuls:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:fundPayRuls: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="预警类型" prop="warnType">
<el-select v-model="form.warnType" placeholder="请选择预警类型" style="width: 100%">
<el-option
v-for="dict in warningTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="条件" prop="warnCondition">
<el-input v-model="form.warnCondition" placeholder="请输入条件" />
</el-form-item>
<el-form-item label="判断符号" prop="judgeSymbol">
<el-input v-model="form.judgeSymbol" placeholder="请输入判断符号" />
</el-form-item>
<el-form-item label="阈值" prop="threshold">
<el-input v-model="form.threshold" placeholder="请输入阈值" />
</el-form-item>
<el-form-item label="惩罚措施" prop="measures">
<el-input v-model="form.measures" placeholder="请输入惩罚措施" />
</el-form-item>
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" type="textarea" :rows="5" 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 { listFundPayRuls, getFundPayRuls, delFundPayRuls, addFundPayRuls, updateFundPayRuls, exportFundPayRuls } from "@/api/build/fundPayRuls";
export default {
name: "FundPayRuls",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
fundPayRulsList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
warnType: [
{
required: true,
message: "请选择预警类型",
trigger: "change",
}
],
warnCondition: [
{
required: true,
message: "请输入条件",
trigger: "blur",
}
],
judgeSymbol: [
{
required: true,
message: "请输入判断符号",
trigger: "blur",
}
],
threshold: [
{
required: true,
message: "请输入阈值",
trigger: "blur",
}
],
measures: [
{
required: true,
message: "请输入惩罚措施",
trigger: "blur",
}
],
dateNode: [
{
required: true,
message: "请输入时间节点",
trigger: "change",
}
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
},
warningTypeOptions: []
};
},
created() {
this.getList()
this.getDictList()
},
methods: {
/** 查询建设进度预警管理列表 */
getList() {
this.loading = true;
listFundPayRuls(this.queryParams).then(response => {
this.fundPayRulsList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("warning_type").then((response) => {
this.warningTypeOptions = response.data;
})
},
typeFormat(row, column) {
return this.selectDictLabel(this.warningTypeOptions, row.warnType);
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
warnType: null,
warnCondition: null,
judgeSymbol: null,
threshold: null,
measures: null,
ruleMsg: null,
dateNode: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getFundPayRuls(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) {
updateFundPayRuls(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addFundPayRuls(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFundPayRuls(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportFundPayRuls(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

3
jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/index.vue

@ -187,7 +187,7 @@
icon="el-icon-view"
@click="handleToList('3', scope.row)"
v-hasPermi="['build:xmgcgl:edit']"
>建设进度</el-button
>进度填报</el-button
>
</template>
</el-table-column>
@ -2280,7 +2280,6 @@ export default {
},
handleToList (tabNum, row) {
this.$router.push({
// path: "/project/special/options",
path: "/building/build/buildProgressWarning-list",
query: {
baseDataId: row.id,

587
jwtech-admin-page/src/views/building/projectInfo/buildProgressWarning/list.vue

@ -1,619 +1,74 @@
<template>
<div class="app-container">
<div style="font-size: 24px;margin-bottom: 16px;">{{ formData.projectName }}</div>
<el-tabs v-model="activeName" style="margin-bottom: 20px">
<el-tab-pane
label="设置规则"
name="regular"
label="预警配置"
name="one"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="cyan" 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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:warningRule:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:warningRule:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:warningRule:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule: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"
/>
<build-setting :projectInfo="formData" />
</el-tab-pane>
<el-tab-pane
label="查看预警"
name="warning"
label="预警信息"
name="two"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.data.status" placeholder="请选择状态" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="cyan" 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-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule: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"
/>
<build-info :projectInfo="formData" />
</el-tab-pane>
<el-tab-pane
label="建设进度"
name="build"
label="进度填报"
name="three"
>
<build-proccess :projectInfo="formData" />
<build-progress :projectInfo="formData" />
</el-tab-pane>
</el-tabs>
<!-- 添加或修改进度填报预警管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="进度要求" prop="scheduleReq">
<el-input v-model="form.scheduleReq" placeholder="请输入进度要求" />
</el-form-item>
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="年度" prop="conYear">
<el-select
v-model="form.conYear"
placeholder="请选择年度"
clearable
style="width: 100%;"
>
<el-option
v-for="dict in yearOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="约束条件" prop="conRule">
<el-select
v-model="form.conRule"
placeholder="请选择约束条件"
clearable
style="width: 100%;"
>
<el-option
v-for="dict in constraintOption"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input type="textarea" :rows="5" v-model="form.ruleMsg" 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 { listWarningRule, getWarningRule, delWarningRule, addWarningRule, updateWarningRule, exportWarningRule } from "@/api/build/warningRule";
import {
listInfo,
getInfo,
delInfo,
addInfo,
updateInfo,
exportInfo,
} from "@/api/build/projectInfo";
import BuildProccess from './progress.vue'
import { getInfo } from "@/api/build/projectInfo";
import BuildSetting from './buildSetting.vue'
import BuildInfo from './buildInfo.vue'
import BuildProgress from './progress.vue'
export default {
name: "WarningRule",
components: { BuildProccess },
components: { BuildSetting, BuildInfo, BuildProgress },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
warningRuleList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
scheduleReq: [
{
required: true,
message: "请输入进度要求",
trigger: "blur",
},
],
dateNode: [
{
required: true,
message: "请输入时间节点",
trigger: "change",
},
],
conYear: [
{
required: true,
message: "请输入年度",
trigger: "change",
},
],
conRule: [
{
required: true,
message: "请输入约束条件",
trigger: "change",
},
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
},
],
},
activeName: 'regular',
formData: {},
yearOptions: [],
constraintOption: []
activeName: 'one',
formData: {}
}
},
watch: {
activeName(newVal) {
if (newVal === 'warning') {
this.queryParams.data.status = 1
} else {
this.queryParams.data.status = null
}
this.getList()
}
},
created() {
this.getDictList()
this.queryParams.data.proNo = this.$route.query.proNo
this.handleJudgeTab()
this.getProjectInfo()
this.getList();
},
methods: {
//
getProjectInfo() {
getInfo(this.$route.query.baseDataId).then((response) => {
this.formData = response.data;
console.log(this.formData)
// console.log(999, this.formData);
// listBidInfo(this.queryParams).then((response) => {
// console.log(response);
// // this.formData = response.records[0];
// });
});
},
/** 查询进度填报预警管理列表 */
getList() {
this.loading = true;
listWarningRule(this.queryParams).then(response => {
this.warningRuleList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("sl_year").then((response) => {
this.yearOptions = response.data;
})
this.getDicts("sl_constraint").then((response) => {
this.constraintOption = response.data;
})
},
//
yearFormat(row, column) {
return this.selectDictLabel(this.yearOptions, row.conYear);
},
//
constraintFormat(row, column) {
return this.selectDictLabel(this.constraintOption, row.conRule);
},
handleJudgeTab() {
let tabNum = this.$route.query.tabNum
if (tabNum === '1') {
this.queryParams.data.status = null
this.activeName = 'regular'
this.activeName = 'one'
} else if (tabNum === '2') {
this.queryParams.data.status = 1
this.activeName = 'warning'
} else {
this.activeName = 'build'
this.activeName = 'two'
} else if (tabNum === '3') {
this.activeName = 'three'
}
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getWarningRule(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) {
updateWarningRule(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.formData.projectName
this.form.proCode = this.formData.proCode
this.form.proNo = this.formData.proNo
addWarningRule(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delWarningRule(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportWarningRule(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
@import "@/assets/css/dialog.scss";
</style>

42
jwtech-admin-page/src/views/building/projectInfo/costChangeWarning/costInfo.vue

@ -23,48 +23,6 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:costChangeWarning:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:costChangeWarning:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:costChangeWarning:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:costChangeWarning:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="costChangeWarningList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>

9
jwtech-admin-page/src/views/building/projectInfo/costChangeWarning/list.vue

@ -27,7 +27,7 @@ export default {
components: { CostSetting, CostInfo },
data() {
return {
activeName: 'regular',
activeName: 'one',
formData: {}
}
},
@ -61,10 +61,5 @@ export default {
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
@import "@/assets/css/dialog.scss";
</style>

466
jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/fundInfo.vue

@ -0,0 +1,466 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="原因" prop="reason">
<el-input
v-model="queryParams.data.reason"
placeholder="请输入原因"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="fundPayWarningList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="支付时间范围" align="center" prop="payDateRange" min-width="120"/>
<el-table-column label="支付金额" align="center" prop="payAmount" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="说明情况" align="center" prop="describe" min-width="120"/>
<el-table-column label="原因" align="center" prop="reason" min-width="120"/>
<el-table-column label="状态" align="center" prop="status" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:fundPayWarning:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:fundPayWarning: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="支付时间范围" prop="payDateRange">
<!-- <el-input v-model="form.payDateRange" placeholder="请输入支付时间范围" /> -->
<el-date-picker
v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%;">
</el-date-picker>
</el-form-item>
<el-form-item label="支付金额" prop="payAmount">
<el-input v-model="form.payAmount" placeholder="请输入支付金额" />
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" placeholder="请输入预警描述" />
</el-form-item>
<el-form-item label="说明情况" prop="describe">
<el-input v-model="form.describe" placeholder="请输入说明情况" />
</el-form-item>
<el-form-item label="原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入原因" />
</el-form-item>
<el-form-item label="预警状态" prop="status">
<el-select v-model="form.status" placeholder="请选择预警状态" style="width: 100%">
<el-option
v-for="dict in warningStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="处置状态" prop="handle">
<el-select v-model="form.handle" placeholder="请选择处置状态" style="width: 100%">
<el-option
v-for="dict in handleStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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 { listFundPayWarning, getFundPayWarning, delFundPayWarning, addFundPayWarning, updateFundPayWarning, exportFundPayWarning } from "@/api/build/fundPayWarning";
import {
getInfo
} from "@/api/build/projectInfo";
export default {
name: "FundPayWarning",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
fundPayWarningList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: '1',
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
// payDateRange: [
// {
// required: true,
// message: "",
// trigger: "change",
// }
// ],
payAmount: [
{
required: true,
message: "请输入支付金额",
trigger: "blur",
}
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
describe: [
{
required: true,
message: "请输入说明情况",
trigger: "blur",
}
],
reason: [
{
required: true,
message: "请输入说明情况",
trigger: "blur",
}
],
status: [
{
required: true,
message: "请选择预警状态",
trigger: "change",
}
],
handle: [
{
required: true,
message: "请选择处置状态",
trigger: "change",
}
],
},
formData: {},
handleStatusOptions: [],
warningStatusOptions: [],
timeRange: []
};
},
watch: {
timeRange(newVal) {
if (newVal) {
this.form.payDateRange = newVal.join(',')
} else {
this.form.payDateRange = null
}
console.log(newVal)
}
},
created() {
this.queryParams.data.proNo = this.$route.query.proNo
this.getDictList()
this.getList()
this.getProjectInfo()
},
methods: {
//
getProjectInfo() {
getInfo(this.$route.query.baseDataId).then((response) => {
this.formData = response.data
});
},
/** 查询资金支付预警管理列表 */
getList() {
this.loading = true;
listFundPayWarning(this.queryParams).then(response => {
this.fundPayWarningList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("warning_status").then((response) => {
this.warningStatusOptions = response.data;
})
this.getDicts("handle_status").then((response) => {
this.handleStatusOptions = response.data;
})
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: '1',
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: "1",
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getFundPayWarning(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) {
updateFundPayWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addFundPayWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFundPayWarning(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportFundPayWarning(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

512
jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/fundSetting.vue

@ -0,0 +1,512 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="原因" prop="reason">
<el-input
v-model="queryParams.data.reason"
placeholder="请输入原因"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:fundPayWarning:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:fundPayWarning:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:fundPayWarning:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:fundPayWarning:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="fundPayWarningList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="支付时间范围" align="center" prop="payDateRange" min-width="120"/>
<el-table-column label="支付金额" align="center" prop="payAmount" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="说明情况" align="center" prop="describe" min-width="120"/>
<el-table-column label="原因" align="center" prop="reason" min-width="120"/>
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:fundPayWarning:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:fundPayWarning: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="支付时间范围" prop="payDateRange">
<!-- <el-input v-model="form.payDateRange" placeholder="请输入支付时间范围" /> -->
<el-date-picker
v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%;">
</el-date-picker>
</el-form-item>
<el-form-item label="支付金额" prop="payAmount">
<el-input v-model="form.payAmount" placeholder="请输入支付金额" />
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" placeholder="请输入预警描述" />
</el-form-item>
<el-form-item label="说明情况" prop="describe">
<el-input v-model="form.describe" placeholder="请输入说明情况" />
</el-form-item>
<el-form-item label="原因" prop="reason">
<el-input v-model="form.reason" placeholder="请输入原因" />
</el-form-item>
<el-form-item label="预警状态" prop="status">
<el-select v-model="form.status" placeholder="请选择预警状态" style="width: 100%">
<el-option
v-for="dict in warningStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="处置状态" prop="handle">
<el-select v-model="form.handle" placeholder="请选择处置状态" style="width: 100%">
<el-option
v-for="dict in handleStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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 { listFundPayWarning, getFundPayWarning, delFundPayWarning, addFundPayWarning, updateFundPayWarning, exportFundPayWarning } from "@/api/build/fundPayWarning";
import {
getInfo
} from "@/api/build/projectInfo";
export default {
name: "FundPayWarning",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
fundPayWarningList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: null,
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
// payDateRange: [
// {
// required: true,
// message: "",
// trigger: "change",
// }
// ],
payAmount: [
{
required: true,
message: "请输入支付金额",
trigger: "blur",
}
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
describe: [
{
required: true,
message: "请输入说明情况",
trigger: "blur",
}
],
reason: [
{
required: true,
message: "请输入说明情况",
trigger: "blur",
}
],
status: [
{
required: true,
message: "请选择预警状态",
trigger: "change",
}
],
handle: [
{
required: true,
message: "请选择处置状态",
trigger: "change",
}
],
},
formData: {},
handleStatusOptions: [],
warningStatusOptions: [],
timeRange: []
};
},
watch: {
timeRange(newVal) {
if (newVal) {
this.form.payDateRange = newVal.join(',')
} else {
this.form.payDateRange = null
}
console.log(newVal)
}
},
created() {
this.queryParams.data.proNo = this.$route.query.proNo
this.getDictList()
this.getList()
this.getProjectInfo()
},
methods: {
//
getProjectInfo() {
getInfo(this.$route.query.baseDataId).then((response) => {
this.formData = response.data
});
},
/** 查询资金支付预警管理列表 */
getList() {
this.loading = true;
listFundPayWarning(this.queryParams).then(response => {
this.fundPayWarningList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("warning_status").then((response) => {
this.warningStatusOptions = response.data;
})
this.getDicts("handle_status").then((response) => {
this.handleStatusOptions = response.data;
})
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.warningStatusOptions, row.status);
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: null,
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
payDateRange: null,
payAmount: null,
ruleMsg: null,
describe: null,
reason: null,
status: "0",
handle: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getFundPayWarning(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) {
updateFundPayWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addFundPayWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFundPayWarning(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportFundPayWarning(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

11
jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/index.vue

@ -164,21 +164,13 @@
icon="el-icon-setting"
@click="handleToList('1', scope.row)"
v-hasPermi="['build:xmgcgl:edit']"
>资金支付</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="handleToList('2', scope.row)"
v-hasPermi="['build:xmgcgl:edit']"
>预警配置</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="handleToList('3', scope.row)"
@click="handleToList('2', scope.row)"
v-hasPermi="['build:xmgcgl:edit']"
>预警信息</el-button
>
@ -2273,7 +2265,6 @@ export default {
},
handleToList (tabNum, row) {
this.$router.push({
// path: "/project/special/options",
path: "/building/build/fundPayWarning-list",
query: {
baseDataId: row.id,

576
jwtech-admin-page/src/views/building/projectInfo/fundPayWarning/list.vue

@ -1,618 +1,64 @@
<template>
<div class="app-container">
<div style="font-size: 24px;margin-bottom: 16px;">{{ formData.projectName }}</div>
<el-tabs v-model="activeName" style="margin-bottom: 20px">
<el-tab-pane
label="资金支付"
name="one"
>
<fund-list :projectInfo="formData"/>
</el-tab-pane>
<el-tab-pane
label="预警配置"
name="two"
name="one"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="cyan" 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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:warningRule:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:warningRule:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:warningRule:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule: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"
/>
<fund-setting :projectInfo="formData" />
</el-tab-pane>
<el-tab-pane
label="预警信息"
name="three"
name="two"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.data.status" placeholder="请选择状态" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="cyan" 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-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule: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"
/>
<fund-info :projectInfo="formData" />
</el-tab-pane>
</el-tabs>
<!-- 添加或修改进度填报预警管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="进度要求" prop="scheduleReq">
<el-input v-model="form.scheduleReq" placeholder="请输入进度要求" />
</el-form-item>
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="年度" prop="conYear">
<el-select
v-model="form.conYear"
placeholder="请选择年度"
clearable
style="width: 100%;"
>
<el-option
v-for="dict in yearOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="约束条件" prop="conRule">
<el-select
v-model="form.conRule"
placeholder="请选择约束条件"
clearable
style="width: 100%;"
>
<el-option
v-for="dict in constraintOption"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input type="textarea" :rows="5" v-model="form.ruleMsg" 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 { listWarningRule, getWarningRule, delWarningRule, addWarningRule, updateWarningRule, exportWarningRule } from "@/api/build/warningRule";
import {
listInfo,
getInfo,
delInfo,
addInfo,
updateInfo,
exportInfo,
} from "@/api/build/projectInfo";
import FundList from './fund.vue'
import { getInfo } from "@/api/build/projectInfo"
import FundSetting from './fundSetting'
import FundInfo from './fundInfo'
export default {
name: "WarningRule",
components: { FundList },
components: { FundSetting, FundInfo },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
warningRuleList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
scheduleReq: [
{
required: true,
message: "请输入进度要求",
trigger: "blur",
},
],
dateNode: [
{
required: true,
message: "请输入时间节点",
trigger: "change",
},
],
conYear: [
{
required: true,
message: "请输入年度",
trigger: "change",
},
],
conRule: [
{
required: true,
message: "请输入约束条件",
trigger: "change",
},
],
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
},
],
},
activeName: 'regular',
formData: {},
yearOptions: [],
constraintOption: []
activeName: 'one',
formData: {}
}
},
watch: {
activeName(newVal) {
if (newVal === 'warning') {
this.queryParams.data.status = 1
} else {
this.queryParams.data.status = null
}
this.getList()
}
},
created() {
this.getDictList()
this.queryParams.data.proNo = this.$route.query.proNo
this.handleJudgeTab()
this.getProjectInfo()
this.getList();
},
methods: {
//
getProjectInfo() {
getInfo(this.$route.query.baseDataId).then((response) => {
this.formData = response.data;
console.log(this.formData)
// console.log(999, this.formData);
// listBidInfo(this.queryParams).then((response) => {
// console.log(response);
// // this.formData = response.records[0];
// });
});
},
/** 查询进度填报预警管理列表 */
getList() {
this.loading = true;
listWarningRule(this.queryParams).then(response => {
this.warningRuleList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
getDictList() {
this.getDicts("sl_year").then((response) => {
this.yearOptions = response.data;
})
this.getDicts("sl_constraint").then((response) => {
this.constraintOption = response.data;
})
},
//
yearFormat(row, column) {
return this.selectDictLabel(this.yearOptions, row.conYear);
},
//
constraintFormat(row, column) {
return this.selectDictLabel(this.constraintOption, row.conRule);
},
handleJudgeTab() {
let tabNum = this.$route.query.tabNum
if (tabNum === '1') {
this.activeName = 'one'
} else if (tabNum === '2') {
this.queryParams.data.status = null
this.activeName = 'two'
} else {
this.queryParams.data.status = 1
this.activeName = 'three'
}
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: null
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
scheduleReq: null,
dateNode: null,
conYear: null,
conRule: null,
ruleMsg: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getWarningRule(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) {
updateWarningRule(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.formData.projectName
this.form.proCode = this.formData.proCode
this.form.proNo = this.formData.proNo
addWarningRule(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delWarningRule(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportWarningRule(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
@import "@/assets/css/dialog.scss";
</style>

351
jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/info.vue

@ -0,0 +1,351 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="预警描述" prop="ruleMsg">
<el-input
v-model="queryParams.data.ruleMsg"
placeholder="请输入预警描述"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="investCompleteWarningList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120"/>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120"/>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="预警事项" align="center" prop="warnMatters" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:investCompleteWarning:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:investCompleteWarning: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="预警事项" prop="warnMatters">
<el-input v-model="form.warnMatters" type="textarea" :rows="5" placeholder="请输入预警事项" />
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" type="textarea" :rows="5" 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 { listInvestCompleteWarning, getInvestCompleteWarning, delInvestCompleteWarning, addInvestCompleteWarning, updateInvestCompleteWarning, exportInvestCompleteWarning } from "@/api/build/investCompleteWarning";
export default {
name: "InvestCompleteWarning",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
investCompleteWarningList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: '1'
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
dateNode: [
{
required: true,
message: "请选择时间节点",
trigger: "change",
}
],
warnMatters: [
{
required: true,
message: "请输入预警事项",
trigger: "blur",
}
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询投资完成预警管理列表 */
getList() {
this.loading = true;
listInvestCompleteWarning(this.queryParams).then(response => {
this.investCompleteWarningList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "1"
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getInvestCompleteWarning(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) {
updateInvestCompleteWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addInvestCompleteWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInvestCompleteWarning(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportInvestCompleteWarning(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

197
jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/list.vue

@ -25,204 +25,15 @@
label="预警配置"
name="four"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="cyan" 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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:warningRule:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:warningRule:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:warningRule:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<warning-setting :projectInfo="formData" />
</el-tab-pane>
<el-tab-pane
label="预警信息"
name="five"
>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="所属项目" prop="projectName">
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入所属项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<!-- <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.data.status" placeholder="请选择状态" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="cyan" 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-table v-loading="loading" :data="warningRuleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120">
<template slot-scope="scope">
{{ formData.projectName }}
</template>
</el-table-column>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120">
<template slot-scope="scope">
{{ formData.proCode }}
</template>
</el-table-column>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120">
<template slot-scope="scope">
{{ formData.proNo }}
</template>
</el-table-column>
<el-table-column label="进度要求" align="center" prop="scheduleReq" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="年度" align="center" prop="conYear" :formatter="yearFormat" min-width="120"/>
<el-table-column label="约束条件" align="center" prop="conRule" :formatter="constraintFormat" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:warningRule:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:warningRule:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<warning-info :projectInfo="formData" />
</el-tab-pane>
</el-tabs>
<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="650px" append-to-body :close-on-click-modal="false">
@ -295,9 +106,11 @@ import {
import ApplyConfig from './applyConfig.vue'
import AcceptApply from './acceptApply.vue'
import ApplyExamine from './applyExamine.vue'
import WarningSetting from './setting.vue'
import WarningInfo from './info.vue'
export default {
name: "WarningRule",
components: { ApplyConfig, AcceptApply, ApplyExamine },
components: { ApplyConfig, AcceptApply, ApplyExamine, WarningSetting, WarningInfo },
data() {
return {
//

393
jwtech-admin-page/src/views/building/projectInfo/investCompleteWarning/setting.vue

@ -0,0 +1,393 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-form-item label="预警描述" prop="ruleMsg">
<el-input
v-model="queryParams.data.ruleMsg"
placeholder="请输入预警描述"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
</el-form-item>
<el-form-item>
<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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:investCompleteWarning:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:investCompleteWarning:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:investCompleteWarning:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['build:investCompleteWarning:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="investCompleteWarningList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/>
<el-table-column label="序号" type="index" width="50" align="center" fixed/>
<el-table-column label="所属项目" align="center" prop="projectName" min-width="120"/>
<el-table-column label="项目编码" align="center" prop="proCode" min-width="120"/>
<el-table-column label="项目编号" align="center" prop="proNo" min-width="120"/>
<el-table-column label="预警描述" align="center" prop="ruleMsg" min-width="120"/>
<el-table-column label="时间节点" align="center" prop="dateNode" min-width="120"/>
<el-table-column label="预警事项" align="center" prop="warnMatters" min-width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:investCompleteWarning:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:investCompleteWarning: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="650px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="时间节点" prop="dateNode">
<el-date-picker
v-model="form.dateNode"
type="date"
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="预警事项" prop="warnMatters">
<el-input v-model="form.warnMatters" type="textarea" :rows="5" placeholder="请输入预警事项" />
</el-form-item>
<el-form-item label="预警描述" prop="ruleMsg">
<el-input v-model="form.ruleMsg" type="textarea" :rows="5" 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 { listInvestCompleteWarning, getInvestCompleteWarning, delInvestCompleteWarning, addInvestCompleteWarning, updateInvestCompleteWarning, exportInvestCompleteWarning } from "@/api/build/investCompleteWarning";
export default {
name: "InvestCompleteWarning",
props: {
projectInfo: {
type: Object,
default: true
},
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
investCompleteWarningList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids:null,
data:{
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
status: null
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
ruleMsg: [
{
required: true,
message: "请输入预警描述",
trigger: "blur",
}
],
dateNode: [
{
required: true,
message: "请选择时间节点",
trigger: "change",
}
],
warnMatters: [
{
required: true,
message: "请输入预警事项",
trigger: "blur",
}
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询投资完成预警管理列表 */
getList() {
this.loading = true;
listInvestCompleteWarning(this.queryParams).then(response => {
this.investCompleteWarningList = response.records;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data:{
id: null,
projectName: null,
proCode: null,
proNo: null,
ruleMsg: null,
dateNode: null,
warnMatters: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
remark: null,
status: "0"
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
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
getInvestCompleteWarning(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) {
updateInvestCompleteWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.projectName = this.projectInfo.projectName
this.form.proCode = this.projectInfo.proCode
this.form.proNo = this.projectInfo.proNo
addInvestCompleteWarning(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if(ids){
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInvestCompleteWarning(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}else{
this.$message.warning("请选择要删除的数据!!");
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if(this.ids){
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportInvestCompleteWarning(queryParams);
}).then(response => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
//::v-deep {
// .el-dialog {
// margin-top: 10vh !important;
// }
//}
</style>

114
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiConstProRuleController.java

@ -0,0 +1,114 @@
package com.kms.build.controller;
import java.util.Arrays;
import java.util.List;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
import com.kms.common.utils.BaseEntityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jianwei.common.mybaitsplus.BeanToWrapper;
import com.jianwei.common.annotation.Log;
import com.jianwei.common.core.domain.AjaxResult;
import com.jianwei.common.enums.BusinessType;
import com.kms.build.domain.BsSgcJsjdBuiConstProRule;
import com.kms.build.service.BsSgcJsjdBuiConstProRuleService;
/**
* 建设进度预警管理Controller
*
* @author kms
* @date 2025-03-12
*/
@RestController
@RequestMapping("/build/fundPayRuls")
@Api(tags = "建设进度预警管理")
public class BsSgcJsjdBuiConstProRuleController extends BaseController
{
@Autowired
private BsSgcJsjdBuiConstProRuleService bsSgcJsjdBuiConstProRuleService;
/**
* 查询建设进度预警管理列表
*/
@PostMapping("/list")
@ApiOperation("建设进度预警管理列表")
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiConstProRule> sp)
{
return bsSgcJsjdBuiConstProRuleService.selectPage(sp);
}
/**
* 导出建设进度预警管理列表
*/
@Log(title = "建设进度预警管理导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("建设进度预警管理导出")
public AjaxResult export(@RequestBody BsSgcJsjdBuiConstProRule bsSgcJsjdBuiConstProRule)
{
List<BsSgcJsjdBuiConstProRule> list = bsSgcJsjdBuiConstProRuleService.listByIds(bsSgcJsjdBuiConstProRule.getIds());
ExcelUtil<BsSgcJsjdBuiConstProRule> util = new ExcelUtil<>(BsSgcJsjdBuiConstProRule.class);
return util.exportExcel(list, "fundPayRuls");
}
/**
* 获取建设进度预警管理详细信息
*/
@ApiOperation(" 建设进度预警管理详情")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(bsSgcJsjdBuiConstProRuleService.getById(id));
}
/**
* 新增建设进度预警管理
*/
@Log(title = "建设进度预警管理新增", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("建设进度预警管理新增")
public AjaxResult add(@RequestBody BsSgcJsjdBuiConstProRule bsSgcJsjdBuiConstProRule)
{
BaseEntityUtils.preInsert(bsSgcJsjdBuiConstProRule);
return toAjax(bsSgcJsjdBuiConstProRuleService.save(bsSgcJsjdBuiConstProRule));
}
/**
* 修改建设进度预警管理
*/
@ApiOperation("建设进度预警管理修改")
@Log(title = "建设进度预警管理修改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BsSgcJsjdBuiConstProRule bsSgcJsjdBuiConstProRule)
{
return toAjax(bsSgcJsjdBuiConstProRuleService.updateById(bsSgcJsjdBuiConstProRule));
}
/**
* 删除建设进度预警管理
*/
@ApiOperation("建设进度预警管理删除")
@Log(title = "建设进度预警管理删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(bsSgcJsjdBuiConstProRuleService.removeByIds(Arrays.asList(ids)));
}
}

93
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiConstProRule.java

@ -0,0 +1,93 @@
package com.kms.build.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jianwei.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jianwei.common.core.domain.BaseEntity;
/**
* 建设进度预警管理对象 bs_sgc_jsjd_bui_const_pro_rule
*
* @author kms
* @date 2025-03-12
*/
@TableName("bs_sgc_jsjd_bui_const_pro_rule")
@Data
@ApiModel("建设进度预警管理")
public class BsSgcJsjdBuiConstProRule extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 所属项目 */
@Excel(name = "所属项目")
@ApiModelProperty("所属项目")
private String projectName;
/** 项目编码 */
@Excel(name = "项目编码")
@ApiModelProperty("项目编码")
private String proCode;
/** 项目编号 */
@Excel(name = "项目编号")
@ApiModelProperty("项目编号")
private String proNo;
/** 预警类型 */
@Excel(name = "预警类型")
@ApiModelProperty("预警类型")
private String warnType;
/** 条件 */
@Excel(name = "条件")
@ApiModelProperty("条件")
private String warnCondition;
/** 判断符号 */
@Excel(name = "判断符号")
@ApiModelProperty("判断符号")
private String judgeSymbol;
/** 阈值 */
@Excel(name = "阈值")
@ApiModelProperty("阈值")
private String threshold;
/** 惩罚措施 */
@Excel(name = "惩罚措施")
@ApiModelProperty("惩罚措施")
private String measures;
/** 预警描述 */
@Excel(name = "预警描述")
@ApiModelProperty("预警描述")
private String ruleMsg;
/** 时间节点 */
@Excel(name = "时间节点")
@ApiModelProperty("时间节点")
private String dateNode;
/** 创建人 */
@Excel(name = "创建人")
@ApiModelProperty("创建人")
private String createUid;
/** 更新人 */
@Excel(name = "更新人")
@ApiModelProperty("更新人")
private String updateUid;
/** 状态(0:没有预警,1:预警 */
@Excel(name = "状态", readConverterExp = "状态(0:没有预警,1:预警")
@ApiModelProperty("状态")
private String status;
}

16
jwtech-system/src/main/java/com/kms/build/mapper/BsSgcJsjdBuiConstProRuleMapper.java

@ -0,0 +1,16 @@
package com.kms.build.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kms.build.domain.BsSgcJsjdBuiConstProRule;
/**
* 建设进度预警管理Mapper接口
*
* @author kms
* @date 2025-03-12
*/
@Repository
public interface BsSgcJsjdBuiConstProRuleMapper extends BaseMapper<BsSgcJsjdBuiConstProRule> {
}

17
jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiConstProRuleService.java

@ -0,0 +1,17 @@
package com.kms.build.service;
import org.springframework.stereotype.Service;
import com.jianwei.common.core.service.BaseService;
import com.kms.build.mapper.BsSgcJsjdBuiConstProRuleMapper;
import com.kms.build.domain.BsSgcJsjdBuiConstProRule;
/**
* 建设进度预警管理Service接口
*
* @author kms
* @date 2025-03-12
*/
@Service
public class BsSgcJsjdBuiConstProRuleService extends BaseService<BsSgcJsjdBuiConstProRuleMapper, BsSgcJsjdBuiConstProRule>{
}
Loading…
Cancel
Save