Commit 64b0ee3a authored by wanghao's avatar wanghao

1 第三方施工-项目档案 详情页展示调整

parent 0082962d
...@@ -74,6 +74,18 @@ public class TEnterpriseInfoController extends BaseController ...@@ -74,6 +74,18 @@ public class TEnterpriseInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*无条件查询所有企业
* @return
*/
@GetMapping("/queryAllEnterprise")
public List<TEnterpriseInfo> queryAllEnterprise()
{
//获取用户信息
return tEnterpriseInfoService.queryAllEnterprise();
}
/** /**
*查询所有企业信息 *查询所有企业信息
* @param tEnterpriseInfo * @param tEnterpriseInfo
......
...@@ -35,6 +35,12 @@ public interface TEnterpriseInfoMapper ...@@ -35,6 +35,12 @@ public interface TEnterpriseInfoMapper
*/ */
public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo); public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo);
/**
* 无条件查询所有企业
* @return r
*/
public List<TEnterpriseInfo> queryAllEnterprise();
/** /**
* 新增企业信息 * 新增企业信息
* *
......
...@@ -30,6 +30,11 @@ public interface ITEnterpriseInfoService ...@@ -30,6 +30,11 @@ public interface ITEnterpriseInfoService
*/ */
public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo); public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo);
/**
* 无条件查询所有企业
*/
public List<TEnterpriseInfo> queryAllEnterprise();
/** /**
* 新增企业信息 * 新增企业信息
* *
......
...@@ -76,6 +76,16 @@ public class TEnterpriseInfoServiceImpl implements ITEnterpriseInfoService ...@@ -76,6 +76,16 @@ public class TEnterpriseInfoServiceImpl implements ITEnterpriseInfoService
return tEnterpriseInfoMapper.selectTEnterpriseInfoList(tEnterpriseInfo); return tEnterpriseInfoMapper.selectTEnterpriseInfoList(tEnterpriseInfo);
} }
/**
* 无条件查询所有企业
* @return re
*/
@Override
public List<TEnterpriseInfo> queryAllEnterprise() {
return tEnterpriseInfoMapper.queryAllEnterprise();
}
/** /**
* 新增企业信息 * 新增企业信息
* *
......
...@@ -52,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by enterprise_id desc order by enterprise_id desc
</select> </select>
<select id="queryAllEnterprise" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/>
</select>
<select id="selectTEnterpriseInfoById" parameterType="String" resultMap="TEnterpriseInfoResult"> <select id="selectTEnterpriseInfoById" parameterType="String" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/> <include refid="selectTEnterpriseInfoVo"/>
......
...@@ -19,6 +19,14 @@ export function enterpriseLists(query) { ...@@ -19,6 +19,14 @@ export function enterpriseLists(query) {
} }
// 无条件查询企业所有信息
export function queryAllEnterprise() {
return request({
url: '/regulation/info/queryAllEnterprise',
method: 'get',
})
}
// 查询企业信息详细 // 查询企业信息详细
export function getInfo(enterpriseId) { export function getInfo(enterpriseId) {
......
...@@ -257,37 +257,55 @@ ...@@ -257,37 +257,55 @@
<script> <script>
import { getInfor } from "@/api/thirdbuild/project"; import { getInfor } from "@/api/thirdbuild/project";
import { enterpriseLists } from "@/api/regulation/info"; import { enterpriseLists ,queryAllEnterprise} from "@/api/regulation/info";
import { getDefaultCountyList } from "@/api/area/county";
export default { export default {
name: "detail-info", name: "detail-info",
data(){ data(){
return{ return{
enterprises: [],
countyInfo: [],
enterpriseName:"", enterpriseName:"",
detailInfo: {}, detailInfo: {},
detailOpen: false detailOpen: false
} }
}, },
created() { created() {
this.getCountyInfo();
this.getEnterpriseLists(); this.getEnterpriseLists();
}, },
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.fDistrictId);
return info?info.fName:"-";
},
beyondCompanyFormat(row){
let info = this.enterprises.find(item => item.enterpriseId == row.fCompanyInfoId);
return info?info.enterpriseName:"-";
},
//所属单位 //所属单位
getEnterpriseLists(){ getEnterpriseLists(){
const param = {}; queryAllEnterprise().then(response => {
enterpriseLists(param).then(response => { this.enterprises = response;
if (response.rows.length>1){
this.enterprises = response.rows;
this.enterpriseName = response.rows[0].enterpriseName;
}else {
this.enterprises = response.rows;
this.enterpriseName = response.rows[0].enterpriseName;
}
}); });
}, },
getDetailInfo(id){ getDetailInfo(id){
getInfor(id).then(res =>{ getInfor(id).then(res =>{
if(res.code == 200 && res.data){ if(res.code == 200 && res.data){
this.detailInfo = res.data; this.detailInfo = res.data;
this.detailInfo.fDistrictId = this.beyondCountyFormat(this.detailInfo);
let companyInfoId = this.detailInfo.fCompanyInfoId;
if (companyInfoId != null) {
this.enterpriseName= this.beyondCompanyFormat(this.detailInfo);
}
this.detailOpen = true; this.detailOpen = true;
} }
}) })
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="180px"> <el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-row class="el-row-table"> <el-row class="el-row-table">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="燃气企业" prop="fEnterpriseId"> <el-form-item label="燃气企业" prop="fCompanyInfoId">
<el-input v-model="enterpriseName" :disabled="true"></el-input> <el-input v-model="enterpriseName" :disabled="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -496,6 +496,7 @@ export default { ...@@ -496,6 +496,7 @@ export default {
data() { data() {
return { return {
enterpriseName:"", enterpriseName:"",
enterprises: [],
user:{}, user:{},
countyInfo: [], countyInfo: [],
// 遮罩层 // 遮罩层
...@@ -591,12 +592,12 @@ export default { ...@@ -591,12 +592,12 @@ export default {
enterpriseLists(param).then(response => { enterpriseLists(param).then(response => {
if (response.rows.length>1){ if (response.rows.length>1){
this.enterprises = response.rows; this.enterprises = response.rows;
this.form.fEnterpriseId=response.rows[0].enterpriseId;
this.enterpriseName = response.rows[0].enterpriseName; this.enterpriseName = response.rows[0].enterpriseName;
console.log("this.form.fCompanyInfoId = " + this.form.fCompanyInfoId);
}else { }else {
this.enterprises = response.rows; this.enterprises = response.rows;
this.form.fEnterpriseId=response.rows[0].enterpriseId;
this.enterpriseName = response.rows[0].enterpriseName; this.enterpriseName = response.rows[0].enterpriseName;
console.log("this.form.fCompanyInfoId = " + this.form.fCompanyInfoId);
} }
}); });
}, },
...@@ -698,7 +699,8 @@ export default { ...@@ -698,7 +699,8 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加涉气第三方施工项目档案"; this.title = "添加涉气第三方施工项目档案";
this.formData.operator_id = this.operatorLists[0].id console.log("this.form.fCompanyInfoId = ");
console.log("this.form.fCompanyInfoId = " + this.form.fCompanyInfoId);
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -751,6 +753,7 @@ export default { ...@@ -751,6 +753,7 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.form.fCompanyInfoId=this.enterprises[0].enterpriseId;
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.fConGasProInforId != null) { if (this.form.fConGasProInforId != null) {
......
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