Commit 43421509 authored by zhengke's avatar zhengke
parents 87cbccfb e7f56f75
......@@ -165,22 +165,26 @@
.tufaPop .el-upload-list__item {
margin-bottom: 0;
}
.schedu_red {
color:var(--q-color-negative) !important;
color: var(--q-color-negative) !important;
}
.SchOtherContent{
.SchOtherContent {
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
}
.sch_dagouimg{
.sch_dagouimg {
position: absolute;
width:40px;
height:40px;
right:0px;
bottom:-10px;
width: 40px;
height: 40px;
right: 0px;
bottom: -10px;
}
</style>
<template>
<div>
......@@ -190,9 +194,6 @@
<img src="../../assets/images/work_list.png" />
<span class="word_sche">工作清单</span>
<div class="sche_hengLine"></div>
<div slot="reference" class="addSche" @click="saveOrder">
<i class="iconfont icon-chenggong" title="点击保存"></i>
</div>
<span class="word_scheNumber" v-if="saveObj&&saveObj.WorkList"
:class="{'schNoneNum':saveObj.WorkList.length==0}">{{this.saveObj.WorkList.length}}</span>
</div>
......@@ -202,9 +203,7 @@
<template v-if="WorkObj.ItemType==1">
<div class="sche_Dian" style="margin-top:5px;"></div>
<div class="sche_ListInner">{{WorkObj.ItemName}} </div>
<!-- <el-checkbox style="margin-top:5" :true-label="1" :false-label="0" v-model="WorkObj.IsChecked">
</el-checkbox> -->
<img class="sch_dagouimg" src="../../assets/images/da_gou.png" alt="" />
<img class="sch_dagouimg" v-if="WorkObj.IsChecked==1" src="../../assets/images/da_gou.png" alt="" />
</template>
<template v-else-if="WorkObj.ItemType==2">
<div class="sche_Dian"></div>
......@@ -215,8 +214,9 @@
<div>
<template v-if="WorkObj.ItemType==2">
<div style="margin:10px 20px;">
<span v-if="WorkObj.WorkContent">{{WorkObj.WorkContent}}</span>
<el-input v-else v-model="WorkObj.WorkContent" @focus="isShowSure=true" placeholder="完成情况怎么样"></el-input>
<span v-if="!isShowSure" @click="isShowSure=true">{{WorkObj.WorkContent}}</span>
<el-input v-else v-model="WorkObj.WorkContent" @focus="isShowSure=true" placeholder="完成情况怎么样">
</el-input>
</div>
</template>
</div>
......@@ -224,20 +224,15 @@
<div class="tufa_btm">
<div>
<div class="tufa_xiugai">
<template v-if="WorkObj.WorkContent">
<el-popover placement="bottom" popper-class="tufaPop" width="410" trigger="click">
<div>
<el-input type="textarea" :rows="4" v-model="WorkContent" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveOrder(2)" label="保存" />
</div>
<span slot="reference" style="margin-right:10px;cursor:pointer;" @click="getWorkContnt(WorkObj)">修改</span>
</el-popover>
</template>
<template v-if="WorkObj.ItemType==1">
<q-btn color="accent" style="margin-left:10px;" slot="reference" @click="saveOrder()" size="sm" label="确认完成1" />
<q-btn color="accent" v-if="WorkObj.IsChecked==0" style="margin-left:10px;" slot="reference"
@click="WorkObj.IsChecked=1,saveOrder()" size="sm" label="确认完成1" />
<q-btn color="accent" v-if="WorkObj.IsChecked==1" style="margin-left:10px;" slot="reference"
@click="WorkObj.IsChecked=0,saveOrder()" size="sm" label="取消" />
</template>
<template v-if="WorkObj.ItemType==2">
<q-btn color="accent" style="margin-left:10px;" v-if="isShowSure" slot="reference" @click="saveOrder()" size="sm" label="确认完成2" />
<q-btn color="accent" style="margin-left:10px;" v-if="isShowSure" slot="reference" @click="saveOrder()"
size="sm" label="确认完成2" />
</template>
</div>
</div>
......@@ -271,18 +266,15 @@
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" @click="clearAddMsg2">
<div slot="reference" class="addSche" @click="clearAddMsg2" v-if="workAuthObj.isShowAdd">
<i class="iconfont icon-img_haha"></i>
</div>
</el-popover>
</div>
<div class="secondList_Bottom">
<div class="tufa_List">
<div class="tufa_left" v-if="EmergenciesObj&&EmergenciesObj.FileList">
<el-image
:src="EmergenciesObj.FileList[0]"
:preview-src-list="EmergenciesObj.FileList">
<el-image :src="EmergenciesObj.FileList[0]" :preview-src-list="EmergenciesObj.FileList">
</el-image>
</div>
<div class="SchOtherContent" v-if="EmergenciesObj.OtherContent">
......@@ -290,7 +282,8 @@
</div>
</div>
</div>
<div class="tufa_btm" v-if="EmergenciesObj&&saveObj&&saveObj.EmergenciesList&&saveObj.EmergenciesList.length>0">
<div class="tufa_btm"
v-if="EmergenciesObj&&saveObj&&saveObj.EmergenciesList&&saveObj.EmergenciesList.length>0&&workAuthObj.isShowEditAndDelete">
<div>
<div class="tufa_xiugai">
<el-popover placement="bottom" popper-class="tufaPop" width="410" trigger="click">
......@@ -300,11 +293,15 @@
<i class="el-icon-plus"></i>
</el-upload>
<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="保存" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveEdit(EmergenciesObj)"
label="保存" />
</div>
<q-btn v-if="EmergenciesObj" slot="reference" flat @click="EditTufa(EmergenciesObj)" color="gray-10" label="修改" />
<q-btn v-if="EmergenciesObj" slot="reference" flat @click="EditTufa(EmergenciesObj)" color="gray-10"
label="修改" />
</el-popover>
|<q-btn v-if="EmergenciesObj" slot="reference" flat @click="delTufa()" style="margin-left:5px;" class="schedu_red" label="删除" />
|
<q-btn v-if="EmergenciesObj" slot="reference" flat @click="delTufa()" style="margin-left:5px;"
class="schedu_red" label="删除" />
</div>
</div>
<div class=" sche_Fenye" v-if="saveObj&&saveObj.EmergenciesList.length>0">
......@@ -338,7 +335,7 @@
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" @click="clearAddMsg3">
<div slot="reference" class="addSche" @click="clearAddMsg3" v-if="workAuthObj.isShowAdd">
<i class="iconfont icon-img_haha"></i>
</div>
</el-popover>
......@@ -346,17 +343,16 @@
<div class="secondList_Bottom">
<div class="tufa_List">
<div class="tufa_left" v-if="HandoverObj&&HandoverObj.FileList">
<el-image
:src="HandoverObj.FileList[0]"
:preview-src-list="HandoverObj.FileList">
</el-image>
<el-image :src="HandoverObj.FileList[0]" :preview-src-list="HandoverObj.FileList">
</el-image>
</div>
<div class="SchOtherContent" v-if="HandoverObj.OtherContent">
{{HandoverObj.OtherContent}}
</div>
</div>
</div>
<div class="tufa_btm" v-if="HandoverObj&&saveObj&&saveObj.HandoverList&&saveObj.HandoverList.length>0">
<div class="tufa_btm"
v-if="HandoverObj&&saveObj&&saveObj.HandoverList&&saveObj.HandoverList.length>0 && workAuthObj.isShowEditAndDelete">
<div>
<div class="tufa_xiugai">
<el-popover placement="bottom" popper-class="tufaPop" width="410" trigger="click">
......@@ -366,11 +362,15 @@
<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="保存" />
<q-btn color="accent" size="sm" style="float:right;margin-top:10px;" @click="saveJJEdit(HandoverObj)"
label="保存" />
</div>
<q-btn v-if="HandoverObj" slot="reference" flat @click="EditJiaojie(HandoverObj)" color="gray-10" label="修改" />
<q-btn v-if="HandoverObj" slot="reference" flat @click="EditJiaojie(HandoverObj)" color="gray-10"
label="修改" />
</el-popover>
|<q-btn v-if="HandoverObj" slot="reference" flat @click="delJiaojie()" style="margin-left:5px;" class="schedu_red" label="删除" />
|
<q-btn v-if="HandoverObj" slot="reference" flat @click="delJiaojie()" style="margin-left:5px;"
class="schedu_red" label="删除" />
</div>
</div>
<div class=" sche_Fenye" v-if="saveObj&&saveObj.HandoverList.length>0">
......@@ -401,6 +401,10 @@
saveObj: {
type: Object,
default: null
},
authObj: {
type: Object,
default: null
}
},
data() {
......@@ -441,18 +445,23 @@
ruleForm: {
dialogImageUrl: "1", //专区logo 上传到后台之后,后台会返回一个id,只需要给后台传id,但是点击编辑的时候后台返回的是http地址
},
fileListOne:[], //突发新增图片数组
fileListTwo:[], //突发修改图片数组
fileListThree:[], //交接说明图片数组
fileListFour:[],//交接修改图片数组
WorkContent:'',
isShowSure:false //是否显示确认完成按钮
fileListOne: [], //突发新增图片数组
fileListTwo: [], //突发修改图片数组
fileListThree: [], //交接说明图片数组
fileListFour: [], //交接修改图片数组
WorkContent: '',
isShowSure: false, //是否显示确认完成按钮
//是否显示工作内容相关按钮
workAuthObj: {
isShowAdd: true, //是否显示新增按钮【默认不显示】
isShowEditAndDelete: true, //是否显示编辑和删除按钮【默认不显示】
}
}
},
created() {
console.log("saveObj", this.saveObj);
this.initAuth()
},
watch: {
saveObj: {
......@@ -472,6 +481,17 @@
},
methods: {
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowAdd != null && !this.authObj.isShowAdd) {
this.workAuthObj.isShowAdd = this.authObj.isShowAdd;
}
if (this.authObj.isShowEditAndDelete != null && !this.authObj.isShowEditAndDelete) {
this.workAuthObj.isShowEditAndDelete = this.authObj.isShowEditAndDelete;
}
}
},
WorkMove(type) {
//上一条
if (type == 1) {
......@@ -527,7 +547,9 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg2.FileList.push(res.FileUrl);
this.fileListOne.push({url: res.FileUrl})
this.fileListOne.push({
url: res.FileUrl
})
}
})
},
......@@ -535,11 +557,13 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileList.push(res.FileUrl);
this.fileListThree.push({url: res.FileUrl})
this.fileListThree.push({
url: res.FileUrl
})
}
})
},
getWorkContnt(obj){
getWorkContnt(obj) {
this.WorkContent = obj.WorkContent;
},
//保存工作清单
......@@ -553,13 +577,16 @@
WorkIsFinish: this.WorkObj.IsChecked,
ItemId: this.WorkObj.ItemId,
};
if(type==2){
if (type == 2) {
saveWorkMsg.WorkContent = this.WorkContent;
}
SetDutyContent(saveWorkMsg).then(res => {
this.isShowSure = false;
this.$emit('refreshPage');
this.$refs.hengLine.click();
})
this.isShowSure = false;
},
//保存突发事件
saveTufa() {
......@@ -572,7 +599,7 @@
})
},
//保存编辑突发
saveEdit(obj){
saveEdit(obj) {
this.addMsg2.PlanShift = obj.PlanShift;
this.addMsg2.PlanId = obj.PlanId;
this.addMsg2.Id = obj.Id;
......@@ -582,7 +609,7 @@
})
},
//保存编辑交接
saveJJEdit(obj){
saveJJEdit(obj) {
this.addMsg3.PlanShift = obj.PlanShift;
this.addMsg3.PlanId = obj.PlanId;
this.addMsg3.Id = obj.Id;
......@@ -600,67 +627,59 @@
this.$refs.hengLine.click();
})
},
//删除交接新增图片
jiaojieRemoveAdd(file,fileList){
this.fileListThree.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListThree.splice(index,1)
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)
this.addMsg3.FileList.forEach((item, index) => {
if (item == file.url) {
this.addMsg3.FileList.splice(index, 1)
}
})
},
//删除突发新增图片
handleRemoveAdd(file,fileList){
this.fileListOne.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListOne.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)
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)
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)
this.addMsg2.FileList.forEach((item, index) => {
if (item == file.url) {
this.addMsg2.FileList.splice(index, 1)
}
})
},
jiaoRemoveEdit(file,fileList){
this.fileListFour.forEach((item,index)=>{
if(item.url==file.url)
{
this.fileListFour.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)
this.addMsg3.FileList.forEach((item, index) => {
if (item == file.url) {
this.addMsg3.FileList.splice(index, 1)
}
})
},
......@@ -668,45 +687,53 @@
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg2.FileList.push(res.FileUrl);
this.fileListTwo.push({url: res.FileUrl})
this.fileListTwo.push({
url: res.FileUrl
})
}
})
},
//
jiaojieEdit(files){
jiaojieEdit(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
this.addMsg3.FileList.push(res.FileUrl);
this.fileListFour.push({url: res.FileUrl})
this.fileListFour.push({
url: res.FileUrl
})
}
})
},
//修改突发
EditTufa(obj){
console.log(obj,'obj');
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})
this.fileListTwo = [];
obj.FileList.forEach(x => {
this.fileListTwo.push({
url: x
})
})
},
EditJiaojie(obj){
console.log(obj,'objjjj');
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})
this.fileListFour = [];
obj.FileList.forEach(x => {
this.fileListFour.push({
url: x
})
})
},
//删除突发
delTufa(){
delTufa() {
this.$nextTick(() => {
var Obj = this.saveObj.EmergenciesList[this.EmergenciesIndex];
let msg = {
Id:Obj.Id
Id: Obj.Id
}
SetDutyContent(msg).then(res => {
this.$q.notify({
......@@ -716,18 +743,18 @@
message: res.Message,
position: 'top'
})
this.EmergenciesIndex=0;
this.EmergenciesIndex = 0;
this.$emit('refreshPage');
this.$forceUpdate();
})
})
})
},
//删除交接
delJiaojie(){
delJiaojie() {
this.$nextTick(() => {
var Obj = this.saveObj.HandoverList[this.HandoverIndex];
let msg = {
Id:Obj.Id
Id: Obj.Id
}
SetDutyContent(msg).then(res => {
this.$q.notify({
......@@ -737,22 +764,22 @@
message: res.Message,
position: 'top'
})
this.HandoverIndex=0;
this.HandoverIndex = 0;
this.$emit('refreshPage');
this.$forceUpdate();
})
})
})
},
//清除addmsg2
clearAddMsg2(){
this.addMsg2.OtherContent='';
this.addMsg2.FileList=[];
this.fileListOne=[];
clearAddMsg2() {
this.addMsg2.OtherContent = '';
this.addMsg2.FileList = [];
this.fileListOne = [];
},
clearAddMsg3(){
this.addMsg3.OtherContent='';
this.addMsg3.FileList=[];
this.fileListThree=[];
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