Commit 13b15d88 authored by 纪泽龙's avatar 纪泽龙

Merge branch 'jzl'

parents 6f2adafc 74d3e649
...@@ -3,39 +3,47 @@ ...@@ -3,39 +3,47 @@
<div class="item flex" :class="{ active: isActive }"> <div class="item flex" :class="{ active: isActive }">
<div class="left flex"> <div class="left flex">
<div class="left-item flex" :class="{ active: isActive }"> <div class="left-item flex" :class="{ active: isActive }">
<div class="text"> <div class="text flex">
<i class="iconfont icon-24gl-checklist" /> <div class="i-wrapper">
<i class="iconfont icon-24gl-checklist" />
</div>
<div ref="tp" class="text-center-wrapper flex">
<div ref="t" style="margin-right: 10px" v-if="!isActive">
{{ infoData.planName }}
</div>
</div>
<span style="margin-right: 10px" v-if="!isActive">{{ <!-- <el-input
infoData.planName
}}</span>
<el-input
v-else v-else
size="mini" size="mini"
v-model="infoData.planName" v-model="infoData.planName"
placeholder="请输入内容" placeholder="请输入内容"
style="width: 120px" style="width: 120px"
></el-input> ></el-input> -->
</div> </div>
</div> </div>
</div> </div>
<div class="right flex" style="line-height: 110px;"> <div class="right flex" style="line-height: 110px">
<div style="margin-left: 20px" v-if="infoData.personnelType==1">员工培训</div> <div style="margin-left: 20px" v-if="infoData.personnelType == 1">
<div style="margin-left: 20px" v-if="infoData.personnelType==2">承包商培训</div> 员工培训
</div>
<div style="margin-left: 20px" v-if="infoData.personnelType == 2">
承包商培训
</div>
</div> </div>
<div class="middle flex"> <div class="middle flex">
<div> <div>
<div class="top">参与培训人员({{personnelOptions.length}})</div> <div class="top">参与培训人员({{ personnelOptions.length }})</div>
<div class="bottom"> <div class="bottom">
<!-- <el-checkbox-group class="" v-model="infoData.postIds"> --> <!-- <el-checkbox-group class="" v-model="infoData.postIds"> -->
<el-checkbox <el-checkbox
:disabled="!isActive" :disabled="!isActive"
v-model="personnel.ischeck" v-model="personnel.ischeck"
v-for="personnel in personnelOptions" v-for="personnel in personnelOptions"
:label="personnel.postId" :label="personnel.postId"
:key="personnel.postId" :key="personnel.postId"
>{{ personnel.postName }}</el-checkbox >{{ personnel.postName }}</el-checkbox
> >
<!-- </el-checkbox-group> --> <!-- </el-checkbox-group> -->
</div> </div>
</div> </div>
...@@ -43,7 +51,9 @@ ...@@ -43,7 +51,9 @@
<div class="right flex"> <div class="right flex">
<template v-if="!isActive"> <template v-if="!isActive">
<div> <div>
<el-button type="text" @click="edit(personnelOptions)">编辑</el-button> <el-button type="text" @click="edit(personnelOptions)"
>编辑</el-button
>
<el-button type="text" @click="deletePlan">删除</el-button> <el-button type="text" @click="deletePlan">删除</el-button>
</div> </div>
</template> </template>
...@@ -86,7 +96,18 @@ export default { ...@@ -86,7 +96,18 @@ export default {
return this.isActiveId === this.infoData.planId; return this.isActiveId === this.infoData.planId;
}, },
}, },
mounted() {}, mounted() {
console.log(this.$refs.t.offsetHeight);
// 如果子元素的高大于父元素的高,就改变上下居中策略,改为滚动条展示
if (this.$refs.t.offsetHeight > this.$refs.tp.offsetHeight) {
console.log(this.$refs.tp.style);
this.$refs.tp.style.overflow = "auto";
this.$refs.tp.style.alignItems = "";
} else {
// console.log(this.$refs.t.offsetHeight)
// this.$refs.t.style.alignItems='center'
}
},
data() { data() {
return { return {
// 记录初始的选项 // 记录初始的选项
...@@ -99,7 +120,7 @@ export default { ...@@ -99,7 +120,7 @@ export default {
edit(personnelOptions) { edit(personnelOptions) {
// 编辑 // 编辑
console.log(personnelOptions); console.log(personnelOptions);
this.$parent.addClick(this.infoData,personnelOptions); this.$parent.addClick(this.infoData, personnelOptions);
//this.$emit("edit", this.oldInfoData); //this.$emit("edit", this.oldInfoData);
}, },
save() { save() {
...@@ -204,11 +225,12 @@ export default { ...@@ -204,11 +225,12 @@ export default {
align-items: center; align-items: center;
justify-content: right; justify-content: right;
margin-top: 25px; margin-top: 25px;
.left-item { .left-item {
transition: all 0.5s; transition: all 0.5s;
width: 200px; width: 200px;
height: 60px; height: 60px;
line-height: 60px; // line-height: 60px;
font-size: 14px; font-size: 14px;
padding-left: 25px; padding-left: 25px;
border: 1px solid #efefef; border: 1px solid #efefef;
...@@ -223,8 +245,16 @@ export default { ...@@ -223,8 +245,16 @@ export default {
background: #1d84ff; background: #1d84ff;
color: #fff; color: #fff;
} }
span { .i-wrapper {
margin-left: 10px; height: 60px;
line-height: 60px;
padding-right: 10px;
}
.text-center-wrapper {
height: 100%;
width: 100%;
// overflow: auto;
align-items: center;
} }
} }
} }
......
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_TARGET, target: process.env.VUE_APP_TARGET,
//target: `http://192.168.2.21:8908/dangerManage`, // target: `http://192.168.2.21:8908/dangerManage`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
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