Browse Source

项目预警管理

dev_kxc
xzt 1 year ago
parent
commit
5cd06ffd27
  1. 11
      jwtech-admin-page/src/api/warn/earlyWarning.js
  2. 6
      jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/index.vue
  3. 486
      jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/warning/index.vue
  4. 55
      jwtech-admin-page/src/views/evaluationEarlyWarning/supervisionInspection/regulatoryInspection/editPart.vue

11
jwtech-admin-page/src/api/warn/earlyWarning.js

@ -0,0 +1,11 @@
import request from '@/utils/request'
// 查询监管检查列表
export function listProjectManage(query) {
return request({
url: '/warn/projectManage/list',
method: 'post',
data: query
})
}

6
jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/index.vue

@ -0,0 +1,6 @@
<template>
<!-- <div class="app-container"> -->
<div>
<router-view />
</div>
</template>

486
jwtech-admin-page/src/views/evaluationEarlyWarning/earlyWarningManage/warning/index.vue

@ -0,0 +1,486 @@
<template>
<!-- 项目基本信息-->
<div class="app-container">
<!-- 面包屑 -->
<el-breadcrumb separator="/" style="margin-bottom: 20px">
<el-breadcrumb-item
v-for="(item, index) in routeList"
:key="item + index"
:to="{ path: item.path }"
>{{ item.routeName }}</el-breadcrumb-item
>
</el-breadcrumb>
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="项目类型" prop="projectType">
<el-select
v-model="queryParams.data.projectType"
placeholder="请选择项目类型"
@change="handleQuery"
clearable
size="small"
:popper-append-to-body="false"
>
<el-option-group
v-for="(group, index) in projectTypeoptions"
:key="group.label"
:label="group.label"
>
<el-option
v-for="dict in group.options"
:key="dict.dictValue + dict.dictLabel"
:label="dict.dictLabel"
:value="index + dict.dictValue"
>
</el-option>
</el-option-group>
</el-select>
</el-form-item>
<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 icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="infoList"
@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="adcd"
min-width="120"
:formatter="formatAdcd"
/> -->
<el-table-column
label="项目类型"
align="center"
prop="projectType"
:formatter="projectTypeFormat"
min-width="120"
/>
<el-table-column
label="业务单位"
align="center"
prop="unit"
min-width="120"
/>
<el-table-column
label="项目投资概算(万元)"
align="center"
prop="total"
min-width="180"
/>
<el-table-column
label="是否属规划内"
align="center"
prop="isBelong"
:formatter="isBelongFormat"
min-width="120"
/>
<el-table-column
label="项目阶段"
align="center"
prop="projectPhase"
:formatter="projectPhaseFormat"
min-width="120"
/>
<!-- <el-table-column
label="亮灯情况"
align="center"
prop="projectType"
min-width="120"
/> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
min-width="180"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="viewInfo(scope.row)"
>查看</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:info:edit']"
>编辑</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:info: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="viewTitle"
:visible.sync="viewOpen"
width="1200px"
append-to-body
@close="closeView"
:close-on-click-modal="false"
>
<div>查看页面</div>
</el-dialog>
</div>
</template>
<script>
import { listProjectManage } from "@/api/warn/earlyWarning";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
export default {
name: "earlyWarin",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
title: "",
viewTitle: "",
//
open: false,
viewOpen: false,
//
zd_projectTypeOptions: [],
//
ms_projectTypeOptions: [],
//
isBelongOptions: [],
//
projectPhaseOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {},
proMsg: {},
//
routeList: [
{
path: "/evaluationEarlyWarning/earlyWarningManage/warning",
routeName: "项目预警管理",
},
],
areasOptions: [],
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
},
};
},
created() {
this.getList();
this.getDicts("major_project").then((response) => {
this.zd_projectTypeOptions = response.data;
});
this.getDicts("general_project").then((response) => {
this.ms_projectTypeOptions = response.data;
});
this.getDicts("project_phase").then((response) => {
this.projectPhaseOptions = response.data;
});
this.getDicts("whether").then((response) => {
this.isBelongOptions = response.data;
});
},
computed: {
projectTypeoptions() {
let op = [
{
label: "重大项目",
options: this.zd_projectTypeOptions,
},
{
label: "面上项目",
options: this.ms_projectTypeOptions,
},
];
return op;
},
},
methods: {
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2);
let cityCode = row.adcd.slice(2, 4);
let areaCode = row.adcd.slice(4, 6);
if (areaCode != "00") {
return (
codeToText[provinceCode] +
"-" +
codeToText[provinceCode + cityCode] +
"-" +
codeToText[provinceCode + cityCode + areaCode]
);
} else if (cityCode != "00") {
return (
codeToText[provinceCode] + "-" + codeToText[provinceCode + cityCode]
);
} else {
return codeToText[provinceCode];
}
}
},
//
projectTypeFormat(row, column) {
if (row.isMajor == "zd") {
return this.selectDictLabel(
this.zd_projectTypeOptions,
row.projectType
);
} else if (row.isMajor == "ms") {
return this.selectDictLabel(
this.ms_projectTypeOptions,
row.projectType
);
}
},
//
isBelongFormat(row, column) {
return this.selectDictLabel(this.isBelongOptions, row.isBelong);
},
//
projectPhaseFormat(row, column) {
return this.selectDictLabel(this.projectPhaseOptions, row.projectPhase);
},
/** 查询项目基本信息管理列表 */
getList() {
this.loading = true;
listProjectManage(this.queryParams).then((response) => {
this.infoList = response.records;
// console.log(999999, response);
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {},
//
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;
},
//
viewInfo(row) {
this.proMsg = row;
console.log("proMsg", row);
this.viewOpen = true;
},
//
closeView() {
this.proMsg = {};
},
/** 修改按钮操作 */
handleUpdate(row) {
// const id = row.id || this.ids;
this.routeList[0].routeName = row.projectName;
this.routeList.push({
path: "/building/projectInfo/projectProcess",
routeName: row.proCode,
isEdit: true,
});
//
this.$store.commit("setRouteList", JSON.stringify(this.routeList));
//
this.$router.push({
path: "/building/projectInfo/projectProcess?baseDataId=" + row.id,
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delInfo(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
::v-deep {
.el-dialog {
margin-top: 2vh !important;
}
.el-dialog__body {
transform: scale(1);
}
.el-select-dropdown {
.el-select-dropdown__list {
display: flex;
.el-select-group__wrap {
padding-bottom: 0;
}
.el-select-group__wrap::after {
display: none;
}
}
}
}
</style>

55
jwtech-admin-page/src/views/evaluationEarlyWarning/supervisionInspection/regulatoryInspection/editPart.vue

@ -75,21 +75,23 @@
<el-table-column
label="责任单位"
align="center"
prop="aa"
prop="unitArray"
:formatter="unitArrayFormat"
min-width="120"
/>
<el-table-column
label="整改完成情况"
align="center"
prop="bbb"
prop="isFinish"
:formatter="isFinishFormat"
min-width="120"
/>
<el-table-column
<!-- <el-table-column
label="整改相关附件"
align="center"
prop="ccc"
min-width="120"
/>
/> -->
<el-table-column
label="操作"
align="center"
@ -208,6 +210,7 @@ import {
updateRectification,
exportRectification,
} from "@/api/warn/rectification";
import { listInfo } from "@/api/build/enteInfo";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
import responsibleUnit from "./responsibleUnit.vue";
@ -261,6 +264,24 @@ export default {
sortBy: "desc",
},
},
//
unitParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
proCode: null,
proNo: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sort: "desc",
},
},
unitOptions: [],
//
form: {},
//
@ -275,6 +296,10 @@ export default {
},
created() {
this.getList();
this.getUnit();
this.getDicts("rectification_completion").then((response) => {
this.isFinishOptions = response.data;
});
},
methods: {
/** 查询整改通知书列表 */
@ -287,6 +312,28 @@ export default {
this.loading = false;
});
},
getUnit() {
this.unitParams.data.proNo = this.proNo;
this.unitParams.data.proCode = this.proCode;
listInfo(this.unitParams).then((response) => {
this.unitOptions = response.data.enterpriseInfoList;
// console.log(88888888888, this.unitOptions);
});
},
unitArrayFormat(row) {
let res = "";
row.unitArray.forEach((item) => {
// this.unitOptions.forEach((sub) => {
// if (item === sub.enterpriseName) {
res = res + item + "、";
// }
// });
});
return res;
},
isFinishFormat(row) {
return this.selectDictLabel(this.isFinishOptions, row.isFinish);
},
//
cancel() {
this.open = false;

Loading…
Cancel
Save