4 changed files with 554 additions and 4 deletions
@ -0,0 +1,11 @@ |
|||||
|
|
||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询监管检查列表
|
||||
|
export function listProjectManage(query) { |
||||
|
return request({ |
||||
|
url: '/warn/projectManage/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
<template> |
||||
|
<!-- <div class="app-container"> --> |
||||
|
<div> |
||||
|
<router-view /> |
||||
|
</div> |
||||
|
</template> |
@ -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", |
||||
|
// desc降序,升序asc |
||||
|
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", |
||||
|
// desc降序,升序asc |
||||
|
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> |
Loading…
Reference in new issue