Commit 937c05e7 authored by zhengke's avatar zhengke

修改

parent 05fcbc7e
......@@ -242,45 +242,36 @@
v-model="addMsg2.OtherContent" :rows="5"></el-input>
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveTufa" label="保存" />
</div>
<div slot="reference" class="addSche">
<div slot="reference" class="addSche" @click="clearAddMsg2">
<i class="iconfont icon-img_haha"></i>
</div>
</el-popover>
</div>
<div class="secondList_Bottom">
<div class="tufa_List">
<div class="tufa_left">
<img src="../../assets/images/tufa.png" />
<div class="tufa_left" v-if="EmergenciesObj&&EmergenciesObj.FileList">
<img :src="EmergenciesObj.FileList[0]" />
</div>
<div>
打开门面,把电视打开,打扫前台和每处卫生
注意:不能在前台吃早饭
<div v-if="EmergenciesObj.OtherContent">
{{EmergenciesObj.OtherContent}}
</div>
</div>
<!-- <div class="sche_List_in">
<div class="sche_ListInner" v-if="EmergenciesObj">{{EmergenciesObj.OtherContent}}</div>
</div> -->
</div>
<div class="tufa_btm">
<div>
<div class="tufa_xiugai">
<el-popover placement="bottom" popper-class="tufaPop" width="400" trigger="click">
<el-popover placement="bottom" popper-class="tufaPop" width="410" 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">
<el-upload class="schedul_Upload" action="" list-type="picture-card" :show-file-list="true"
:file-list="fileListTwo" :on-remove="handleRemoveEdit" :http-request="UploadEdit">
<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="保存" />
<el-input type="textarea" style="margin-top:20px;" v-model="addMsg2.OtherContent" :rows="4" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveEdit(EmergenciesObj)" label="保存" />
</div>
<span slot="reference" style="margin-right:10px;cursor:pointer;">修改</span>
<span slot="reference" style="margin-right:10px;cursor:pointer;" @click="EditTufa(EmergenciesObj)">修改</span>
</el-popover>
|<span style="margin-left:10px;cursor:pointer;">删除</span>
<q-btn color="accent" style="margin-left:10px;" slot="reference" size="sm" label="确认完成" />
|<span style="margin-left:15px;cursor:pointer;" @click="delTufa()">删除</span>
</div>
</div>
<div class=" sche_Fenye" v-if="saveObj&&saveObj.EmergenciesList.length>0">
......@@ -306,28 +297,44 @@
:class="{'schNoneNum':saveObj.HandoverList.length==0}">{{this.saveObj.HandoverList.length}}</span>
<el-popover placement="bottom" popper-class="tufaPop" width="400" trigger="click">
<div>
<el-upload class="schedul_Upload" action="" :style="{'background-image': 'url('+addMsg3.FileURL+')'}"
:show-file-list="false" :http-request="UploadJiaojie">
<el-upload class="schedul_Upload" action="" list-type="picture-card" :show-file-list="true"
:file-list="fileListThree" :on-remove="jiaojieRemoveAdd" :http-request="UploadJiaojie">
<i class="el-icon-plus"></i>
<div class="upDiv"></div>
</el-upload>
<el-input type="textarea" style="margin-top:20px;" resize="none" placeholder="添加文字内容"
v-model="addMsg3.OtherContent" :rows="5"></el-input>
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveJiaojie" label="保存" />
</div>
<div slot="reference" class="addSche">
<div slot="reference" class="addSche" @click="clearAddMsg3">
<i class="iconfont icon-img_haha"></i>
</div>
</el-popover>
</div>
<div class="secondList_Bottom">
<div class="sche_ListInner" v-if="HandoverObj">{{HandoverObj.OtherContent}}</div>
<div class="tufa_List">
<div class="tufa_left" v-if="HandoverObj&&HandoverObj.FileList">
<img :src="HandoverObj.FileList[0]" />
</div>
<div v-if="HandoverObj.OtherContent">
{{HandoverObj.OtherContent}}
</div>
</div>
</div>
<div class="tufa_btm">
<div>
<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="确认完成" />
<el-popover placement="bottom" popper-class="tufaPop" width="410" trigger="click">
<div>
<el-upload class="schedul_Upload" action="" list-type="picture-card" :show-file-list="true"
:file-list="fileListFour" :on-remove="jiaoRemoveEdit" :http-request="jiaojieEdit">
<i class="el-icon-plus"></i>
</el-upload>
<el-input type="textarea" style="margin-top:20px;" v-model="addMsg3.OtherContent" :rows="4" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveJJEdit(HandoverObj)" label="保存" />
</div>
<span slot="reference" style="margin-right:10px;cursor:pointer;" @click="EditJiaojie(HandoverObj)">修改</span>
</el-popover>
|<span style="margin-left:10px;cursor:pointer;" @click="delJiaojie()">删除</span>
</div>
</div>
<div class=" sche_Fenye" v-if="saveObj&&saveObj.HandoverList.length>0">
......@@ -346,7 +353,8 @@
</template>
<script>
import {
SetDutyContent
SetDutyContent,
RemoveDutyContent
} from '../../api/scheduling/schedu'
import {
UploadSelfFile
......@@ -397,7 +405,11 @@
ruleForm: {
dialogImageUrl: "1", //专区logo 上传到后台之后,后台会返回一个id,只需要给后台传id,但是点击编辑的时候后台返回的是http地址
},
fileListOne:[],
fileListOne:[], //突发新增图片数组
fileListTwo:[], //突发修改图片数组
fileListThree:[], //交接说明图片数组
fileListFour:[],//交接修改图片数组
}
},
created() {
......@@ -483,7 +495,8 @@
UploadJiaojie(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileURL = res.FileUrl;
this.addMsg3.FileList.push(res.FileUrl);
this.fileListThree.push({url: res.FileUrl})
}
})
},
......@@ -506,12 +519,32 @@
saveTufa() {
this.addMsg2.PlanShift = this.saveObj.Shift;
this.addMsg2.PlanId = this.saveObj.Id;
SetDutyContent(this.addMsg2).then(res => {
this.$emit('refreshPage');
this.$refs.hengLine.click();
})
},
//保存编辑突发
saveEdit(obj){
this.addMsg2.PlanShift = obj.PlanShift;
this.addMsg2.PlanId = obj.PlanId;
this.addMsg2.Id = obj.Id;
SetDutyContent(this.addMsg2).then(res => {
this.$emit('refreshPage');
this.$refs.hengLine.click();
})
},
//保存编辑交接
saveJJEdit(obj){
this.addMsg3.PlanShift = obj.PlanShift;
this.addMsg3.PlanId = obj.PlanId;
this.addMsg3.Id = obj.Id;
SetDutyContent(this.addMsg3).then(res => {
this.$emit('refreshPage');
this.$refs.hengLine.click();
})
},
//交接工作
saveJiaojie() {
this.addMsg3.PlanShift = this.saveObj.Shift;
......@@ -521,10 +554,28 @@
this.$refs.hengLine.click();
})
},
//删除交接新增图片
jiaojieRemoveAdd(file,fileList){
this.fileListThree.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListThree.splice(index,1)
}
})
this.addMsg3.FileList.forEach((item,index)=>{
if(item==file.url)
{
this.addMsg3.FileList.splice(index,1)
}
})
},
//删除突发新增图片
handleRemoveAdd(file,fileList){
this.fileList.forEach((item,index)=>{
this.fileListOne.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListOne.splice(index,1)
......@@ -537,29 +588,126 @@
}
})
},
//删除图片
handleRemove(file, fileList) {
console.log(file);
this.uploadDisabled = false;
//删除突发编辑图片
handleRemoveEdit(file,fileList){
this.fileListTwo.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListTwo.splice(index,1)
}
})
this.addMsg2.FileList.forEach((item,index)=>{
if(item==file.url)
{
this.addMsg2.FileList.splice(index,1)
}
})
},
//上传中
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
console.log(this.dialogImageUrl);
this.dialogVisible = true;
this.uploadDisabled = true;
jiaoRemoveEdit(file,fileList){
this.fileListFour.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListFour.splice(index,1)
}
})
this.addMsg3.FileList.forEach((item,index)=>{
if(item==file.url)
{
this.addMsg3.FileList.splice(index,1)
}
})
},
//上传成功
handleUploadSuccess(file) {
this.ruleForm.dialogImageUrl = file.result; //专区logoId
this.uploadDisabled = true;
UploadEdit(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg2.FileList.push(res.FileUrl);
this.fileListTwo.push({url: res.FileUrl})
}
})
},
//
jiaojieEdit(files){
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileList.push(res.FileUrl);
this.fileListFour.push({url: res.FileUrl})
}
})
},
//修改突发
EditTufa(obj){
console.log(obj,'obj');
this.addMsg2.OtherContent = obj.OtherContent;
this.addMsg2.FileList = obj.FileList;
this.fileListTwo=[];
obj.FileList.forEach(x=>{
this.fileListTwo.push({url: x})
})
},
EditJiaojie(obj){
console.log(obj,'objjjj');
this.addMsg3.OtherContent = obj.OtherContent;
this.addMsg3.FileList = obj.FileList;
this.fileListFour=[];
obj.FileList.forEach(x=>{
this.fileListFour.push({url: x})
})
},
//删除突发
delTufa(){
this.$nextTick(() => {
var Obj = this.saveObj.EmergenciesList[this.EmergenciesIndex];
let msg = {
Id:Obj.Id
}
SetDutyContent(msg).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.EmergenciesIndex=0;
this.$emit('refreshPage');
this.$forceUpdate();
})
})
},
//删除交接
delJiaojie(){
this.$nextTick(() => {
var Obj = this.saveObj.HandoverList[this.HandoverIndex];
let msg = {
Id:Obj.Id
}
SetDutyContent(msg).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.HandoverIndex=0;
this.$emit('refreshPage');
this.$forceUpdate();
})
})
},
//清除addmsg2
clearAddMsg2(){
this.addMsg2.OtherContent='';
this.addMsg2.FileList=[];
this.fileListOne=[];
},
clearAddMsg3(){
this.addMsg3.OtherContent='';
this.addMsg3.FileList=[];
this.fileListThree=[];
}
},
}
......
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