Browse Source

优化

master
陈裕财 3 years ago
parent
commit
6e2c13ada7
  1. 58
      src/styles/mdp.scss
  2. 50
      src/views/xm/core/xmProduct/XmProductEdit.vue
  3. 21
      src/views/xm/core/xmProject/XmProjectEdit.vue

58
src/styles/mdp.scss

@ -274,11 +274,42 @@ table tr.hover-row{
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
} }
/*2.隐藏滚动条太丑了
.el-drawer__container ::-webkit-scrollbar{
display: none;
.label-font-color{
color: #C0C4CC;
}
.title-font-size{
font-size:28px;
}
.title-box{
height: 40px;
} }
*/
.title-box:hover .el-input .el-input__inner{
border: 1px solid #dcdfe6 !important;
padding:0 0px;
font-size:1.5rem;
height: 40px;
}
.title-box:hover .el-input .el-input__inner:focus{
border: 1px solid #7287ef !important;
padding:0 0px;
font-size:1.5rem;
height: 40px;
}
.title-box .el-input .el-input__inner{
border: 0px solid #dcdfe6 !important;
padding:0 1px;
font-size:1.5rem;
height: 40px;
}
/*此处根据不同屏幕分配率显示不同的样式*/ /*此处根据不同屏幕分配率显示不同的样式*/
/*手机端*/ /*手机端*/
@media only screen and (min-width: 0px) and (max-width: 768px) { @media only screen and (min-width: 0px) and (max-width: 768px) {
@ -316,22 +347,3 @@ table tr.hover-row{
} }
} }
.label-font-color{
color: #C0C4CC;
}
.title-font-size{
font-size:28px;
}
.title-box:hover.el-input >>> .el-input__inner{
border: 1px solid #dcdfe6 !important;
padding:0 0px;
font-size:1.5rem;
}
.title-box.el-input >>> .el-input__inner{
border: 0px solid #dcdfe6 !important;
padding:0 1px;
font-size:1.5rem;
}

50
src/views/xm/core/xmProduct/XmProductEdit.vue

@ -6,7 +6,7 @@
:model="editForm" :model="editForm"
label-width="120px" label-width="120px"
:rules="editFormRules" :rules="editFormRules"
label-position="left"
label-position="top"
ref="editForm" ref="editForm"
> >
<el-row v-if="opType !== 'add'" class="padding-top label-font-color"> <el-row v-if="opType !== 'add'" class="padding-top label-font-color">
@ -20,14 +20,13 @@
><i class="el-icon-question"></i ><i class="el-icon-question"></i
></el-tooltip> ></el-tooltip>
</el-row> </el-row>
<el-form-item prop="productName" label-width="0px" v-if="opType !== 'add'">
<el-input class="title-box" size="medium"
<el-form-item prop="productName" label-width="0px" v-if="opType !== 'add'" class="title-box">
<el-input
v-model="editForm.productName" v-model="editForm.productName"
placeholder="产品名称" placeholder="产品名称"
@change="editSomeFields(editForm, 'productName', $event)" @change="editSomeFields(editForm, 'productName', $event)"
></el-input> ></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="产品名称" prop="productName" v-if="opType === 'add'"> <el-form-item label="产品名称" prop="productName" v-if="opType === 'add'">
<el-input <el-input
v-model="editForm.productName" v-model="editForm.productName"
@ -97,11 +96,11 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row v-if="opType==='add'" style="float:right;">
<el-button type="primary" @click="editSubmit">保存</el-button>
</el-row>
</el-row> </el-row>
<el-row v-if="opType==='add'">
<el-button type="primary" @click="editSubmit">保存</el-button>
</el-row>
</section> </section>
</template> </template>
@ -144,6 +143,8 @@ export default {
}, },
visible: function (visible) { visible: function (visible) {
if (visible == true) { if (visible == true) {
this.initData();
// //
} }
}, },
@ -358,30 +359,31 @@ export default {
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
}) })
}, },
initData(){
this.editForm=Object.assign(this.editForm,this.xmProduct)
if(this.opType==='add'){
this.editForm.pmUserid=this.userInfo.userid
this.editForm.pmUsername=this.userInfo.username
this.editForm.admUserid=this.userInfo.userid
this.editForm.admUsername=this.userInfo.username
this.editForm.assUserid=this.userInfo.userid
this.editForm.assUsername=this.userInfo.username
}
this.editFormBak={...this.editForm}
},
/**end 在上面加自定义方法**/ /**end 在上面加自定义方法**/
}, //end method }, //end method
components: { components: {
}, },
mounted() {
this.editForm = this.xmProduct;
this.editFormBak = { ...this.editForm };
mounted() {
initDicts(this); initDicts(this);
this.initData();
/**在下面写其它函数***/ /**在下面写其它函数***/
}, //end mounted }, //end mounted
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.title-box:hover.el-input >>> .el-input__inner{
border: 1px solid #dcdfe6 !important;
padding:0 0px;
font-size:1.5rem;
}
.title-box.el-input >>> .el-input__inner{
border: 0px solid #dcdfe6 !important;
padding:0 1px;
font-size:1.5rem;
}
</style> </style>

21
src/views/xm/core/xmProject/XmProjectEdit.vue

@ -6,9 +6,13 @@
<el-row v-if="opType!=='add'" class="padding-top label-font-color"> <el-row v-if="opType!=='add'" class="padding-top label-font-color">
项目代号: {{editForm.code}} &nbsp;&nbsp; 项目编号: {{editForm.id}} <el-tooltip content="项目代号用于签订合同等甲乙方共享的场景;项目编号为内部编号,用于内部流转,编号生成规则:项目代号+四位随机码 "><i class="el-icon-question"></i></el-tooltip> 项目代号: {{editForm.code}} &nbsp;&nbsp; 项目编号: {{editForm.id}} <el-tooltip content="项目代号用于签订合同等甲乙方共享的场景;项目编号为内部编号,用于内部流转,编号生成规则:项目代号+四位随机码 "><i class="el-icon-question"></i></el-tooltip>
</el-row> </el-row>
<el-form-item prop="name" label-width="0px">
<my-input v-model="editForm.name" placeholder="项目名称" @change="editXmProjectSomeFields(editForm,'name',$event)"></my-input>
<el-form-item prop="name" label-width="0px" class="title-box" v-if="opType!=='add'">
<el-input v-model="editForm.name" placeholder="请填写 项目名称" @change="editXmProjectSomeFields(editForm,'name',$event)"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目名称" prop="name" v-if="opType==='add'">
<el-input v-model="editForm.name" placeholder="请填写 项目名称" @change="editXmProjectSomeFields(editForm,'name',$event)"></el-input>
</el-form-item>
<el-form-item label="项目代号" prop="code" v-if="opType==='add'"> <el-form-item label="项目代号" prop="code" v-if="opType==='add'">
<el-input v-model="editForm.code" style="width:200px;" placeholder="项目代号,不可为空" > <el-input v-model="editForm.code" style="width:200px;" placeholder="项目代号,不可为空" >
@ -926,14 +930,5 @@
</script> </script>
<style scoped>
.line{
float:right;
width: 100%;
height: 1px;
margin-top: -0.5em;
background:#d4c4c4;
position: relative;
text-align: center;
}
</style>
<style scoped>
</style>
Loading…
Cancel
Save