You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
903 lines
25 KiB
903 lines
25 KiB
<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> -->
|
|
|
|
<!-- 项目法人 -->
|
|
<div class="listTitle" style="margin-top: 0">
|
|
<span>项目法人</span>
|
|
</div>
|
|
<el-row :gutter="25">
|
|
<el-form :model="firmInfo" label-width="110px" label-position="top">
|
|
<el-col :span="24">
|
|
<el-form-item label="项目法人">
|
|
<el-input
|
|
v-model="firmInfo.projectLegalPerson"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<!-- <el-col :span="12">
|
|
<el-form-item label="单位负责人电话">
|
|
<el-input
|
|
v-model="firmInfo.projectLegalPhone"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col> -->
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="项目负责人">
|
|
<el-input
|
|
v-model="firmInfo.projectSuperintendent"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="项目负责人电话">
|
|
<el-input
|
|
v-model="firmInfo.projectSuperintendentPhone"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
<el-form-item label="单位法定代表人">
|
|
<el-input
|
|
v-model="firmInfo.projectUnitLegal"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="单位法定代表人电话">
|
|
<el-input
|
|
v-model="firmInfo.projectUnitLegalPhone"
|
|
:readonly="true"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-form>
|
|
</el-row>
|
|
<!-- <pagination
|
|
v-show="total > 0"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/> -->
|
|
|
|
<!-- 设计单位 -->
|
|
<div class="listTitle">
|
|
<span>设计单位</span>
|
|
<!-- <span class="addBtn" @click="handleAdd('0')">
|
|
<i class="el-icon-plus"></i>
|
|
添加
|
|
</span> -->
|
|
</div>
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="
|
|
firmInfo.enterpriseInfoList
|
|
? firmInfo.enterpriseInfoList.filter(
|
|
(item) => item.enterpriseType == '0'
|
|
)
|
|
: []
|
|
"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<el-table-column
|
|
label="单位名称"
|
|
align="center"
|
|
prop="enterpriseName"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人"
|
|
align="center"
|
|
prop="enterprisePerson"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人职务"
|
|
align="center"
|
|
prop="duties"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系电话"
|
|
align="center"
|
|
prop="enterprisePhone"
|
|
min-width="150"
|
|
/>
|
|
<el-table-column
|
|
label="单位统一社会信用代码"
|
|
align="center"
|
|
prop="socialCreditCode"
|
|
min-width="150"
|
|
/>
|
|
<!-- <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-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>
|
|
|
|
<!-- 施工单位 -->
|
|
<div class="listTitle">
|
|
<span>施工单位</span>
|
|
<!-- <span class="addBtn" @click="handleAdd('1')">
|
|
<i class="el-icon-plus"></i>
|
|
添加
|
|
</span> -->
|
|
</div>
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="
|
|
firmInfo.enterpriseInfoList
|
|
? firmInfo.enterpriseInfoList.filter(
|
|
(item) => item.enterpriseType == '1'
|
|
)
|
|
: []
|
|
"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<el-table-column
|
|
label="单位名称"
|
|
align="center"
|
|
prop="enterpriseName"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人"
|
|
align="center"
|
|
prop="enterprisePerson"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人职务"
|
|
align="center"
|
|
prop="duties"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系电话"
|
|
align="center"
|
|
prop="enterprisePhone"
|
|
min-width="150"
|
|
/>
|
|
<el-table-column
|
|
label="单位统一社会信用代码"
|
|
align="center"
|
|
prop="socialCreditCode"
|
|
min-width="150"
|
|
/>
|
|
|
|
<!-- <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-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>
|
|
|
|
<!-- 监理单位 -->
|
|
<div class="listTitle">
|
|
<span>监理单位</span>
|
|
<!-- <span class="addBtn" @click="handleAdd('2')">
|
|
<i class="el-icon-plus"></i>
|
|
添加
|
|
</span> -->
|
|
</div>
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="
|
|
firmInfo.enterpriseInfoList
|
|
? firmInfo.enterpriseInfoList.filter(
|
|
(item) => item.enterpriseType == '2'
|
|
)
|
|
: []
|
|
"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<el-table-column
|
|
label="单位名称"
|
|
align="center"
|
|
prop="enterpriseName"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人"
|
|
align="center"
|
|
prop="enterprisePerson"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人职务"
|
|
align="center"
|
|
prop="duties"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系电话"
|
|
align="center"
|
|
prop="enterprisePhone"
|
|
min-width="150"
|
|
/>
|
|
<el-table-column
|
|
label="单位统一社会信用代码"
|
|
align="center"
|
|
prop="socialCreditCode"
|
|
min-width="150"
|
|
/>
|
|
|
|
<!-- <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-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>
|
|
|
|
<!-- 其他单位 -->
|
|
<div class="listTitle">
|
|
<span>其他单位</span>
|
|
<!-- <span class="addBtn" @click="handleAdd('3')">
|
|
<i class="el-icon-plus"></i>
|
|
添加
|
|
</span> -->
|
|
</div>
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="
|
|
firmInfo.enterpriseInfoList
|
|
? firmInfo.enterpriseInfoList.filter(
|
|
(item) => item.enterpriseType == '3'
|
|
)
|
|
: []
|
|
"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
<el-table-column
|
|
label="单位名称"
|
|
align="center"
|
|
prop="enterpriseName"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人"
|
|
align="center"
|
|
prop="enterprisePerson"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系人职务"
|
|
align="center"
|
|
prop="duties"
|
|
min-width="120"
|
|
/>
|
|
<el-table-column
|
|
label="单位联系电话"
|
|
align="center"
|
|
prop="enterprisePhone"
|
|
min-width="150"
|
|
/>
|
|
<el-table-column
|
|
label="单位统一社会信用代码"
|
|
align="center"
|
|
prop="socialCreditCode"
|
|
min-width="150"
|
|
/>
|
|
|
|
<!-- <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-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>
|
|
|
|
<!-- 添加或修改单位信息对话框 -->
|
|
<el-dialog
|
|
:title="title"
|
|
:visible.sync="open"
|
|
width="1200px"
|
|
append-to-body
|
|
:close-on-click-modal="false"
|
|
>
|
|
<el-row :gutter="15">
|
|
<el-form
|
|
ref="form"
|
|
:model="form"
|
|
:rules="rules"
|
|
label-width="96px"
|
|
label-position="top"
|
|
>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位名称" prop="enterpriseName">
|
|
<el-input
|
|
v-model="form.enterpriseName"
|
|
placeholder="请输入单位名称"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位联系人" prop="enterprisePerson">
|
|
<el-input
|
|
v-model="form.enterprisePerson"
|
|
placeholder="请输入单位联系人"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位联系人职务" prop="duties">
|
|
<el-input
|
|
v-model="form.duties"
|
|
placeholder="请输入单位联系人职务"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
<el-form-item label="单位联系电话" prop="enterprisePhone">
|
|
<el-input
|
|
v-model="form.enterprisePhone"
|
|
placeholder="请输入单位联系电话"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位统一社会信用代码" prop="socialCreditCode">
|
|
<el-input
|
|
v-model="form.socialCreditCode"
|
|
placeholder="请输入单位统一社会信用代码"
|
|
/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-form>
|
|
</el-row>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
<!--查看 -->
|
|
<el-dialog
|
|
:title="viewTitle"
|
|
:visible.sync="viewOpen"
|
|
width="1200px"
|
|
append-to-body
|
|
@close="closeView"
|
|
>
|
|
<!-- 查看企业信息 -->
|
|
<div class="infoTitle">参建企业信息</div>
|
|
<div class="draLine"></div>
|
|
<div class="content">
|
|
<el-descriptions
|
|
class="margin-top"
|
|
:column="2"
|
|
border
|
|
:labelStyle="{
|
|
'text-align': 'left',
|
|
width: '180px',
|
|
height: '50px',
|
|
}"
|
|
:contentStyle="{ minWidth: '350px' }"
|
|
>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 项目法人 </template>
|
|
{{ this.firmMsg.projectLegalPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 项目法人 </template>
|
|
{{ this.firmMsg.projectLegalPhone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 项目法人联系方式 </template>
|
|
{{ this.firmMsg.projectLegalPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 设计单位 </template>
|
|
{{ this.firmMsg.dsun }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 设计单位联系人 </template>
|
|
{{ this.firmMsg.dsunPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 设计单位联系人职务 </template>
|
|
{{ this.firmMsg.dsunTitle }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 设计单位联系电话 </template>
|
|
{{ this.firmMsg.dsunPhone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 承建单位 </template>
|
|
{{ this.firmMsg.constructionUnit }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 承建单位联系人 </template>
|
|
{{ this.firmMsg.constructionUnitPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 承建单位联系人职务 </template>
|
|
{{ this.firmMsg.constructionUnitTitle }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 承建单位联系人电话 </template>
|
|
{{ this.firmMsg.constructionUnitPhone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 监理单位 </template>
|
|
{{ this.firmMsg.supervisionUnit }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 监理单位联系人 </template>
|
|
{{ this.firmMsg.supervisionUnitPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 监理单位联系人职务 </template>
|
|
{{ this.firmMsg.supervisionUnitTitle }}
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
<template slot="label"> 请输入监理单位联系人电话 </template>
|
|
{{ this.firmMsg.supervisionUnitPhone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 其他单位 </template>
|
|
{{ this.firmMsg.otherUnit }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 其他单位类别 </template>
|
|
{{ this.firmMsg.otherUnitType }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 其他单位联系人 </template>
|
|
{{ this.firmMsg.otherUnitPerson }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 其他单位联系人职务 </template>
|
|
{{ this.firmMsg.请输入其他单位联系人职务 }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 其他单位联系人电话 </template>
|
|
{{ this.firmMsg.otherUnitPhone }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label"> 行政区划 </template>
|
|
{{ this.firmMsg.adcd }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
listInfo,
|
|
getInfo,
|
|
delInfo,
|
|
addInfo,
|
|
updateInfo,
|
|
exportInfo,
|
|
} from "@/api/build/enteInfo";
|
|
|
|
export default {
|
|
name: "Info",
|
|
props: ["proNo", "proCode"],
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 企业信息管理表格数据
|
|
firmInfo: {
|
|
projectLegalPerson: [],
|
|
projectLegalPhone: [],
|
|
projectLegalUnit: [],
|
|
enterpriseInfoList: [],
|
|
},
|
|
// 弹出层标题
|
|
title: "",
|
|
viewTitle: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
viewOpen: false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
ids: null,
|
|
data: {
|
|
proCode: null,
|
|
proNo: null,
|
|
},
|
|
// 排序方式
|
|
params: {
|
|
// 按哪个字段排序
|
|
orderBy: "create_time",
|
|
// desc降序,升序asc
|
|
sort: "desc",
|
|
},
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
enterpriseName: [
|
|
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
|
|
],
|
|
enterprisePerson: [
|
|
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
|
|
],
|
|
duties: [{ max: 250, message: "字符长度最大为250", trigger: "blur" }],
|
|
socialCreditCode: [
|
|
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
|
|
],
|
|
enterprisePhone: [
|
|
{
|
|
pattern:
|
|
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
|
|
message: "手机号格式不正确",
|
|
trigger: "blur",
|
|
},
|
|
],
|
|
},
|
|
firmMsg: {},
|
|
// 面包屑,路由信息
|
|
routeList: [
|
|
{
|
|
path: "/building/firmInfo",
|
|
routeName: "参建企业信息管理",
|
|
},
|
|
],
|
|
// 0-3分别是设计、承建、监理、其他
|
|
formStatus: "0",
|
|
};
|
|
},
|
|
created() {
|
|
if (this.proNo && this.proCode) this.getList();
|
|
},
|
|
// 父组件 利用axios请求得到的值 传送到子组件,要监听,否则初始渲染时为空
|
|
watch: {
|
|
// proNo: function (n, o) {
|
|
// this.proNo = n;
|
|
// this.getList();
|
|
// },
|
|
// proCode: function (n, o) {
|
|
// this.proCode = n;
|
|
// this.getList();
|
|
// },
|
|
},
|
|
methods: {
|
|
/** 查询企业信息管理列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
this.queryParams.data.proNo = this.proNo;
|
|
this.queryParams.data.proCode = this.proCode;
|
|
listInfo(this.queryParams).then((response) => {
|
|
console.log(88888888888, response);
|
|
this.firmInfo = response.data;
|
|
// this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.open = false;
|
|
this.reset();
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
id: null,
|
|
enterpriseName: null,
|
|
enterprisePerson: null,
|
|
enterprisePhone: null,
|
|
enterpriseType: null,
|
|
duties: null,
|
|
adcd: null,
|
|
proCode: null,
|
|
proNo: null,
|
|
createUid: null,
|
|
createTime: null,
|
|
updateUid: null,
|
|
updateTime: null,
|
|
owerDept: null,
|
|
};
|
|
this.resetForm("form");
|
|
},
|
|
// 查询表单重置
|
|
resetQueryForm() {
|
|
this.queryParams = {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
data: {
|
|
id: null,
|
|
projectLegalPerson: null,
|
|
projectLegalUnit: null,
|
|
projectLegalPhone: null,
|
|
adcd: null,
|
|
proCode: null,
|
|
proNo: null,
|
|
createUid: null,
|
|
createTime: null,
|
|
updateUid: null,
|
|
updateTime: null,
|
|
owerDept: null,
|
|
},
|
|
};
|
|
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(statusNo) {
|
|
this.reset();
|
|
this.formStatus = statusNo;
|
|
this.open = true;
|
|
this.title = `添加${
|
|
statusNo == "0"
|
|
? "设计"
|
|
: statusNo == "1"
|
|
? "施工"
|
|
: statusNo == "2"
|
|
? "监理"
|
|
: "其他"
|
|
}单位信息`;
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
const id = row.id || this.ids;
|
|
getInfo(id).then((response) => {
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.title = `修改${
|
|
this.form.enterpriseType == "0"
|
|
? "设计"
|
|
: this.form.enterpriseType == "1"
|
|
? "施工"
|
|
: this.form.enterpriseType == "2"
|
|
? "监理"
|
|
: "其他"
|
|
}单位信息`;
|
|
});
|
|
},
|
|
|
|
// 查看信息
|
|
viewInfo(row) {
|
|
this.viewTitle = "查看单位信息";
|
|
this.firmMsg = row;
|
|
console.log("firmMsg", row);
|
|
this.viewOpen = true;
|
|
},
|
|
|
|
// 关闭弹窗
|
|
closeView() {
|
|
this.firmMsg = {};
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate((valid) => {
|
|
if (valid) {
|
|
this.form.proNo = this.proNo;
|
|
this.form.proCode = this.proCode;
|
|
if (this.form.id != null) {
|
|
updateInfo(this.form).then((response) => {
|
|
if (response.code === 200) {
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.getList();
|
|
}
|
|
});
|
|
} else {
|
|
this.form.enterpriseType = this.formStatus;
|
|
addInfo(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 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: 10vh !important;
|
|
// }
|
|
// }
|
|
.listTitle {
|
|
font-size: 14px;
|
|
padding-left: 10px;
|
|
padding-right: 30px;
|
|
margin: 20px 0;
|
|
border-left: 2px solid #36b29e;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
span:nth-child(1) {
|
|
font-weight: bold;
|
|
}
|
|
.addBtn {
|
|
color: #36b29e;
|
|
cursor: pointer;
|
|
}
|
|
.addBtn:hover {
|
|
color: #31a08e;
|
|
}
|
|
}
|
|
</style>
|
|
|