|
@@ -56,7 +56,10 @@
|
|
|
<div class="dialog-right-table" ref="dialogRightTable" v-if="systemName=='消防系统'">
|
|
|
<a-table :columns="examplesTableHeaderEdit" :data-source="addDataTableData" bordered :pagination="false" :scroll="{ y: height }" >
|
|
|
<span slot="fireZone" slot-scope="text,record,index">
|
|
|
- <a-input v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15"/>
|
|
|
+ <el-tooltip popper-class="tooltip-class" effect="dark" :manual="true" :content="text" placement="top" :disabled="record.tooltipDisableFize" :value="!record.tooltipDisableFize">
|
|
|
+ <a-input v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15" @focus="focusTooltip(record,'fireZone','tooltipDisableFize',index)" @blur="blurToopTip('tooltipDisableFize',index)"/>
|
|
|
+ </el-tooltip>
|
|
|
+<!-- <a-input v-else v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15" @focus="focusTooltip('tooltipDisableFize',index)" @blur="blurToopTip('tooltipDisableFize',index)"/>-->
|
|
|
</span>
|
|
|
<span slot="isFm" slot-scope="text,record,index">
|
|
|
<Select width="60" v-model="text" :isReadOnly="true" @change="isFmFun(text,index)" :hideClear='true' :selectdata="isFmData" :placeholder="'请选择'"/>
|
|
@@ -122,20 +125,54 @@
|
|
|
{dataIndex: 'isFm', align: 'center', title: '是否属于非工程 物业管理范围', width: 100, scopedSlots: { customRender: 'isFm' },},
|
|
|
{dataIndex: 'hostNum', title: '主机编号', align: 'center', customRender: (text, row, index) => {
|
|
|
var self = this;
|
|
|
- var child = self.$createElement("a-input", {
|
|
|
+ var child = self.$createElement("el-tooltip", {
|
|
|
attrs:{
|
|
|
- value: text,
|
|
|
- placeholder:'请输入',
|
|
|
- maxLength:15
|
|
|
- },
|
|
|
- on:{
|
|
|
- change(event){
|
|
|
- if(row.isFm=='1') {
|
|
|
- self.$set(self.addDataTableData[index], 'hostNum', event.target.value);
|
|
|
+ placement:"top",
|
|
|
+ content:text,
|
|
|
+ manual:true,
|
|
|
+ disabled:row.tooltipDisablHost,
|
|
|
+ value:!row.tooltipDisablHost,
|
|
|
+ popperClass:'tooltip-class'
|
|
|
+ }
|
|
|
+ },[
|
|
|
+ self.$createElement("a-input", {
|
|
|
+ attrs:{
|
|
|
+ value: text,
|
|
|
+ placeholder:'请输入',
|
|
|
+ maxLength:15,
|
|
|
+
|
|
|
+ },
|
|
|
+ on:{
|
|
|
+ change(event){
|
|
|
+ if(row.isFm=='1') {
|
|
|
+ self.$set(self.addDataTableData[index], 'hostNum', event.target.value);
|
|
|
+ if(event.target.value){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablHost',false)
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablHost',true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ focus(){
|
|
|
+ self.addDataTableData.map(item=>{
|
|
|
+ item['tooltipDisablHost'] = true
|
|
|
+ })
|
|
|
+ if(row['hostNum']){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablHost',false)
|
|
|
+ console.log(self.addDataTableData[index]);
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablHost',true)
|
|
|
+ }
|
|
|
+
|
|
|
+ self.$forceUpdate()
|
|
|
+ },
|
|
|
+ blur(){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablHost',true);
|
|
|
+ self.$forceUpdate()
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ ]);
|
|
|
let manageScopeData = [
|
|
|
{id:'写字楼管理范围', name: '写字楼管理范围'},
|
|
|
{id:'合作方管理范围', name: '合作方管理范围'},
|
|
@@ -168,20 +205,53 @@
|
|
|
}},
|
|
|
{dataIndex: 'loopNum', title: '回路编号', align: 'center', customRender: (text, row, index) => {
|
|
|
var self = this;
|
|
|
- var child = self.$createElement("a-input", {
|
|
|
+ var child = self.$createElement("el-tooltip", {
|
|
|
attrs:{
|
|
|
- value: text,
|
|
|
- placeholder:'请输入',
|
|
|
- maxLength:15
|
|
|
- },
|
|
|
- on:{
|
|
|
- change(event){
|
|
|
- if(row.isFm=='1') {
|
|
|
- self.$set(self.addDataTableData[index], 'loopNum', event.target.value);
|
|
|
+ placement:"top",
|
|
|
+ content:text,
|
|
|
+ manual:true,
|
|
|
+ disabled:row.tooltipDisablLoop,
|
|
|
+ value:!row.tooltipDisablLoop,
|
|
|
+ popperClass:'tooltip-class'
|
|
|
+ }
|
|
|
+ },[
|
|
|
+ self.$createElement("a-input", {
|
|
|
+ attrs:{
|
|
|
+ value: text,
|
|
|
+ placeholder:'请输入',
|
|
|
+ maxLength:15,
|
|
|
+
|
|
|
+ },
|
|
|
+ on:{
|
|
|
+ change(event){
|
|
|
+ if(row.isFm=='1') {
|
|
|
+ self.$set(self.addDataTableData[index], 'loopNum', event.target.value);
|
|
|
+ if(event.target.value){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablLoop',false)
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablLoop',true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ focus(){
|
|
|
+ self.addDataTableData.map(item=>{
|
|
|
+ item['tooltipDisablLoop'] = true
|
|
|
+ })
|
|
|
+ if(row['loopNum']){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablLoop',false)
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablLoop',true)
|
|
|
+ }
|
|
|
+
|
|
|
+ self.$forceUpdate()
|
|
|
+ },
|
|
|
+ blur(){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisablLoop',true);
|
|
|
+ self.$forceUpdate()
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ ]);
|
|
|
const obj = {
|
|
|
children: row.isFm=='1'?child:text,
|
|
|
attrs: {},
|
|
@@ -463,19 +533,53 @@
|
|
|
{
|
|
|
dataIndex: 'fireZone', title: '分区', align: 'center', customRender: (text, row, index) => {
|
|
|
|
|
|
- var self = this
|
|
|
- var child = self.$createElement("a-input", {
|
|
|
+ var self = this;
|
|
|
+ var child = self.$createElement("el-tooltip", {
|
|
|
attrs:{
|
|
|
- value: text,
|
|
|
- maxLength:15,
|
|
|
- placeholder:'请输入',
|
|
|
+ placement:"top",
|
|
|
+ content:text,
|
|
|
+ manual:true,
|
|
|
+ disabled:row.tooltipDisableFize,
|
|
|
+ value:!row.tooltipDisableFize,
|
|
|
+ popperClass:'tooltip-class'
|
|
|
},
|
|
|
- on:{
|
|
|
- input(event){
|
|
|
- self.$set( self.addDataTableData[index],'fireZone',event.target.value)
|
|
|
+ },[
|
|
|
+ self.$createElement("a-input", {
|
|
|
+ attrs:{
|
|
|
+ value: text,
|
|
|
+ placeholder:'请输入',
|
|
|
+ maxLength:15,
|
|
|
+
|
|
|
+ },
|
|
|
+ on:{
|
|
|
+ change(event){
|
|
|
+ self.$set(self.addDataTableData[index], 'fireZone', event.target.value);
|
|
|
+ if(event.target.value){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisableFize',false)
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisableFize',true)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ focus(){
|
|
|
+ self.addDataTableData.map(item=>{
|
|
|
+ item['tooltipDisableFize'] = true
|
|
|
+ })
|
|
|
+ if(row['fireZone']){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisableFize',false)
|
|
|
+ console.log(self.addDataTableData[index]);
|
|
|
+ }else{
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisableFize',true)
|
|
|
+ }
|
|
|
+
|
|
|
+ self.$forceUpdate()
|
|
|
+ },
|
|
|
+ blur(){
|
|
|
+ self.$set( self.addDataTableData[index],'tooltipDisableFize',true);
|
|
|
+ self.$forceUpdate()
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ ]);
|
|
|
var obj = {
|
|
|
children: child,
|
|
|
attrs: {},
|
|
@@ -551,6 +655,7 @@
|
|
|
if(this.systemName=='弱电系统') {
|
|
|
this.addDataTableData.map((item,index) => {
|
|
|
item.errorMsg = true;
|
|
|
+ item.tooltipDisableFize = true;
|
|
|
item.key = ''+ new Date().getTime()+index;
|
|
|
})
|
|
|
}
|
|
@@ -562,6 +667,9 @@
|
|
|
item.errorMsg3 = true;
|
|
|
item.errorMsg4 = true;
|
|
|
item.errorMsg5 = true;
|
|
|
+ item.tooltipDisableFize = true;
|
|
|
+ item.tooltipDisablHost = true;
|
|
|
+ item.tooltipDisablLoop = true;
|
|
|
})
|
|
|
}
|
|
|
this.projectId=this.$parent.plazaId;
|
|
@@ -575,6 +683,23 @@
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
|
+ focusTooltip(record,nameBase,name,index){
|
|
|
+ this.addDataTableData.map(item=>{
|
|
|
+ item[name] = true
|
|
|
+ })
|
|
|
+ if(record[nameBase]){
|
|
|
+ this.$set( this.addDataTableData[index],name,false)
|
|
|
+ }else{
|
|
|
+ this.$set( this.addDataTableData[index],name,true)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ blurToopTip(text,index){
|
|
|
+ this.$set( this.addDataTableData[index],text,true);
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+
|
|
|
//键盘事件
|
|
|
keydown(e){
|
|
|
if(e.key=='-'||e.key=='+'||e.key=='e'||e.key=='.'){
|
|
@@ -598,7 +723,12 @@
|
|
|
},
|
|
|
//防火分区
|
|
|
getFireZoneFun(text,index){
|
|
|
- this.$set( this.addDataTableData[index],'fireZone',text)
|
|
|
+ this.$set( this.addDataTableData[index],'fireZone',text);
|
|
|
+ if(text){
|
|
|
+ this.$set( this.addDataTableData[index],'tooltipDisableFize',false)
|
|
|
+ }else{
|
|
|
+ this.$set( this.addDataTableData[index],'tooltipDisableFize',true)
|
|
|
+ }
|
|
|
},
|
|
|
//是否属于非工程 物业管理范围
|
|
|
isFmFun(text,index){
|
|
@@ -634,25 +764,29 @@
|
|
|
fireZone: '',
|
|
|
system: '监控系统',
|
|
|
monitorCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
fireZone: '',
|
|
|
system: 'BA系统',
|
|
|
baCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
fireZone: '',
|
|
|
system: 'DDC',
|
|
|
ddcCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
fireZone: '',
|
|
|
system: '门禁系统',
|
|
|
accessCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
];
|
|
|
this.addDataTableData.push(...arr);
|
|
@@ -681,6 +815,9 @@
|
|
|
errorMsg3:true,
|
|
|
errorMsg4:true,
|
|
|
errorMsg5:true,
|
|
|
+ tooltipDisableFize : true,
|
|
|
+ tooltipDisablHost : true,
|
|
|
+ tooltipDisablLoop : true,
|
|
|
};
|
|
|
this.addDataTableData.push(obj)
|
|
|
}else{
|
|
@@ -697,28 +834,32 @@
|
|
|
fireZone: '',
|
|
|
system: '监控系统',
|
|
|
monitorCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
key :''+new Date().getTime()+2,
|
|
|
fireZone: '',
|
|
|
system: 'BA系统',
|
|
|
baCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
key :''+new Date().getTime()+3,
|
|
|
fireZone: '',
|
|
|
system: 'DDC',
|
|
|
ddcCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
{
|
|
|
key :''+new Date().getTime()+4,
|
|
|
fireZone: '',
|
|
|
system: '门禁系统',
|
|
|
accessCount: '',
|
|
|
- errorMsg:true
|
|
|
+ errorMsg:true,
|
|
|
+ tooltipDisableFize: true
|
|
|
},
|
|
|
];
|
|
|
this.addDataTableData.push(...arr);
|
|
@@ -741,6 +882,9 @@
|
|
|
errorMsg3:true,
|
|
|
errorMsg4:true,
|
|
|
errorMsg5:true,
|
|
|
+ tooltipDisableFize : true,
|
|
|
+ tooltipDisablHost : true,
|
|
|
+ tooltipDisablLoop : true,
|
|
|
};
|
|
|
this.addDataTableData.push(obj)
|
|
|
}
|
|
@@ -1040,3 +1184,10 @@
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+<style lang="less">
|
|
|
+ .tooltip-class{
|
|
|
+ width: 200px!important;
|
|
|
+ text-align: center!important;
|
|
|
+ font-size:12px!important;
|
|
|
+ }
|
|
|
+</style>
|