Commit 68628511 authored by zhangjianqian's avatar zhangjianqian

企业政府角色增删改权限,企业列表,行政区列表

parent 11150222
...@@ -103,7 +103,17 @@ public class TPipeOldPlanProcess extends BaseEntity ...@@ -103,7 +103,17 @@ public class TPipeOldPlanProcess extends BaseEntity
@Excel(name = "上传时间") @Excel(name = "上传时间")
private String fUploadTime; private String fUploadTime;
public void setfOldPlanProcessId(Long fOldPlanProcessId) private Long fEnterpriseId;
public Long getfEnterpriseId() {
return fEnterpriseId;
}
public void setfEnterpriseId(Long fEnterpriseId) {
this.fEnterpriseId = fEnterpriseId;
}
public void setfOldPlanProcessId(Long fOldPlanProcessId)
{ {
this.fOldPlanProcessId = fOldPlanProcessId; this.fOldPlanProcessId = fOldPlanProcessId;
} }
......
...@@ -26,10 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,10 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fFundsDisbursementProgress" column="f_funds_disbursement_progress" /> <result property="fFundsDisbursementProgress" column="f_funds_disbursement_progress" />
<result property="fUploadType" column="f_upload_type" /> <result property="fUploadType" column="f_upload_type" />
<result property="fUploadTime" column="f_upload_time" /> <result property="fUploadTime" column="f_upload_time" />
<result property="fEnterpriseId" column="f_enterprise_id" />
</resultMap> </resultMap>
<sql id="selectTPipeOldPlanProcessVo"> <sql id="selectTPipeOldPlanProcessVo">
select f_old_plan_process_id, f_uuid, f_ent_uuid, f_region, f_project_name, f_relation_object_type, f_year, f_start_time, f_end_time, f_total_investment, f_create_time, f_update_time, f_subject_implementation, f_concat_person, f_concat_tel, f_construction_content, f_actual_finish_time, f_reconstruction_progress, f_funds_disbursement_progress, f_upload_type, f_upload_time from t_pipe_old_plan_process select f_old_plan_process_id, f_uuid, f_enterprise_id,f_ent_uuid, f_region, f_project_name, f_relation_object_type, f_year, f_start_time, f_end_time, f_total_investment, f_create_time, f_update_time, f_subject_implementation, f_concat_person, f_concat_tel, f_construction_content, f_actual_finish_time, f_reconstruction_progress, f_funds_disbursement_progress, f_upload_type, f_upload_time from t_pipe_old_plan_process
</sql> </sql>
<select id="selectTPipeOldPlanProcessList" parameterType="TPipeOldPlanProcess" resultMap="TPipeOldPlanProcessResult"> <select id="selectTPipeOldPlanProcessList" parameterType="TPipeOldPlanProcess" resultMap="TPipeOldPlanProcessResult">
...@@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress,</if> <if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress,</if>
<if test="fUploadType != null">f_upload_type,</if> <if test="fUploadType != null">f_upload_type,</if>
<if test="fUploadTime != null">f_upload_time,</if> <if test="fUploadTime != null">f_upload_time,</if>
<if test="fEnterpriseId != null">f_enterprise_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fUuid != null and fUuid != ''">#{fUuid},</if> <if test="fUuid != null and fUuid != ''">#{fUuid},</if>
...@@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fFundsDisbursementProgress != null">#{fFundsDisbursementProgress},</if> <if test="fFundsDisbursementProgress != null">#{fFundsDisbursementProgress},</if>
<if test="fUploadType != null">#{fUploadType},</if> <if test="fUploadType != null">#{fUploadType},</if>
<if test="fUploadTime != null">#{fUploadTime},</if> <if test="fUploadTime != null">#{fUploadTime},</if>
<if test="fEnterpriseId != null">#{fEnterpriseId},</if>
</trim> </trim>
</insert> </insert>
...@@ -120,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -120,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress = #{fFundsDisbursementProgress},</if> <if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress = #{fFundsDisbursementProgress},</if>
<if test="fUploadType != null">f_upload_type = #{fUploadType},</if> <if test="fUploadType != null">f_upload_type = #{fUploadType},</if>
<if test="fUploadTime != null">f_upload_time = #{fUploadTime},</if> <if test="fUploadTime != null">f_upload_time = #{fUploadTime},</if>
<if test="fEnterpriseId != null">f_enterprise_id = #{fEnterpriseId},</if>
</trim> </trim>
where f_old_plan_process_id = #{fOldPlanProcessId} where f_old_plan_process_id = #{fOldPlanProcessId}
</update> </update>
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-if="user.roleId==1||user.roleId==5"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-if="user.roleId==1||user.roleId==5"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -78,6 +80,7 @@ ...@@ -78,6 +80,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-if="user.roleId==1||user.roleId==5"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -96,12 +99,7 @@ ...@@ -96,12 +99,7 @@
<el-table v-loading="loading" :data="processList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="processList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="项目名称" align="center" prop="fProjectName" /> <el-table-column label="项目名称" align="center" prop="fProjectName" />
<el-table-column label="县级行政区" align="center" prop="fRegion"> <el-table-column label="县级行政区" align="center" prop="fRegion" :formatter="beyondCountyFormat"></el-table-column>
<template slot-scope="scope">
<span v-if="scope.row.fRegion != null">{{ scope.row.fRegion }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="关联对象类型" align="center" prop="fRelationObjectType" :formatter="fRelationObjectTypeFormat" /> <el-table-column label="关联对象类型" align="center" prop="fRelationObjectType" :formatter="fRelationObjectTypeFormat" />
<el-table-column label="年度" align="center" prop="fYear"> <el-table-column label="年度" align="center" prop="fYear">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -159,12 +157,14 @@ ...@@ -159,12 +157,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-if="user.roleId==1||user.roleId==5"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-if="(user.roleId==1||user.roleId==5)&&scope.row.fUploadType==0"
>删除</el-button> >删除</el-button>
<el-button <el-button
size="mini" size="mini"
...@@ -195,14 +195,37 @@ ...@@ -195,14 +195,37 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="燃气企业编码" prop="fEntUuid"> <el-form-item label="燃气企业" prop="beyondEnterpriseId">
<el-input v-model="form.fEntUuid" placeholder="请输入燃气企业编码" /> <el-select v-model="form.fEnterpriseId" placeholder="请选择所属企业名称" style="width: 100%" >
<el-option
v-for="item in enterprises"
:key="parseInt(item.enterpriseId)"
:label="item.enterpriseName"
:value="parseInt(item.enterpriseId)">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<!--<el-form-item label="燃气企业编码" prop="fEntUuid">-->
<!--<el-input v-model="form.fEntUuid" placeholder="请输入燃气企业编码" />-->
<!--</el-form-item>-->
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目所在县级行政区ID" prop="fRegion">
<el-input v-model="form.fRegion" placeholder="请输入项目所在县级行政区ID" /> <el-form-item label="项目所在县级行政区" prop="fRegion">
<el-select
v-model="form.fRegion"
placeholder="请选择县级行政区"
style="width: 100%"
>
<el-option
v-for="county in countyInfo"
:key="county.fId"
:label="county.fName.trim()"
:value="county.fId"
/>
</el-select>
<!--<el-input v-model="form.fRegion" placeholder="请输入项目所在县级行政区ID" />-->
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -326,6 +349,11 @@ ...@@ -326,6 +349,11 @@
<script> <script>
import { listProcess, getProcess, delProcess, addProcess, updateProcess, exportProcess } from "@/api/oldpipesystem/process"; import { listProcess, getProcess, delProcess, addProcess, updateProcess, exportProcess } from "@/api/oldpipesystem/process";
import DetailInfo from "./components/DetailInfo"; import DetailInfo from "./components/DetailInfo";
import{getInfo} from "@/api/login"
import { enterpriseLists } from "@/api/regulation/info";
import { getDefaultCountyList } from "@/api/area/county";
"/";
export default { export default {
name: "Process", name: "Process",
components: { components: {
...@@ -333,6 +361,9 @@ export default { ...@@ -333,6 +361,9 @@ export default {
}, },
data() { data() {
return { return {
user:{},
enterprises: [],
countyInfo: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -389,11 +420,51 @@ export default { ...@@ -389,11 +420,51 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getuserInfo();
this.getDicts("t_relation_object_type").then(response => { this.getDicts("t_relation_object_type").then(response => {
this.fRelationObjectTypeOptions = response.data; this.fRelationObjectTypeOptions = response.data;
}); });
this.getEnterpriseLists();
this.getCountyInfo();
}, },
methods: { methods: {
//获取县级
getCountyInfo(){
getDefaultCountyList().then(res =>{
if(res.code == 200 && res.data){
this.countyInfo = res.data;
}
})
},
beyondCountyFormat(row){
let info = this.countyInfo.find(item => item.fId == row.fRegion);
return info?info.fName:"-";
},
getuserInfo(){
getInfo().then(response => {
console.log(response);
this.user = response.user.roles[0]
});
},
//所属单位
getEnterpriseLists(){
const param = {};
// this.judgeOperateType(param);
enterpriseLists(param).then(response => {
if (response.rows.length>1){
this.enterprises = response.rows;
}else {
this.form.fEnterpriseId=response.rows[0].enterpriseId;
this.enterprises = response.rows;
}
});
console.log(this.enterprises)
},
beyondEnterpriseFormat(row){
let info = this.enterprises.find(item => item.enterpriseId == row.beyondEnterpriseId);
return info?info.enterpriseName:"-";
},
/** 查询老旧管网改造计划列表 */ /** 查询老旧管网改造计划列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment