flx:提交项目组管理 装置管理
This commit is contained in:
parent
f4e9f5d18f
commit
2598c15d22
@ -1,21 +1,21 @@
|
||||
/**
|
||||
* api接口统一管理
|
||||
*/
|
||||
import {post,get} from '../http'
|
||||
import { post, get } from '../http'
|
||||
|
||||
export const addProjectApi = data => post('xmgl/project/add', data); //添加项目信息
|
||||
export const editProjectApi = data => post('xmgl/project/edit', data); //编辑项目信息
|
||||
export const deleteProjectApi = data => post('xmgl/project/delete', data); //删除项目信息
|
||||
export const getProjectListApi = data => post('xmgl/project/selectCompanyProjectList', data); //项目列表
|
||||
export const selectProvincesCityListApi = data => get('xmgl/systemProvinces/selectProvincesCityList', data); //查询省市区
|
||||
export const getProjectListApi = data => post('xmgl/project/selectCompanyProjectList', data); //项目列表
|
||||
export const selectProvincesCityListApi = data => get('xmgl/systemProvinces/selectProvincesCityList', data); //查询省市区
|
||||
|
||||
|
||||
|
||||
//项目后台
|
||||
|
||||
|
||||
export const getLayerCompanyList = data => post('xmgl/company/getLayerCompanyList', data); // 项目后台--项目列表--获取一级二级管理机构列表
|
||||
export const selectCompanyProjectPage = data => post('xmgl/project/selectCompanyProjectPage', data); // 项目后台--项目列表--获取数据列表
|
||||
export const getLayerCompanyList = data => post('xmgl/company/getLayerCompanyList', data); // 项目后台--项目列表--获取一级二级管理机构列表
|
||||
export const selectCompanyProjectPage = data => post('xmgl/project/selectCompanyProjectPage', data); // 项目后台--项目列表--获取数据列表
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ export const editProjectConfigListApi = data => post('xmgl/projectConfig/edit',
|
||||
|
||||
|
||||
//BIM中心
|
||||
export const getBimTokenApi = data => post('forged/getToken', data);//获取bim token
|
||||
export const getBimTokenApi = data => post('forged/getToken', data); //获取bim token
|
||||
|
||||
export const projectBimAddApi = data => post('xmgl/projectBim/add', data);
|
||||
export const projectBimDeleteApi = data => post('xmgl/projectBim/delete', data);
|
||||
@ -45,23 +45,23 @@ export const deleteBimDevPointApi = data => post('xmgl/bimDevPoint/deleteBimDevP
|
||||
export const getVideoItemInfoApi = data => post('xmgl/videoItem/getVideoItemInfo', data);
|
||||
// 金林湾
|
||||
export const projectJlwBimListApi = data => get('/xmgl/bimface/selectProjectBimfaceList', data); // 配置列表
|
||||
export const addJlwConfigApi = data => post('/xmgl/bimface/addBimfaceConfig', data); // 添加配置
|
||||
export const addJlwUploadApi = data => post('/xmgl/bimface/uploadFile', data); // 添加新模型
|
||||
export const addJlwConfigApi = data => post('/xmgl/bimface/addBimfaceConfig', data); // 添加配置
|
||||
export const addJlwUploadApi = data => post('/xmgl/bimface/uploadFile', data); // 添加新模型
|
||||
export const deleteJlwUploadApi = data => get('/xmgl/bimface/deleteProjectBim', data); // 删除bim
|
||||
export const startJlwApi = data => get('/xmgl/bimface/updateEnabled', data); // 启用所对应的bim
|
||||
export const getJlwConfigApi = data => get('/xmgl/bimface/getConfigStatus', data); // 获取项目中bimface配置信息
|
||||
export const getJlwTokenApi = data => get('/xmgl/bimface/getViewTokenByFileId', data); // 通过文件标识获取ViewToken
|
||||
export const getJlwDetailsApi = data => get('/xmgl/bimface/getDetailsByFileIdAndProjectSn', data); // 通过文件标识获取详情(包括ViewToken)
|
||||
export const saveBimfaceConfig = data => post('/xmgl/bimface/edit', data); // 保存BIMFACE相关配置
|
||||
export const searchEnableModel = data => get('/xmgl/bimface/getEnableModel', data); // 查询启用的模型和token
|
||||
export const saveBimfaceConfig = data => post('/xmgl/bimface/edit', data); // 保存BIMFACE相关配置
|
||||
export const searchEnableModel = data => get('/xmgl/bimface/getEnableModel', data); // 查询启用的模型和token
|
||||
|
||||
// bimBase中心
|
||||
export const addBimBaseConfigApi = data => post('/xmgl/gouliPkpmConfig/add', data); // 添加配置
|
||||
export const addBimBaseConfigApi = data => post('/xmgl/gouliPkpmConfig/add', data); // 添加配置
|
||||
export const getBimBaseConfigApi = data => get('/xmgl/gouliPkpmConfig/getConfigByProjectSn', data); // 获取项目中bimface配置信息
|
||||
export const projectBimBaseListApi = data => get('/xmgl/gouliPkpmModel/list', data); // 配置列表
|
||||
export const addBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/add', data); // 添加新模型
|
||||
export const updateBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/edit', data); // 编辑模型
|
||||
export const deleteBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/delete', data); // 删除模型
|
||||
export const addBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/add', data); // 添加新模型
|
||||
export const updateBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/edit', data); // 编辑模型
|
||||
export const deleteBimBaseUploadApi = data => post('/xmgl/gouliPkpmModel/delete', data); // 删除模型
|
||||
export const startBimBaseApi = data => post('/xmgl/gouliPkpmModel/setEnableMainModel', data); // 启用所对应的bim
|
||||
export const getBimBaseDetailsApi = data => get('/xmgl/gouliPkpmModel/getBimTokenByProjectSn', data); // 通过文件标识获取ViewToken
|
||||
export const getBimBaseDetails = data => get('/xmgl/gouliPkpmModel/queryById', data); // 通过文件标识获取详情
|
||||
@ -70,65 +70,89 @@ export const getBimBaseDetails = data => get('/xmgl/gouliPkpmModel/queryById', d
|
||||
|
||||
//楼栋管理
|
||||
//查询楼栋列表
|
||||
export const queryBuildingList = data => post('/xmgl/massReboundBuild/selectBuildInfoList',data)
|
||||
//查询楼栋名称列表
|
||||
export const getBuildName = data => post('/xmgl/massReboundBuild/getBuildFloorList',data)
|
||||
//根据楼栋查询楼层列表
|
||||
export const getFloorList = data => post('/xmgl/massReboundFloor/selectFloorAndRoomList',data)
|
||||
//通过id查询户型
|
||||
export const queryById = data=>post('/xmgl/houseType/queryById',data)
|
||||
//删除楼栋信息
|
||||
export const deleteBuild = data=>post('/xmgl/massReboundBuild/delete',data)
|
||||
//添加楼栋信息
|
||||
export const addBuild = data=>post('/xmgl/massReboundBuild/addBatchBuildFloor',data)
|
||||
//通过id查询楼栋信息
|
||||
export const buildQueryById=data=>post('/xmgl/massReboundFloor/selectFloorAndRoomList',data)
|
||||
//删除楼层通过id
|
||||
export const deleteFloor = data=>post('/xmgl/massReboundFloor/delete',data)
|
||||
//删除房间信息
|
||||
export const deleteRoom = data=>post('/xmgl/massReboundRoom/delete',data)
|
||||
//添加房间信息
|
||||
export const addRoomInfo = data=>post('/xmgl/massReboundRoom/add',data)
|
||||
//楼栋重命名
|
||||
export const rewriteBuildName = data=>post('/xmgl/massReboundBuild/editBatchName',data)
|
||||
//楼层房间重命名
|
||||
export const rewriteFloorAndRoom = data=>post('/xmgl/massReboundFloor/updateBatchName',data)
|
||||
//查询所有楼栋和房间
|
||||
export const getAllBuildAndRoom = data=>post('xmgl/massReboundBuild/selectBuildAndRoomList',data)
|
||||
//添加楼层信息
|
||||
export const addFloor = data=>post('/xmgl/massReboundFloor/add',data)
|
||||
export const queryBuildingList = data => post('/xmgl/massReboundBuild/selectBuildInfoList', data)
|
||||
//查询楼栋名称列表
|
||||
export const getBuildName = data => post('/xmgl/massReboundBuild/getBuildFloorList', data)
|
||||
//根据楼栋查询楼层列表
|
||||
export const getFloorList = data => post('/xmgl/massReboundFloor/selectFloorAndRoomList', data)
|
||||
//通过id查询户型
|
||||
export const queryById = data => post('/xmgl/houseType/queryById', data)
|
||||
//删除楼栋信息
|
||||
export const deleteBuild = data => post('/xmgl/massReboundBuild/delete', data)
|
||||
//添加楼栋信息
|
||||
export const addBuild = data => post('/xmgl/massReboundBuild/addBatchBuildFloor', data)
|
||||
//通过id查询楼栋信息
|
||||
export const buildQueryById = data => post('/xmgl/massReboundFloor/selectFloorAndRoomList', data)
|
||||
//删除楼层通过id
|
||||
export const deleteFloor = data => post('/xmgl/massReboundFloor/delete', data)
|
||||
//删除房间信息
|
||||
export const deleteRoom = data => post('/xmgl/massReboundRoom/delete', data)
|
||||
//添加房间信息
|
||||
export const addRoomInfo = data => post('/xmgl/massReboundRoom/add', data)
|
||||
//楼栋重命名
|
||||
export const rewriteBuildName = data => post('/xmgl/massReboundBuild/editBatchName', data)
|
||||
//楼层房间重命名
|
||||
export const rewriteFloorAndRoom = data => post('/xmgl/massReboundFloor/updateBatchName', data)
|
||||
//查询所有楼栋和房间
|
||||
export const getAllBuildAndRoom = data => post('xmgl/massReboundBuild/selectBuildAndRoomList', data)
|
||||
//添加楼层信息
|
||||
export const addFloor = data => post('/xmgl/massReboundFloor/add', data)
|
||||
|
||||
|
||||
|
||||
//户型管理
|
||||
//查询户型汇总列表
|
||||
export const getHouseTypeList = data=>post('/xmgl/houseType/selectHouseTypeCountList',data)
|
||||
//查询户型汇总列表
|
||||
export const getHouseTypeInfoList = data=>post('/xmgl/houseType/list',data)
|
||||
//添加户型
|
||||
export const addHouseType = data=>post('/xmgl/houseType/add',data)
|
||||
//删除户型
|
||||
export const deleteHouseType = data=>post('/xmgl/houseType/delete',data)
|
||||
//编辑户型
|
||||
export const editHouseType = data=>post('/xmgl/houseType/edit',data)
|
||||
//绑定户型
|
||||
export const bindAllHouseType = data=>post('/xmgl/massReboundRoom/saveBatchBind',data)
|
||||
//解除户型
|
||||
export const cancelHouseType = data=>post('/xmgl/massReboundRoom/deleteBind',data)
|
||||
//解除全部楼层户型
|
||||
export const cancelFloorType = data=>post('/xmgl/massReboundRoom/deleteFloorBind',data)
|
||||
export const getHouseTypeList = data => post('/xmgl/houseType/selectHouseTypeCountList', data)
|
||||
//查询户型汇总列表
|
||||
export const getHouseTypeInfoList = data => post('/xmgl/houseType/list', data)
|
||||
//添加户型
|
||||
export const addHouseType = data => post('/xmgl/houseType/add', data)
|
||||
//删除户型
|
||||
export const deleteHouseType = data => post('/xmgl/houseType/delete', data)
|
||||
//编辑户型
|
||||
export const editHouseType = data => post('/xmgl/houseType/edit', data)
|
||||
//绑定户型
|
||||
export const bindAllHouseType = data => post('/xmgl/massReboundRoom/saveBatchBind', data)
|
||||
//解除户型
|
||||
export const cancelHouseType = data => post('/xmgl/massReboundRoom/deleteBind', data)
|
||||
//解除全部楼层户型
|
||||
export const cancelFloorType = data => post('/xmgl/massReboundRoom/deleteFloorBind', data)
|
||||
|
||||
|
||||
|
||||
|
||||
//功能间
|
||||
//查询功能间列表
|
||||
export const getFunctionRoomList = data =>post('/xmgl/functionRoom/selectList',data)
|
||||
// //分页查询
|
||||
// export const getPageList = data =>get(`/xmgl/functionRoom/selectPageList?projectSn=${data.projectSn}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`)
|
||||
//分页查询
|
||||
export const getPageList = data =>post('/xmgl/functionRoom/selectPageList',data)
|
||||
//添加功能间
|
||||
export const addFunctionRoom = data =>post('/xmgl/functionRoom/add',data)
|
||||
//删除功能间
|
||||
export const deleteFunctionRoom = data =>post('/xmgl/functionRoom/delete',data)
|
||||
export const getFunctionRoomList = data => post('/xmgl/functionRoom/selectList', data)
|
||||
// //分页查询
|
||||
// export const getPageList = data =>get(`/xmgl/functionRoom/selectPageList?projectSn=${data.projectSn}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`)
|
||||
//分页查询
|
||||
export const getPageList = data => post('/xmgl/functionRoom/selectPageList', data)
|
||||
//添加功能间
|
||||
export const addFunctionRoom = data => post('/xmgl/functionRoom/add', data)
|
||||
//删除功能间
|
||||
export const deleteFunctionRoom = data => post('/xmgl/functionRoom/delete', data)
|
||||
|
||||
// 项目组管理接口
|
||||
// 分页查询项目组列表
|
||||
export const getProjectGroupPage = data => get('/xmgl/projectGroup/page', data);
|
||||
// 通过id查询项目组详情
|
||||
export const getProjectGroupById = data => get('/xmgl/projectGroup/queryById', data);
|
||||
// 添加项目组
|
||||
export const setProjectGroupAdd = data => post('/xmgl/projectGroup/saveObj', data);
|
||||
// 编辑项目组
|
||||
export const setProjectGroupEdit = data => post('/xmgl/projectGroup/edit', data);
|
||||
// 删除项目组
|
||||
export const setProjectGroupDelete = data => post('/xmgl/projectGroup/delete', data);
|
||||
|
||||
// 装置管理接口
|
||||
// 分页查询装置管理列表
|
||||
export const getDeviceUnitPage = data => get('/xmgl/deviceUnit/page', data);
|
||||
// 通过id查询装置详情
|
||||
export const getDeviceUnitById = data => get('/xmgl/deviceUnit/queryById', data);
|
||||
// 添加装置
|
||||
export const setDeviceUnitAdd = data => post('/xmgl/deviceUnit/add', data);
|
||||
// 编辑装置
|
||||
export const setDeviceUnitEdit = data => post('/xmgl/deviceUnit/edit', data);
|
||||
// 删除装置
|
||||
export const setDeviceUnitDelete = data => post('/xmgl/deviceUnit/delete', data);
|
||||
@ -604,6 +604,13 @@ const routes2 = [{
|
||||
component: () =>
|
||||
import ("@/views/projectFront/laborManage/personnelAnalysis.vue"),
|
||||
},
|
||||
//项目基础信息管理--项目组管理
|
||||
{
|
||||
path: "/project/constructionManage/projectTeamManage",
|
||||
name: "项目基础信息管理_项目组管理",
|
||||
component: () =>
|
||||
import ("@/views/projectFront/constructionManage/projectTeamManage.vue"),
|
||||
},
|
||||
// 施工管理
|
||||
//施工管理--装置管理
|
||||
{
|
||||
|
||||
@ -1,18 +1,10 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-form
|
||||
:inline="true"
|
||||
size="medium"
|
||||
:model="searchForm"
|
||||
ref="searchForm"
|
||||
>
|
||||
<el-form-item label="装置/单元工程" prop="workerName">
|
||||
<el-input
|
||||
v-model="searchForm.workerName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
|
||||
<el-form-item label="装置/单元工程" prop="deviceUnitName">
|
||||
<el-input v-model="searchForm.deviceUnitName" :placeholder="$t('message.personnelPosition.please_enter')"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- v-permission="{key: 'renovate', menuPath: '/project/constructionManage/deviceManage'}" -->
|
||||
@ -22,74 +14,30 @@
|
||||
<el-button type="warning" plain @click="resetForm">
|
||||
{{ $t("message.personnelPosition.beaconManage.refresh") }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="addPoint">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="primary" @click="isAddPoint(1)"> 新增 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="pointList">
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="workerName"
|
||||
label="装置/单元工程"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="addTime"
|
||||
label="装置/单元号"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="addTime"
|
||||
label="项目组"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="addTime"
|
||||
label="EPC承包商"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="addReason"
|
||||
label="施工承包商"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('message.personnelPosition.beaconManage.table.operation')"
|
||||
align="center"
|
||||
width="250"
|
||||
>
|
||||
<el-table-column type="index" width="50" align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"></el-table-column>
|
||||
<el-table-column prop="deviceUnitName" label="装置/单元工程" align="center"></el-table-column>
|
||||
<el-table-column prop="deviceUnitNo" label="装置/单元号" align="center"></el-table-column>
|
||||
<el-table-column prop="projectGroupName" label="项目组" align="center"></el-table-column>
|
||||
<el-table-column prop="epcContractorName" label="EPC承包商" align="center"></el-table-column>
|
||||
<el-table-column prop="constructionUnitName" label="施工承包商" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('message.personnelPosition.beaconManage.table.operation')" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div
|
||||
@click="editPoint(scope.row)"
|
||||
class="operationText"
|
||||
>
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
width="15px"
|
||||
height="15px"
|
||||
/>
|
||||
<div @click="isAddPoint(2, scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.edit")
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
@click="removePoint(scope.row)"
|
||||
class="operationText"
|
||||
>
|
||||
<img
|
||||
src="@/assets/images/icon-delete.png"
|
||||
width="15px"
|
||||
height="15px"
|
||||
/>
|
||||
<div @click="removePoint(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.delete")
|
||||
}}</span>
|
||||
@ -99,124 +47,55 @@
|
||||
</el-table-column>
|
||||
<!-- <div slot="empty">{{$t('message.personnelPosition.empty')}}</div> -->
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="Number(total)"
|
||||
background
|
||||
></el-pagination>
|
||||
<el-pagination class="pagerBox" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page="pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="Number(total)" background></el-pagination>
|
||||
</div>
|
||||
<!-- 添加卡片弹框 -->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:title="cardDialogTitle"
|
||||
:visible.sync="cardDialog"
|
||||
width="667px"
|
||||
@close="close"
|
||||
>
|
||||
<el-dialog :modal-append-to-body="false" :title="cardDialogTitle" :visible.sync="cardDialog" width="667px"
|
||||
:before-close="handleClose">
|
||||
<div class="dialog_content">
|
||||
<el-form
|
||||
size="medium"
|
||||
:model="cardForm"
|
||||
ref="cardForm"
|
||||
:rules="cardFormRules"
|
||||
label-width="125px"
|
||||
class="dialogFormBox"
|
||||
>
|
||||
<el-form-item
|
||||
label="装置/单元工程"
|
||||
prop="addReason"
|
||||
>
|
||||
<el-input
|
||||
v-model="cardForm.addReason"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
<el-form size="medium" :model="cardForm" ref="cardForm" :rules="cardFormRules" label-width="125px"
|
||||
class="dialogFormBox">
|
||||
<el-form-item label="装置/单元工程" prop="deviceUnitName">
|
||||
<el-input v-model="cardForm.deviceUnitName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="装置/单元号"
|
||||
prop="addReason"
|
||||
>
|
||||
<el-input
|
||||
v-model="cardForm.addReason"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
<el-form-item label="装置/单元号" prop="deviceUnitNo">
|
||||
<el-input v-model="cardForm.deviceUnitNo"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="项目组"
|
||||
prop="addReason"
|
||||
>
|
||||
<el-input
|
||||
v-model="cardForm.addReason"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="EPC承包商"
|
||||
prop="addReason"
|
||||
>
|
||||
<el-input
|
||||
v-model="cardForm.addReason"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="施工承包商"
|
||||
prop="addReason"
|
||||
>
|
||||
<el-input
|
||||
v-model="cardForm.addReason"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
:label="$t('message.laborDev.addToBlackTime')"
|
||||
prop="addTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="cardForm.addTime"
|
||||
type="date"
|
||||
:placeholder="$t('message.laborMange.pleaseSelectADate')"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('message.laborDev.blackNames')"
|
||||
prop="workerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="cardForm.workerId"
|
||||
:placeholder="$t('message.personnelPosition.please_select')"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
:label="item.workerName"
|
||||
:value="item.id"
|
||||
v-for="(item, index) in allPersonList"
|
||||
:key="index"
|
||||
>
|
||||
<el-form-item label="项目组" prop="projectGroupId">
|
||||
<el-select @change="projectGroupFn" v-model="cardForm.projectGroupId"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.projectGroupName" :value="item.id" v-for="(item, index) in enterpriseTypeList"
|
||||
:key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="EPC承包商" prop="epcContractorId">
|
||||
<el-select @change="epcContractorFn" v-model="cardForm.epcContractorId"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.enterpriseName" :value="item.id" v-for="(item, index) in epcContractorList"
|
||||
:key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="施工承包商" prop="constructionUnitId">
|
||||
<el-select v-model="cardForm.constructionUnitId" :placeholder="$t('message.personnelPosition.please_select')"
|
||||
filterable>
|
||||
<el-option :label="item.enterpriseName" :value="item.id" v-for="(item, index) in constructionUnitList"
|
||||
:key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="cardDialog = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.cancel") }}
|
||||
<el-button class="cancleBtn" @click="handleClose" icon="el-icon-circle-close" size="medium">{{
|
||||
$t("message.personnelPosition.cancel") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="saveCardFn"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.determine") }}
|
||||
<el-button type="primary" icon="el-icon-circle-check" @click="saveCardFn" size="medium">{{
|
||||
$t("message.personnelPosition.determine") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
@ -225,18 +104,21 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getWorkerInfoListApi } from "@/assets/js/api/personnelPosition.js";
|
||||
import {
|
||||
workerBlacklistListApi,
|
||||
workerBlacklistAddApi,
|
||||
workerBlacklistEditApi,
|
||||
workerBlacklistDeleteApi,
|
||||
} from "@/assets/js/api/laborPerson.js";
|
||||
setDeviceUnitAdd,
|
||||
getDeviceUnitPage,
|
||||
getDeviceUnitById,
|
||||
getProjectGroupPage,
|
||||
getProjectGroupById,
|
||||
setDeviceUnitEdit,
|
||||
setDeviceUnitDelete,
|
||||
} from "@/assets/js/api/project";
|
||||
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
workerName: "",
|
||||
deviceUnitName: "",
|
||||
},
|
||||
pointList: [],
|
||||
total: 0,
|
||||
@ -245,30 +127,43 @@ export default {
|
||||
cardDialogTitle: "",
|
||||
cardDialog: false,
|
||||
cardForm: {
|
||||
addReason: "",
|
||||
addTime: "",
|
||||
idCard: "",
|
||||
reason: "",
|
||||
workerId: "",
|
||||
workerName: "",
|
||||
deviceUnitName: "",
|
||||
deviceUnitNo: "",
|
||||
projectGroupId: "",
|
||||
epcContractorId: "",
|
||||
constructionUnitId: "",
|
||||
projectSn: this.$store.state.projectSn,
|
||||
},
|
||||
cardFormRules: {
|
||||
addReason: [
|
||||
deviceUnitName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
addTime: [
|
||||
deviceUnitNo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
projectGroupId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
workerId: [
|
||||
epcContractorId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
constructionUnitId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
@ -276,56 +171,55 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
isAdd: false,
|
||||
allPersonList: [],
|
||||
isAdd: -1,
|
||||
enterpriseTypeList: [], // 项目组
|
||||
cooperatorList: [], // 所有企业信息
|
||||
projectGroupUnitList: [], // 项目组下的所有承包商
|
||||
epcContractorList: [], // 当前项目组下的承包商
|
||||
constructionUnitList: [], // 当前epc承包商下的施工承包商
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadAllPerson();
|
||||
this.loadCardData();
|
||||
this.getCooperatorList();
|
||||
},
|
||||
methods: {
|
||||
//获取所有人员
|
||||
loadAllPerson() {
|
||||
getWorkerInfoListApi({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
||||
}).then((res) => {
|
||||
this.allPersonList = res.result;
|
||||
});
|
||||
},
|
||||
addPoint(event) {
|
||||
this.isAdd = true;
|
||||
this.cardDialog = true;
|
||||
this.cardForm = {
|
||||
addReason: "",
|
||||
addTime: "",
|
||||
idCard: "",
|
||||
reason: "",
|
||||
workerId: "",
|
||||
workerName: "",
|
||||
projectSn: this.$store.state.projectSn,
|
||||
};
|
||||
this.cardDialogTitle = this.$t("message.laborDev.add2");
|
||||
},
|
||||
editPoint(item) {
|
||||
this.isAdd = false;
|
||||
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //编辑卡片
|
||||
this.cardForm = JSON.parse(JSON.stringify(item));
|
||||
isAddPoint(type, item) {
|
||||
this.isAdd = type;
|
||||
if (type == 1) {
|
||||
this.cardForm = {
|
||||
deviceUnitName: "",
|
||||
deviceUnitNo: "",
|
||||
projectGroupId: "",
|
||||
epcContractorId: "",
|
||||
constructionUnitId: "",
|
||||
projectSn: this.$store.state.projectSn,
|
||||
};
|
||||
this.cardDialogTitle = this.$t("message.laborDev.add2");
|
||||
} else if (type == 2) {
|
||||
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //编辑卡片
|
||||
console.log(item);
|
||||
this.cardForm = {
|
||||
...item,
|
||||
};
|
||||
this.projectGroupFn(2);
|
||||
}
|
||||
|
||||
this.cardDialog = true;
|
||||
},
|
||||
removePoint(item) {
|
||||
this.$confirm(
|
||||
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
|
||||
"【" +
|
||||
item.workerName +
|
||||
"】?",
|
||||
"【" +
|
||||
item.deviceUnitName +
|
||||
"】?",
|
||||
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
).then(() => {
|
||||
workerBlacklistDeleteApi({ id: item.id }).then((res) => {
|
||||
setDeviceUnitDelete({ id: item.id }).then((res) => {
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.delete_success")
|
||||
@ -335,12 +229,11 @@ export default {
|
||||
},
|
||||
//获取卡片列表
|
||||
loadCardData() {
|
||||
workerBlacklistListApi({
|
||||
getDeviceUnitPage({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
workerName: this.searchForm.workerName,
|
||||
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
|
||||
deviceUnitName: this.searchForm.deviceUnitName,
|
||||
}).then((res) => {
|
||||
this.pointList = res.result.records;
|
||||
this.total = res.result.total;
|
||||
@ -350,17 +243,17 @@ export default {
|
||||
saveCardFn() {
|
||||
this.$refs["cardForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.isAdd) {
|
||||
if (this.isAdd == 1) {
|
||||
// this.cardForm.floorId = this.currentFloorDetail.floorId
|
||||
workerBlacklistAddApi(this.cardForm).then((res) => {
|
||||
setDeviceUnitAdd(this.cardForm).then((res) => {
|
||||
this.cardDialog = false;
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.add_success")
|
||||
); //添加成功!
|
||||
});
|
||||
} else {
|
||||
workerBlacklistEditApi(this.cardForm).then((res) => {
|
||||
} else if (this.isAdd == 2) {
|
||||
setDeviceUnitEdit(this.cardForm).then((res) => {
|
||||
this.cardDialog = false;
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
@ -389,9 +282,79 @@ export default {
|
||||
this.pageNo = val;
|
||||
this.loadCardData();
|
||||
},
|
||||
close() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.cardForm.clearValidate();
|
||||
// 关闭前执行
|
||||
handleClose(done) {
|
||||
this.$refs["cardForm"].resetFields();
|
||||
this.epcContractorList = [];
|
||||
this.constructionUnitList = [];
|
||||
this.cardDialog = false;
|
||||
},
|
||||
//获取监理单位
|
||||
loadAllPerson() {
|
||||
// getEnterpriseTypeList
|
||||
getProjectGroupPage({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: 1,
|
||||
pageSize: -1,
|
||||
}).then((res) => {
|
||||
this.enterpriseTypeList = res.result.records;
|
||||
});
|
||||
},
|
||||
// 项目组承包商信息
|
||||
projectGroupFn(type) {
|
||||
if(type != 2) {
|
||||
this.cardForm.epcContractorId = "";
|
||||
this.cardForm.constructionUnitId = "";
|
||||
}
|
||||
getProjectGroupById({
|
||||
id: this.cardForm.projectGroupId,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.projectGroupUnitList = res.result.projectGroupUnitList;
|
||||
this.epcContractorList = this.cooperatorList.reduce((prev, item) => {
|
||||
const findIndex = res.result.projectGroupUnitList.findIndex(
|
||||
(ele) => ele.epcContractorId == item.id
|
||||
);
|
||||
if (findIndex > -1) {
|
||||
prev.push(item);
|
||||
}
|
||||
return prev;
|
||||
}, []);
|
||||
console.log(1111, this.epcContractorList)
|
||||
if(type == 2) {
|
||||
this.epcContractorFn(2);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
epcContractorFn(type) {
|
||||
if(type != 2) {
|
||||
this.cardForm.constructionUnitId = "";
|
||||
}
|
||||
this.constructionUnitList = this.cooperatorList.reduce((prev, item) => {
|
||||
const findIndex = this.projectGroupUnitList.filter(ele => this.cardForm.epcContractorId == ele.epcContractorId).findIndex(
|
||||
(ele) => ele.constructionUnitIds.includes(item.id)
|
||||
);
|
||||
if (findIndex > -1) {
|
||||
prev.push(item);
|
||||
}
|
||||
return prev;
|
||||
}, []);
|
||||
console.log(this.constructionUnitList);
|
||||
},
|
||||
//获取列表数据
|
||||
getCooperatorList() {
|
||||
let data = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: 1,
|
||||
pageSize: -1,
|
||||
// enterpriseTypeId: this.enterpriseTypeSelectId,
|
||||
};
|
||||
getCooperatorListApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.cooperatorList = res.result.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
407
src/views/projectFront/constructionManage/projectTeamManage.vue
Normal file
407
src/views/projectFront/constructionManage/projectTeamManage.vue
Normal file
@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
|
||||
<el-form-item label="项目组名称" prop="projectGroupName">
|
||||
<el-input v-model="searchForm.projectGroupName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- v-permission="{key: 'renovate', menuPath: '/project/constructionManage/deviceManage'}" -->
|
||||
<el-button type="primary" plain @click="loadCardData">
|
||||
{{ $t("message.personnelPosition.beaconManage.query") }}
|
||||
</el-button>
|
||||
<el-button type="warning" plain @click="resetForm">
|
||||
{{ $t("message.personnelPosition.beaconManage.refresh") }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="isAddPoint(1)"> 新增 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="projectGroupList">
|
||||
<el-table-column type="index" width="50" align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"></el-table-column>
|
||||
<el-table-column prop="projectGroupName" label="项目组名称" align="center"></el-table-column>
|
||||
<el-table-column prop="supervisingUnitName" label="监理单位" align="center"></el-table-column>
|
||||
<el-table-column prop="epcContractorName" label="EPC承包商" align="center"></el-table-column>
|
||||
<el-table-column prop="constructionUnitNames" label="施工单位" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('message.personnelPosition.beaconManage.table.operation')" align="center"
|
||||
width="250">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="isAddPoint(2, scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.edit")
|
||||
}}</span>
|
||||
</div>
|
||||
<div @click="removePoint(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span>{{
|
||||
$t("message.personnelPosition.beaconManage.table.delete")
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <div slot="empty">{{$t('message.personnelPosition.empty')}}</div> -->
|
||||
</el-table>
|
||||
<el-pagination class="pagerBox" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page="pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="Number(total)" background></el-pagination>
|
||||
</div>
|
||||
<!-- 添加卡片弹框 -->
|
||||
<el-dialog :modal-append-to-body="false" :title="cardDialogTitle" :visible.sync="cardDialog" width="667px"
|
||||
@close="close">
|
||||
<div class="dialog_content">
|
||||
<el-form size="medium" :model="cardForm" ref="cardForm" :rules="cardFormRules" label-width="125px"
|
||||
class="dialogFormBox">
|
||||
<el-form-item label="项目组名称" prop="projectGroupName">
|
||||
<el-input v-model="cardForm.projectGroupName"
|
||||
:placeholder="$t('message.personnelPosition.please_enter')"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div class="projectTeam" v-for="(ele, index) in cardForm.projectGroupUnitList" :key="ele.id">
|
||||
<i @click="deleteProjectTeam(ele)" class="el-icon-circle-close"></i>
|
||||
<el-form-item label="监理单位" :prop="`projectGroupUnitList[${index}].supervisingUnitId`"
|
||||
:rules="cardFormRules.supervisingUnitId">
|
||||
<el-select v-model="ele.supervisingUnitId"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.enterpriseName" :value="item.id"
|
||||
v-for="(item, index) in enterpriseTypeList" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="EPC承包商" prop="epcContractorId"
|
||||
:prop="`projectGroupUnitList[${index}].epcContractorId`" :rules="cardFormRules.epcContractorId">
|
||||
<el-select v-model="ele.epcContractorId"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.enterpriseName" :value="item.id"
|
||||
v-for="(item, index) in cooperatorList" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="施工单位" prop="constructionUnitIds"
|
||||
:prop="`projectGroupUnitList[${index}].constructionUnitIds`"
|
||||
:rules="cardFormRules.constructionUnitIds">
|
||||
<el-select :blur="clearValidateUnit(index, 'constructionUnitIds')" multiple
|
||||
v-model="ele.constructionUnitIds"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.enterpriseName" :value="item.id"
|
||||
v-for="(item, index) in cooperatorList" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="dialog-add">
|
||||
<el-button type="primary" @click="addProjectTeam" icon="el-icon-plus">新增</el-button>
|
||||
</div>
|
||||
<div class="dialog-footer">
|
||||
<el-button class="cancleBtn" @click="cardDialog = false" icon="el-icon-circle-close"
|
||||
size="medium">{{ $t("message.personnelPosition.cancel") }}
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-check" @click="saveCardFn" size="medium">{{
|
||||
$t("message.personnelPosition.determine") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getEnterpriseTypeList,
|
||||
} from '@/assets/js/api/laborPerson'
|
||||
import {
|
||||
getCooperatorListApi
|
||||
} from '@/assets/js/api/cooperationUnit'
|
||||
import {
|
||||
setProjectGroupAdd,
|
||||
getProjectGroupPage,
|
||||
getProjectGroupById,
|
||||
setProjectGroupEdit,
|
||||
setProjectGroupDelete,
|
||||
} from '@/assets/js/api/project'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
projectGroupName: "",
|
||||
},
|
||||
projectGroupList: [],
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
cardDialogTitle: "",
|
||||
cardDialog: false,
|
||||
cardFormRules: {
|
||||
projectGroupName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
supervisingUnitId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
epcContractorId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
constructionUnitIds: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.personnelPosition.mandatory"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
isAdd: -1,
|
||||
enterpriseTypeList: [],
|
||||
cooperatorList: [],
|
||||
// 项目组
|
||||
cardForm: {
|
||||
projectGroupName: "",
|
||||
projectGroupUnitList: [],
|
||||
projectSn: this.$store.state.projectSn,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadAllPerson();
|
||||
this.loadCardData();
|
||||
this.getCooperatorList();
|
||||
},
|
||||
methods: {
|
||||
// 校验施工单位
|
||||
clearValidateUnit(index, unitName) {
|
||||
if (this.cardForm.projectGroupUnitList[index].constructionUnitIds.length == 0) return;
|
||||
this.$refs.cardForm.clearValidate(`projectGroupUnitList[${index}].${unitName}`);
|
||||
},
|
||||
// 添加
|
||||
addProjectTeam() {
|
||||
// const every = this.cardForm.projectGroupUnitList.every((item) => {
|
||||
// return item.supervisingUnitId != "" && item.epcContractorId != "" && item.constructionUnitIds != "";
|
||||
// });
|
||||
// if(!every) {
|
||||
// this.$message.error("请填写完整信息才能添加!");
|
||||
// return
|
||||
// }
|
||||
this.cardForm.projectGroupUnitList.push({
|
||||
id: Date.now(),
|
||||
supervisingUnitId: "",
|
||||
epcContractorId: "",
|
||||
constructionUnitIds: [],
|
||||
});
|
||||
},
|
||||
deleteProjectTeam(row) {
|
||||
const findIndex = this.cardForm.projectGroupUnitList.findIndex(item => item.id == row.id);
|
||||
if (findIndex > -1) {
|
||||
this.cardForm.projectGroupUnitList.splice(findIndex, 1);
|
||||
}
|
||||
},
|
||||
isAddPoint(type, item) {
|
||||
this.isAdd = type;
|
||||
if (type == 1) {
|
||||
this.cardForm = {
|
||||
projectGroupName: "",
|
||||
projectGroupUnitList: [
|
||||
{
|
||||
id: Date.now(),
|
||||
supervisingUnitId: "",
|
||||
epcContractorId: "",
|
||||
constructionUnitIds: [],
|
||||
},
|
||||
],
|
||||
projectSn: this.$store.state.projectSn,
|
||||
};
|
||||
this.cardDialogTitle = this.$t("message.laborDev.add2");
|
||||
} else if (type == 2) {
|
||||
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //编辑卡片
|
||||
// this.cardForm = JSON.parse(JSON.stringify(item));
|
||||
getProjectGroupById({
|
||||
id: item.id,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.cardForm = {
|
||||
...res.result,
|
||||
projectGroupUnitList: res.result.projectGroupUnitList.map(item => {
|
||||
return {
|
||||
...item,
|
||||
constructionUnitIds: item.constructionUnitIds.split(","),
|
||||
}
|
||||
}),
|
||||
};
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.cardDialog = true;
|
||||
},
|
||||
removePoint(item) {
|
||||
this.$confirm(
|
||||
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
|
||||
"【" +
|
||||
item.projectGroupName +
|
||||
"】?",
|
||||
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
).then(() => {
|
||||
setProjectGroupDelete({ id: item.id }).then((res) => {
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.delete_success")
|
||||
); //删除成功!
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取卡片列表
|
||||
loadCardData() {
|
||||
getProjectGroupPage({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
projectGroupName: this.searchForm.projectGroupName,
|
||||
}).then((res) => {
|
||||
this.projectGroupList = res.result.records;
|
||||
this.total = res.result.total;
|
||||
});
|
||||
},
|
||||
//添加或编辑卡片
|
||||
saveCardFn() {
|
||||
this.$refs["cardForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
const result = this.cardForm.projectGroupUnitList.map(item => {
|
||||
return {
|
||||
...item,
|
||||
constructionUnitIds: item.constructionUnitIds.join(","),
|
||||
}
|
||||
})
|
||||
if (this.isAdd == 1) {
|
||||
// this.cardForm.floorId = this.currentFloorDetail.floorId
|
||||
setProjectGroupAdd({
|
||||
projectGroupName: this.cardForm.projectGroupName,
|
||||
projectGroupUnitList: result,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((res) => {
|
||||
this.cardDialog = false;
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.add_success")
|
||||
); //添加成功!
|
||||
});
|
||||
} else if (this.isAdd == 2) {
|
||||
setProjectGroupEdit({
|
||||
...this.cardForm,
|
||||
projectGroupUnitList: result,
|
||||
}).then((res) => {
|
||||
this.cardDialog = false;
|
||||
this.loadCardData();
|
||||
this.$message.success(
|
||||
this.$t("message.personnelPosition.edit_success")
|
||||
); //编辑成功!
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs["searchForm"].resetFields();
|
||||
this.loadCardData();
|
||||
},
|
||||
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
this.loadCardData();
|
||||
},
|
||||
//查看页
|
||||
handleCurrentChange(val) {
|
||||
this.pageNo = val;
|
||||
this.loadCardData();
|
||||
},
|
||||
close() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.cardForm.clearValidate();
|
||||
});
|
||||
},
|
||||
//获取监理单位
|
||||
loadAllPerson() {
|
||||
// getEnterpriseTypeList
|
||||
getCooperatorListApi({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: 1,
|
||||
pageSize: -1,
|
||||
enterpriseTypeId: 7,
|
||||
}).then((res) => {
|
||||
this.enterpriseTypeList = res.result.records;
|
||||
});
|
||||
},
|
||||
//获取列表数据
|
||||
getCooperatorList() {
|
||||
let data = {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
pageNo: 1,
|
||||
pageSize: -1,
|
||||
// enterpriseTypeId: this.enterpriseTypeSelectId,
|
||||
}
|
||||
getCooperatorListApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.cooperatorList = res.result.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.projectTeam:not(:first-child) {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.projectTeam {
|
||||
width: 475px;
|
||||
background-color: #F4F4F5;
|
||||
padding: 20px 0 1px;
|
||||
position: relative;
|
||||
|
||||
.el-icon-circle-close {
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
color: #F56C6C;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-add {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
|
||||
/deep/ .el-button {
|
||||
background-color: transparent;
|
||||
color: #b3b3b3;
|
||||
border-color: #b3b3b3;
|
||||
border-style: dashed;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user