|
@@ -48,7 +48,14 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>2.</td>
|
|
|
- <td>施工单位:<el-input style="width: 300px;" v-model="aConstructionName"/>
|
|
|
+<!-- <td>施工单位:<el-input style="width: 300px;" v-model="aConstructionName"/>-->
|
|
|
+<!-- </td>-->
|
|
|
+ <td>施工单位:<el-select v-model="aConstructionName" filterable placeholder="请选择施工单位"
|
|
|
+ @change="aConstructionChange(aConstructionName)">
|
|
|
+ <el-option v-for="item in aConstructions" :key="item.deptId" :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</td>
|
|
|
<td>施工单位主管:<el-input style="width: 100px;" v-model="aConstructionLeader"/>
|
|
|
</td>
|
|
@@ -1372,10 +1379,15 @@ import {
|
|
|
listMatters
|
|
|
} from "@/api/ehs/throughcleanbcc";
|
|
|
import {getInfo} from "@/api/invoicing/hazardwork";
|
|
|
+import {listDept} from "@/api/system/dept";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ aConstructions: [],
|
|
|
+ aConstructionsQuery: {
|
|
|
+ parentId: 500
|
|
|
+ },
|
|
|
//危害工作许可证ID
|
|
|
hId: null,
|
|
|
//A 基本信息字段
|
|
@@ -1622,12 +1634,16 @@ export default {
|
|
|
new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate(), 0, 0),
|
|
|
],
|
|
|
//新增修改窗口内容是否展开
|
|
|
- activeNames: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'],
|
|
|
+ activeNames: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'],
|
|
|
}
|
|
|
},
|
|
|
/* 页面渲染前执行的方法*/
|
|
|
created() {
|
|
|
this.queryMatters();
|
|
|
+ //加载施工单位
|
|
|
+ listDept(this.aConstructionsQuery).then(response => {
|
|
|
+ this.aConstructions = response.data;
|
|
|
+ })
|
|
|
var id = this.$route.query.aId;
|
|
|
console.log("id=============" + id)
|
|
|
if (id != null) {
|
|
@@ -1637,19 +1653,19 @@ export default {
|
|
|
this.aEquipmentLeader= response.data.aEquipmentLeader,
|
|
|
this.aEquipmentTel= response.data.aEquipmentTel,
|
|
|
this.aEquipmentOffice= response.data.aEquipmentOffice,
|
|
|
- this.aConstructionName= response.data.aConstructionName,
|
|
|
+ this.aConstructionName= parseInt(response.data.aConstructionName),
|
|
|
this.aConstructionLeader= response.data.aConstructionLeader,
|
|
|
this.aConstructionTel= response.data.aConstructionTel,
|
|
|
this.aConstructionOffice= response.data.aConstructionOffice,
|
|
|
- // this.aContractorName: null,
|
|
|
- // this.aContractorLeader: null,
|
|
|
- // this.aContractorTel: null,
|
|
|
- // this.aContractorOffice: null,
|
|
|
- // this.aIsNeedSafeLiaison: null,
|
|
|
- // this.aSafeLiaisonName: null,
|
|
|
- // this.aSafeLiaisonSign: null,
|
|
|
- // this.aSafeLiaisonTel: null,
|
|
|
- // this.aSafeLiaisonOffice: null,
|
|
|
+ this.aContractorName= response.data.aContractorName,
|
|
|
+ this.aContractorLeader= response.data.aContractorLeader,
|
|
|
+ this.aContractorTel= response.data.aContractorTel,
|
|
|
+ this.aContractorOffice= response.data.aContractorOffice,
|
|
|
+ this.aIsNeedSafeLiaison= response.data.aIsNeedSafeLiaison,
|
|
|
+ this.aSafeLiaisonName= response.data.aSafeLiaisonName,
|
|
|
+ this.aSafeLiaisonSign= response.data.aSafeLiaisonSign,
|
|
|
+ this.aSafeLiaisonTel= response.data.aSafeLiaisonTel,
|
|
|
+ this.aSafeLiaisonOffice= response.data.aSafeLiaisonOffice,
|
|
|
this.msgSuccess(this.$t('数据加载成功'));
|
|
|
});
|
|
|
this.aIdDisabled = true;
|
|
@@ -1729,7 +1745,17 @@ export default {
|
|
|
this[m] = true;
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ //施工单位后台数据联动
|
|
|
+ aConstructionChange(val) {
|
|
|
+ this.aConstructions.forEach(t => {
|
|
|
+ console.log(val)
|
|
|
+ if (val == t.deptId) {
|
|
|
+ this.form.aConstructionLeader = t.leader;
|
|
|
+ this.form.aConstructionTel = t.phone;
|
|
|
+ this.form.aConstructionOffice = '/';
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
allExpand() {
|
|
|
this.activeNames = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14'];
|
|
|
},
|