Commit 64b0ee3a authored by wanghao's avatar wanghao

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

parent 0082962d
......@@ -74,6 +74,18 @@ public class TEnterpriseInfoController extends BaseController
return getDataTable(list);
}
/**
*无条件查询所有企业
* @return
*/
@GetMapping("/queryAllEnterprise")
public List<TEnterpriseInfo> queryAllEnterprise()
{
//获取用户信息
return tEnterpriseInfoService.queryAllEnterprise();
}
/**
*查询所有企业信息
* @param tEnterpriseInfo
......
......@@ -35,6 +35,12 @@ public interface TEnterpriseInfoMapper
*/
public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo);
/**
* 无条件查询所有企业
* @return r
*/
public List<TEnterpriseInfo> queryAllEnterprise();
/**
* 新增企业信息
*
......
......@@ -30,6 +30,11 @@ public interface ITEnterpriseInfoService
*/
public List<TEnterpriseInfo> selectTEnterpriseInfoList(TEnterpriseInfo tEnterpriseInfo);
/**
* 无条件查询所有企业
*/
public List<TEnterpriseInfo> queryAllEnterprise();
/**
* 新增企业信息
*
......
......@@ -76,6 +76,16 @@ public class TEnterpriseInfoServiceImpl implements ITEnterpriseInfoService
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"
</where>
order by enterprise_id desc
</select>
<select id="queryAllEnterprise" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/>
</select>
<select id="selectTEnterpriseInfoById" parameterType="String" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/>
......
......@@ -19,6 +19,14 @@ export function enterpriseLists(query) {
}
// 无条件查询企业所有信息
export function queryAllEnterprise() {
return request({
url: '/regulation/info/queryAllEnterprise',
method: 'get',
})
}
// 查询企业信息详细
export function getInfo(enterpriseId) {
......
......@@ -257,37 +257,55 @@
<script>
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 {
name: "detail-info",
data(){
return{
enterprises: [],
countyInfo: [],
enterpriseName:"",
detailInfo: {},
detailOpen: false
}
},
created() {
this.getCountyInfo();
this.getEnterpriseLists();
},
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(){
const param = {};
enterpriseLists(param).then(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;
}
queryAllEnterprise().then(response => {
this.enterprises = response;
});
},
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && 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;
}
})
......
......@@ -144,7 +144,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-row class="el-row-table">
<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-form-item>
</el-col>
......@@ -496,6 +496,7 @@ export default {
data() {
return {
enterpriseName:"",
enterprises: [],
user:{},
countyInfo: [],
// 遮罩层
......@@ -591,12 +592,12 @@ export default {
enterpriseLists(param).then(response => {
if (response.rows.length>1){
this.enterprises = response.rows;
this.form.fEnterpriseId=response.rows[0].enterpriseId;
this.enterpriseName = response.rows[0].enterpriseName;
console.log("this.form.fCompanyInfoId = " + this.form.fCompanyInfoId);
}else {
this.enterprises = response.rows;
this.form.fEnterpriseId=response.rows[0].enterpriseId;
this.enterpriseName = response.rows[0].enterpriseName;
console.log("this.form.fCompanyInfoId = " + this.form.fCompanyInfoId);
}
});
},
......@@ -698,7 +699,8 @@ export default {
this.reset();
this.open = true;
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 {
},
/** 提交按钮 */
submitForm() {
this.form.fCompanyInfoId=this.enterprises[0].enterpriseId;
this.$refs["form"].validate(valid => {
if (valid) {
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