Commit 8b133661 authored by MyName's avatar MyName

项目管理

parent 95e0a3eb
......@@ -86,6 +86,14 @@
border-radius: 2px;
line-height: 28px;
cursor: pointer;
.rig {
position: absolute;
left: 0;
padding: 0;
white-space: nowrap;
visibility: hidden;
height: 0;
}
&:hover{
background: #F3F4F5;
}
......@@ -155,18 +163,26 @@
display: inline-block;
margin-top: 1px;
width: calc(100% - 116px);
.spanText {
position: absolute;
left: 0;
padding: 0;
white-space: nowrap;
visibility: hidden;
height: 0;
}
.el-input{
float: left;
margin-right: 8px;
width: 70px;
min-width: 70px;
width: auto;
margin-bottom: 10px;
.el-input__inner{
width: 70px;
min-width: 70px;
padding: 0 14px;
height: 24px;
background: #F3F4F5;
border-radius: 2px;
padding: 0;
text-indent: 14px;
border: 0;
}
}
......
......@@ -230,8 +230,10 @@
cancel(type){
if(type == 0)
this.dialogVisible = false
else
else{
this.dialogVisible = true
this.hzhbVisible = false
}
},
totype(value){
this.types = value
......@@ -243,7 +245,8 @@
this.typename = this.typelist[index]
}
})
this.hzhbVisible=true
this.hzhbVisible = true
this.dialogVisible = false
},
//打开新建窗口
opennew(){
......
......@@ -37,7 +37,9 @@
<span style="float: left;margin-top: 2px">项目标签 :</span>
<div class="flex tipinput">
<div class="tips" v-for="(item,index) in tipslit">{{item}}<img @click="deltip(item)" src="@/assets/images/project/del.png"></div>
<el-input placeholder="待添加" v-model="tipsvalue"></el-input>
<div style="position: relative">
<el-input placeholder="待添加" v-model="tipsvalue" @input="getValue" :style="spanWidth"></el-input><span class="spanText">{{ tipsvalue }}</span>
</div>
<div class="addbtn" @click="addtips"></div>
</div>
</div>
......@@ -63,7 +65,7 @@
</div>
<div class="con i">
<span>建设单位 :</span>
<div class="inputxt" id="inputxt3">
<div class="inputxt" id="inputxt3" :style="{width:rig1}">
<div class="flex" v-if="nowedit == 3">
<el-input placeholder="待添加" v-model="xmsldata.constructionUnit"></el-input>
<div class="flex">
......@@ -72,6 +74,7 @@
</div>
</div>
<span :class="{txt:!xmsldata.constructionUnit}" v-else @click="nowedit = 3">{{xmsldata.constructionUnit||'待添加'}}</span>
<span class="rig rig1">{{xmsldata.constructionUnit}}</span>
</div>
</div>
</div>
......@@ -189,6 +192,8 @@
projectStage:[],//项目阶段
id: this.detailId ? this.detailId : this.$route.query.id,
xmsldata:this.datas,
spanWidth:'width: 70px',
rig1:'184px',
}
},
created(){
......@@ -215,6 +220,17 @@
})
},
methods:{
getValue(){
const spanStyle = document.querySelector(".spanText");
this.$nextTick(() => { // 如果不用$nextTick的话页面并不会更新,它是在下次dom更新后再渲染到页面上
let wid =
spanStyle.offsetWidth <= 70
? "70px"
: spanStyle.offsetWidth + 28 + "px";
this.spanWidth = 'width:'+wid
});
},
editXMSL(param){
let params = param
params.id = this.id
......@@ -286,6 +302,15 @@
this.xmjd = result.data.projectStage
this.tipslit = result.data.labelList
this.xmsldata = result.data
const spanStyle = document.querySelector(".rig1");
this.$nextTick(() => { // 如果不用$nextTick的话页面并不会更新,它是在下次dom更新后再渲染到页面上
this.rig1 =
spanStyle.offsetWidth <= 184
? "184px"
: spanStyle.offsetWidth + "px";
});
})
},
}
......@@ -296,4 +321,7 @@
.select-popper{
top: 3px;
}
.inputxt .flex{
background: #fff;
}
</style>
......@@ -114,7 +114,9 @@
<div class="datalist">
<div class="datali" v-for="(item,index) in datalist">
<div class="det-title" @click="toDetail(item.id,'xmsl')">{{item.projectName}}<span v-if="activeName!='first' && item.followTime" class="people"><i>{{item.nickName1}}</i>{{item.nickName}} <font color="#FA8A00">正在跟进</font></span></div>
<div class="det-tips"><span class="tips tip1" v-if="item.label">{{item.label}}</span><span v-if="item.address" class="tips tip2">{{item.address}}</span></div>
<div class="det-tips">
<span class="tips tip1" v-for="label in item.labels">{{label}}</span>
<span v-if="item.address" class="tips tip2">{{item.address}}</span></div>
<div class="det-contets">
<div class="det-con" v-if="item.projectType">
<span>项目类型:</span>
......@@ -296,6 +298,11 @@ export default {
str += '-' +item.districtName
item.address = str
item.nickName1 = item.nickName?item.nickName.slice(0,1):''
item.labels=[]
if(item.label!=null && item.label !=""){
item.labels = item.label.split(',')
}
})
}
})
......
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