Commit 29412682 authored by zhengke's avatar zhengke

1

parent 323c7669
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
.sche_Fenye { .sche_Fenye {
display: flex; display: flex;
width: 100px; width: 100px;
position: absolute; margin-right: 20px;
/* position: absolute;
right: 20px; right: 20px;
bottom: 20px; bottom: 20px; */
} }
.sche_left { .sche_left {
...@@ -109,35 +110,59 @@ ...@@ -109,35 +110,59 @@
border: 0; border: 0;
} }
.schedul_Upload { .canClick_Color {
background-color: #E9EFFF; color: #2961FE !important;
border: 1px dashed #c0ccda; }
.tufa_List {
display: flex;
}
.tufa_left {
width: 128px;
height: 83px;
border-radius: 6px; border-radius: 6px;
box-sizing: border-box; overflow: hidden;
width: 100%; flex-shrink: 0;
height: 107px; margin-right: 18px;
cursor: pointer;
line-height: 146px;
vertical-align: top;
font-size: 40px;
text-align: center;
line-height: 107px;
position: relative;
background-size: cover;
color: #2961FE;
background-repeat: no-repeat;
} }
.schedul_Upload .upDiv { .tufa_left img {
position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0;
top: 0;
} }
.canClick_Color { .tufa_btm {
color: #2961FE !important; display: flex;
justify-content: space-between;
align-items: center;
}
.tufa_xiugai {
margin-left: 20px;
color: #989898;
font-size: 12px;
}
.tufaPop .el-upload--picture-card {
width: 120px;
height: 120px;
line-height: 120px;
}
.tufaPop .el-upload-list__item {
width: 120px;
height: 120px;
}
.sche_mid .bg-accent {
font-size: 10px !important;
border-radius: 10px;
background: linear-gradient(90deg, #2966FE, #2696FF) !important;
}
.tufaPop .el-upload-list__item {
margin-bottom: 0;
} }
</style> </style>
...@@ -155,49 +180,63 @@ ...@@ -155,49 +180,63 @@
<span class="word_scheNumber" v-if="saveObj&&saveObj.WorkList" <span class="word_scheNumber" v-if="saveObj&&saveObj.WorkList"
:class="{'schNoneNum':saveObj.WorkList.length==0}">{{this.saveObj.WorkList.length}}</span> :class="{'schNoneNum':saveObj.WorkList.length==0}">{{this.saveObj.WorkList.length}}</span>
</div> </div>
<div class="scheList_Bottom"> <div style="min-height:135px;">
<div class="sche_List_in" v-if="WorkObj"> <div class="scheList_Bottom">
<div class="sche_List_in" v-if="WorkObj">
<template v-if="WorkObj.ItemType==1">
<div class="sche_Dian" style="margin-top:5px;"></div>
<div class="sche_ListInner" style="margin:5px 10px 0 0;">{{WorkObj.ItemName}} </div>
</template>
<template v-else-if="WorkObj.ItemType==2">
<div class="sche_Dian"></div>
<div class="sche_ListInner" style="flex-shrink: 0">{{WorkObj.ItemName}} </div>
</template>
</div>
</div>
<div>
<template v-if="WorkObj.ItemType==1"> <template v-if="WorkObj.ItemType==1">
<div class="sche_Dian" style="margin-top:5px;"></div>
<div class="sche_ListInner" style="margin:5px 10px 0 0;">{{WorkObj.ItemName}} </div>
<el-checkbox style="margin-top:5" :true-label="1" :false-label="0" v-model="WorkObj.IsChecked"> <el-checkbox style="margin-top:5" :true-label="1" :false-label="0" v-model="WorkObj.IsChecked">
</el-checkbox> </el-checkbox>
</template> </template>
<template v-else-if="WorkObj.ItemType==2"> <template v-if="WorkObj.ItemType==2">
<div class="sche_Dian"></div> <div style="margin:10px 20px;">
<div class="sche_ListInner" style="flex-shrink: 0">{{WorkObj.ItemName}} </div>
<div style="width:100%;">
<el-input v-model="WorkObj.WorkContent" placeholder="完成情况怎么样"></el-input> <el-input v-model="WorkObj.WorkContent" placeholder="完成情况怎么样"></el-input>
</div> </div>
</template> </template>
</div> </div>
<div></div>
</div> </div>
<div class="sche_Fenye" v-if="saveObj&&saveObj.WorkList.length>0"> <div class="tufa_btm">
<div class="sche_left"> <div>
<i class="iconfont icon-arrow-left" :class="{'canClick_Color':WorkIndex!=0}" @click="WorkMove(1)"></i> <div class="tufa_xiugai">
<span style="margin-right:10px;">修改</span>
<q-btn color="accent" style="margin-left:10px;" slot="reference" size="sm" label="确认完成" />
</div>
</div> </div>
<div class="sche_Page" v-if="saveObj&&saveObj.WorkList">{{WorkIndex+1}}/{{this.saveObj.WorkList.length}}</div> <div class=" sche_Fenye" v-if="saveObj&&saveObj.WorkList.length>0">
<div class="sche_left" v-if="saveObj&&saveObj.WorkList"> <div class="sche_left">
<i class="iconfont icon-arrow-right1" :class="{'canClick_Color':WorkIndex!=saveObj.WorkList.length-1}" <i class="iconfont icon-arrow-left" :class="{'canClick_Color':WorkIndex!=0}" @click="WorkMove(1)"></i>
@click="WorkMove(2)"></i> </div>
<div class="sche_Page" v-if="saveObj&&saveObj.WorkList">{{WorkIndex+1}}/{{this.saveObj.WorkList.length}}
</div>
<div class="sche_left" v-if="saveObj&&saveObj.WorkList">
<i class="iconfont icon-arrow-right1" :class="{'canClick_Color':WorkIndex!=saveObj.WorkList.length-1}"
@click="WorkMove(2)"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="sche_midList"> <div class="sche_midList">
<div class="scheList_TOP"> <div class="scheList_TOP">
<img v-if="EmergenciesObj&&EmergenciesObj.FileURL" :src="EmergenciesObj.FileURL" /> <img src="../../assets/images/tufa.png" />
<img v-else src="../../assets/images/tufa.png" />
<span class="word_sche">突发事件</span> <span class="word_sche">突发事件</span>
<span class="word_scheNumber" style="" v-if="saveObj&&saveObj.EmergenciesList" <span class="word_scheNumber" style="" v-if="saveObj&&saveObj.EmergenciesList"
:class="{'schNoneNum':saveObj.EmergenciesList.length==0}">{{this.saveObj.EmergenciesList.length}}</span> :class="{'schNoneNum':saveObj.EmergenciesList.length==0}">{{this.saveObj.EmergenciesList.length}}</span>
<div class="sche_hengLine" ref="hengLine"></div> <div class="sche_hengLine" ref="hengLine"></div>
<el-popover placement="bottom" popper-class="tufaPop" width="400" trigger="click"> <el-popover placement="bottom" popper-class="tufaPop" width="410" trigger="click">
<div> <div>
<el-upload class="schedul_Upload" action="" :style="{'background-image': 'url('+addMsg2.FileURL+')'}" <el-upload class="schedul_Upload" action="" list-type="picture-card" :show-file-list="true"
:show-file-list="false" :http-request="UploadAttachment"> :file-list="fileListOne" :on-remove="handleRemoveAdd" :http-request="UploadAttachment">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<div class="upDiv"></div>
</el-upload> </el-upload>
<el-input type="textarea" style="margin-top:20px;" resize="none" placeholder="添加文字内容" <el-input type="textarea" style="margin-top:20px;" resize="none" placeholder="添加文字内容"
v-model="addMsg2.OtherContent" :rows="5"></el-input> v-model="addMsg2.OtherContent" :rows="5"></el-input>
...@@ -209,20 +248,52 @@ ...@@ -209,20 +248,52 @@
</el-popover> </el-popover>
</div> </div>
<div class="secondList_Bottom"> <div class="secondList_Bottom">
<div class="sche_List_in"> <div class="tufa_List">
<div class="sche_ListInner" v-if="EmergenciesObj">{{EmergenciesObj.OtherContent}}</div> <div class="tufa_left">
<img src="../../assets/images/tufa.png" />
</div>
<div>
打开门面,把电视打开,打扫前台和每处卫生
注意:不能在前台吃早饭
</div>
</div> </div>
<!-- <div class="sche_List_in">
<div class="sche_ListInner" v-if="EmergenciesObj">{{EmergenciesObj.OtherContent}}</div>
</div> -->
</div> </div>
<div class="sche_Fenye" v-if="saveObj&&saveObj.EmergenciesList.length>0"> <div class="tufa_btm">
<div class="sche_left"> <div>
<i class="iconfont icon-arrow-left" :class="{'canClick_Color':EmergenciesIndex!=0}" <div class="tufa_xiugai">
@click="EmergenciesMove(1)"></i> <el-popover placement="bottom" popper-class="tufaPop" width="400" trigger="click">
<div>
<el-upload action="https://testopenapi.nbdeli.com/crm/customer/saveChannelLogoFile"
:on-preview="handlePictureCardPreview" :on-success="handleUploadSuccess" list-type="picture-card"
:on-remove="handleRemove" :file-list="fileList">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="ruleForm.dialogImageUrl" alt />
</el-dialog>
<el-input type="textarea" :rows="4" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveTufa" label="保存" />
</div>
<span slot="reference" style="margin-right:10px;cursor:pointer;">修改</span>
</el-popover>
|<span style="margin-left:10px;cursor:pointer;">删除</span>
<q-btn color="accent" style="margin-left:10px;" slot="reference" size="sm" label="确认完成" />
</div>
</div> </div>
<div class="sche_Page">{{EmergenciesIndex+1}}/{{this.saveObj.EmergenciesList.length}}</div> <div class=" sche_Fenye" v-if="saveObj&&saveObj.EmergenciesList.length>0">
<div class="sche_left"> <div class="sche_left">
<i class="iconfont icon-arrow-right1" <i class="iconfont icon-arrow-left" :class="{'canClick_Color':EmergenciesIndex!=0}"
:class="{'canClick_Color':EmergenciesIndex!=saveObj.EmergenciesList.length-1}" @click="EmergenciesMove(1)"></i>
@click="EmergenciesMove(2)"></i> </div>
<div class="sche_Page">{{EmergenciesIndex+1}}/{{this.saveObj.EmergenciesList.length}}</div>
<div class="sche_left">
<i class="iconfont icon-arrow-right1"
:class="{'canClick_Color':EmergenciesIndex!=saveObj.EmergenciesList.length-1}"
@click="EmergenciesMove(2)"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -252,13 +323,21 @@ ...@@ -252,13 +323,21 @@
<div class="secondList_Bottom"> <div class="secondList_Bottom">
<div class="sche_ListInner" v-if="HandoverObj">{{HandoverObj.OtherContent}}</div> <div class="sche_ListInner" v-if="HandoverObj">{{HandoverObj.OtherContent}}</div>
</div> </div>
<div class="sche_Fenye" v-if="saveObj&&saveObj.HandoverList.length>0"> <div class="tufa_btm">
<div class="sche_left" :class="{'canClick_Color':HandoverIndex!=0}"> <div>
<i class="iconfont icon-arrow-left" @click="HandoverMove(1)"></i> <div class="tufa_xiugai">
<span style="margin-right:10px;">修改</span>|<span style="margin-left:10px;">删除</span>
<q-btn color="accent" style="margin-left:10px;" slot="reference" size="sm" label="确认完成" />
</div>
</div> </div>
<div class="sche_Page">{{HandoverIndex+1}}/{{this.saveObj.HandoverList.length}}</div> <div class=" sche_Fenye" v-if="saveObj&&saveObj.HandoverList.length>0">
<div class="sche_left" :class="{'canClick_Color':HandoverIndex!=saveObj.HandoverList.length-1}"> <div class="sche_left" :class="{'canClick_Color':HandoverIndex!=0}">
<i class="iconfont icon-arrow-right1" @click="HandoverMove(2)"></i> <i class="iconfont icon-arrow-left" @click="HandoverMove(1)"></i>
</div>
<div class="sche_Page">{{HandoverIndex+1}}/{{this.saveObj.HandoverList.length}}</div>
<div class="sche_left" :class="{'canClick_Color':HandoverIndex!=saveObj.HandoverList.length-1}">
<i class="iconfont icon-arrow-right1" @click="HandoverMove(2)"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -296,7 +375,7 @@ ...@@ -296,7 +375,7 @@
PlanShift: 0, //值班班次 PlanShift: 0, //值班班次
PlanType: 3, //值班类型(1-值班事项,2-交接事项,3-突发事项) PlanType: 3, //值班类型(1-值班事项,2-交接事项,3-突发事项)
PlanId: 0, //值班编号 PlanId: 0, //值班编号
FileURL: "", //文件路径 FileList: [], //文件路径
OtherContent: "", //突发事项、工作交接(值班类型为2.3是使用)内容 OtherContent: "", //突发事项、工作交接(值班类型为2.3是使用)内容
OtherRemark: "", //突发事项、工作交接(值班类型为2.3是使用)备注 OtherRemark: "", //突发事项、工作交接(值班类型为2.3是使用)备注
}, },
...@@ -306,10 +385,19 @@ ...@@ -306,10 +385,19 @@
PlanShift: 0, //值班班次 PlanShift: 0, //值班班次
PlanType: 2, //值班类型(1-值班事项,2-交接事项,3-突发事项) PlanType: 2, //值班类型(1-值班事项,2-交接事项,3-突发事项)
PlanId: 0, //值班编号 PlanId: 0, //值班编号
FileURL: "", //文件路径 FileList: [], //文件路径
OtherContent: "", //突发事项、工作交接(值班类型为2.3是使用)内容 OtherContent: "", //突发事项、工作交接(值班类型为2.3是使用)内容
OtherRemark: "", //突发事项、工作交接(值班类型为2.3是使用)备注 OtherRemark: "", //突发事项、工作交接(值班类型为2.3是使用)备注
}, },
uploadDisabled: false,
logoId: "1", //专区logo id
dialogVisible: false,
fileList: [],
ruleForm: {
dialogImageUrl: "1", //专区logo 上传到后台之后,后台会返回一个id,只需要给后台传id,但是点击编辑的时候后台返回的是http地址
},
fileListOne:[],
} }
}, },
created() { created() {
...@@ -387,7 +475,8 @@ ...@@ -387,7 +475,8 @@
UploadAttachment(files) { UploadAttachment(files) {
UploadSelfFile('Attachment', files.file, res => { UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) { if (res.Code == 1) {
this.addMsg2.FileURL = res.FileUrl; this.addMsg2.FileList.push(res.FileUrl);
this.fileListOne.push({url: res.FileUrl})
} }
}) })
}, },
...@@ -417,6 +506,7 @@ ...@@ -417,6 +506,7 @@
saveTufa() { saveTufa() {
this.addMsg2.PlanShift = this.saveObj.Shift; this.addMsg2.PlanShift = this.saveObj.Shift;
this.addMsg2.PlanId = this.saveObj.Id; this.addMsg2.PlanId = this.saveObj.Id;
SetDutyContent(this.addMsg2).then(res => { SetDutyContent(this.addMsg2).then(res => {
this.$emit('refreshPage'); this.$emit('refreshPage');
this.$refs.hengLine.click(); this.$refs.hengLine.click();
...@@ -430,7 +520,46 @@ ...@@ -430,7 +520,46 @@
this.$emit('refreshPage'); this.$emit('refreshPage');
this.$refs.hengLine.click(); this.$refs.hengLine.click();
}) })
} },
//删除突发新增图片
handleRemoveAdd(file,fileList){
this.fileList.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListOne.splice(index,1)
}
})
this.addMsg2.FileList.forEach((item,index)=>{
if(item==file.url)
{
this.addMsg2.FileList.splice(index,1)
}
})
},
//删除图片
handleRemove(file, fileList) {
console.log(file);
this.uploadDisabled = false;
},
//上传中
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
console.log(this.dialogImageUrl);
this.dialogVisible = true;
this.uploadDisabled = true;
},
//上传成功
handleUploadSuccess(file) {
this.ruleForm.dialogImageUrl = file.result; //专区logoId
this.uploadDisabled = true;
},
}, },
} }
......
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