Commit bf397e60 authored by zhengke's avatar zhengke

修改

parent 23527e94
......@@ -24,9 +24,10 @@
.sche_mid .el-input__inner {
border: 0;
width: 90%;
width: 100%;
height: 30px;
line-height: 30px;
padding:0;
}
.sche_Fenye {
......@@ -175,6 +176,7 @@
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-all;
}
.sch_dagouimg {
......@@ -184,7 +186,26 @@
right: 0px;
bottom: -10px;
}
.SchImg_List{
width:120px;
height:120px;
border:1px solid #d1d1d1;
position: relative;
margin-right:5px;
display: inline-block;
}
.SchImg_List img{
width:100%;
height:100%;
}
.sch_del{
position: absolute;
right:-4px;
top:-8px;
color:red;
cursor: pointer;
font-size:20px;
}
</style>
<template>
<div>
......@@ -227,8 +248,8 @@
<template v-if="WorkObj.ItemType==1">
<q-btn color="accent" v-if="WorkObj.IsChecked==0" style="margin-left:10px;" slot="reference"
@click="WorkObj.IsChecked=1,saveOrder()" size="sm" label="确认完成" />
<q-btn color="accent" v-if="WorkObj.IsChecked==1" style="margin-left:10px;" slot="reference"
@click="WorkObj.IsChecked=0,saveOrder()" size="sm" label="取消完成" />
<q-btn v-if="WorkObj.IsChecked==1" flat @click="WorkObj.IsChecked=0,saveOrder()" style="margin-left:10px;"
class="schedu_red" label="取消完成" />
</template>
<template v-if="WorkObj.ItemType==2">
<q-btn color="accent" style="margin-left:10px;" v-if="isShowSure" slot="reference" @click="saveOrder()"
......@@ -258,10 +279,16 @@
<div class="sche_hengLine" ref="hengLine"></div>
<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="fileListOne" :on-remove="handleRemoveAdd" :http-request="UploadAttachment">
<div>
<div class="SchImg_List" v-for="(item,index) in addMsg2.FileList">
<img :src="item" alt="">
<i class="iconfont icon-yiquxiao sch_del" @click="handleRemoveAdd(index)"></i>
</div>
<el-upload class="schedul_Upload" style="display:inline;" action="" list-type="picture-card" :show-file-list="false"
:http-request="UploadAttachment">
<i class="el-icon-plus"></i>
</el-upload>
</div>
<el-input type="textarea" style="margin-top:20px;" resize="none" placeholder="添加文字内容"
v-model="addMsg2.OtherContent" :rows="5"></el-input>
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveTufa" label="保存" />
......@@ -288,10 +315,16 @@
<div class="tufa_xiugai">
<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="fileListTwo" :on-remove="handleRemoveEdit" :http-request="UploadEdit">
<div>
<div class="SchImg_List" v-for="(item,index) in addMsg2.FileList">
<img :src="item" alt="">
<i class="iconfont icon-yiquxiao sch_del" @click="handleRemoveAdd(index)"></i>
</div>
<el-upload class="schedul_Upload" style="display:inline;" action="" list-type="picture-card" :show-file-list="false"
:http-request="UploadEdit">
<i class="el-icon-plus"></i>
</el-upload>
</div>
<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="保存" />
......@@ -326,10 +359,16 @@
:class="{'schNoneNum':HandoverList.length==0}">{{this.HandoverList.length}}</span>
<el-popover placement="bottom" popper-class="tufaPop" width="400" trigger="click">
<div>
<el-upload class="schedul_Upload" action="" list-type="picture-card" :show-file-list="true"
:file-list="fileListThree" :on-remove="jiaojieRemoveAdd" :http-request="UploadJiaojie">
<div>
<div class="SchImg_List" v-for="(item,index) in addMsg3.FileList">
<img :src="item" alt="">
<i class="iconfont icon-yiquxiao sch_del" @click="jiaojieRemoveAdd(index)"></i>
</div>
<el-upload class="schedul_Upload" style="display:inline;" action="" list-type="picture-card" :show-file-list="false"
:http-request="UploadJiaojie">
<i class="el-icon-plus"></i>
</el-upload>
</div>
<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="保存" />
......@@ -356,10 +395,16 @@
<div class="tufa_xiugai">
<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">
<div>
<div class="SchImg_List" v-for="(item,index) in addMsg3.FileList">
<img :src="item" alt="">
<i class="iconfont icon-yiquxiao sch_del" @click="jiaojieRemoveAdd(index)"></i>
</div>
<el-upload class="schedul_Upload" style="display:inline;" action="" list-type="picture-card" :show-file-list="false"
:http-request="jiaojieEdit">
<i class="el-icon-plus"></i>
</el-upload>
</div>
<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="保存" />
......@@ -438,10 +483,6 @@
OtherRemark: "", //突发事项、工作交接(值班类型为2.3是使用)备注
},
fileList: [], //文件数组
fileListOne: [], //突发新增图片数组
fileListTwo: [], //突发修改图片数组
fileListThree: [], //交接说明图片数组
fileListFour: [], //交接修改图片数组
isShowSure: false, //是否显示确认完成按钮
//是否显示工作内容相关按钮
workAuthObj: {
......@@ -545,9 +586,6 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg2.FileList.push(res.FileUrl);
this.fileListOne.push({
url: res.FileUrl
})
}
})
},
......@@ -555,9 +593,6 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileList.push(res.FileUrl);
this.fileListThree.push({
url: res.FileUrl
})
}
})
},
......@@ -587,6 +622,7 @@
this.addMsg2.PlanId = this.saveObj.Id;
SetDutyContent(this.addMsg2).then(res => {
this.getWorkList();
this.$refs.hengLine.click();
})
},
//保存编辑突发
......@@ -616,63 +652,17 @@
})
},
//删除交接新增图片
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) {
jiaojieRemoveAdd(index) {
this.addMsg3.FileList.splice(index, 1)
}
})
},
//删除突发新增图片
handleRemoveAdd(file, fileList) {
this.fileListOne.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)
}
})
},
//删除突发编辑图片
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) {
handleRemoveAdd(index) {
this.addMsg2.FileList.splice(index, 1)
}
})
},
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)
}
})
},
UploadEdit(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg2.FileList.push(res.FileUrl);
this.fileListTwo.push({
url: res.FileUrl
})
}
})
},
......@@ -681,9 +671,6 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileList.push(res.FileUrl);
this.fileListFour.push({
url: res.FileUrl
})
}
})
},
......@@ -691,22 +678,10 @@
EditTufa(obj) {
this.addMsg2.OtherContent = obj.OtherContent;
this.addMsg2.FileList = obj.FileList;
this.fileListTwo = [];
obj.FileList.forEach(x => {
this.fileListTwo.push({
url: x
})
})
},
EditJiaojie(obj) {
this.addMsg3.OtherContent = obj.OtherContent;
this.addMsg3.FileList = obj.FileList;
this.fileListFour = [];
obj.FileList.forEach(x => {
this.fileListFour.push({
url: x
})
})
},
//删除突发
delTufa() {
......@@ -776,10 +751,8 @@
clearAddMsg2() {
this.addMsg2.OtherContent = '';
this.addMsg2.FileList = [];
this.fileListOne = [];
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