master
lion 1 year ago
parent 5ad4dd02b1
commit e6af2ed9be

@ -372,7 +372,7 @@
<template v-slot:footerContent>
<Button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="clickSubmit"></Button>
</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
<Button v-if="type!='send'" type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
<Poptip v-if="type=='editor'" transfer confirm title="确认要删除吗?" @on-ok="deleteList">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
@ -802,7 +802,7 @@
if (this.type === 'send') {
this.now_do_admin_ids = _arr
console.log("this.now_do_admin_ids",this.now_do_admin_ids)
if(this.form.do_admin_ids && this.form.do_admin_ids.length>0){
if(this.form.do_admin_ids){
_arr.map(item=>{
if(!this.form.do_admin_ids.includes(item)){
this.form.do_admin_ids.push(item)
@ -1139,7 +1139,9 @@
if(!(this.form.audit_status==3||this.form.audit_status==5)){
console.log("this.betweenSe",this.form.start_date, this.form.end_date)
this.betweenSe(this.form.start_date, this.form.end_date)
if(!this.betweenSe(this.form.start_date, this.form.end_date)){
return
}
}
console.log("this.form",this.form)
// return
@ -1181,7 +1183,16 @@
return
}
if (this.type === 'editor' || this.type === 'send') {
if (this.type === 'editor' || this.type === 'send') {
if(this.type==='send'){
if(this.now_do_admin_ids.length<1){
Message({
type: 'warning',
message: '请选择承办人员'
})
return
}
}
save({
id: this.id,
...this.form
@ -1216,8 +1227,6 @@
from_user_id:this.stateObj.login_id
})
}
this.sendNotice({
id:res.model.id,
name:res.model.name,
@ -1233,17 +1242,17 @@
}
},
betweenSe(start, end) {
const startTime = new Date(start + "T00:00:00");
const endTime = new Date(end + "T23:59:59");
const nowTime = new Date();
nowTime.setHours(0, 0, 0, 0);
if(endTime<startTime){
Message({
type:'warning',
message: '任务完成时间不能小于开始时间'
})
return
}
const startTime = new Date(start + "T00:00:00");
const endTime = new Date(end + "T23:59:59");
const nowTime = new Date();
nowTime.setHours(0, 0, 0, 0);
if(endTime<startTime){
Message({
type:'warning',
message: '任务完成时间不能小于开始时间'
})
return false
}
if (nowTime < startTime) {
this.form.audit_status = 4
}
@ -1252,7 +1261,8 @@
}
if (nowTime >= startTime && nowTime <= endTime) {
this.form.audit_status = 1
}
}
return true
},
handleRemove(file, fileList) {
this.pictureList = fileList

@ -40,12 +40,12 @@
<div v-for="item in pictureList">
<!-- <el-button size="small" style="margin:5px" type="primary" v-if="type=='study'"
@click='openStudy(item.url,item.name)'>开始学习</el-button> -->
<a :href="item.url" target="_blank">{{item.name}}</a>
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
<a :href="item.url" target="_blank">{{item.name}}</a>
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
</el-link>
<!-- <span v-if="type=='study'" @click='openStudy(item.url,item.name)' style="color:red;cursor:pointer;text-decoration: underline;margin:0 5px"></span> -->
</div>
@ -80,32 +80,34 @@
{{item.accept_admin.name}},
</template>
</span>
</el-descriptions-item>
<!-- 我的任务中的 转办 -->
<el-descriptions-item span='4' v-if="url_type==5&&showform.mission_distribute&&showform.mission_distribute.length>0">
<template slot="label">
任务承办人
</template>
<span v-for="item in showform.mission_distribute">
<!-- 非责任人 -->
<template v-if="item.admin_type===2 && item.from_user_id===stateObj.login_id">
{{item.accept_admin.name}},
</template>
</span>
</el-descriptions-item>
<!-- 任务追踪中的 转办 -->
<el-descriptions-item span='4' v-if="url_type!=5&&showform.mission_distribute&&showform.mission_distribute.length>0">
<template slot="label">
任务承办人
</template>
<span v-for="item in showform.mission_distribute">
<!-- 非责任人 -->
<template v-if="item.admin_type===2">
{{item.accept_admin.name}},
</template>
</span>
</el-descriptions-item>
</el-descriptions-item>
<!-- 我的任务中的 转办 -->
<el-descriptions-item span='4'
v-if="url_type==5&&showform.mission_distribute&&showform.mission_distribute.length>0">
<template slot="label">
任务承办人
</template>
<span v-for="item in showform.mission_distribute">
<!-- 非责任人 -->
<template v-if="item.admin_type===2 && item.from_user_id===stateObj.login_id">
{{item.accept_admin.name}},
</template>
</span>
</el-descriptions-item>
<!-- 任务追踪中的 转办 -->
<el-descriptions-item span='4'
v-if="url_type!=5&&showform.mission_distribute&&showform.mission_distribute.length>0">
<template slot="label">
任务承办人
</template>
<span v-for="item in showform.mission_distribute">
<!-- 非责任人 -->
<template v-if="item.admin_type===2">
{{item.accept_admin.name}},
</template>
</span>
</el-descriptions-item>
<el-descriptions-item span='4' v-if="is_what_unitType==='答题'">
@ -156,24 +158,25 @@
<el-divider>执行情况</el-divider>
<!-- 所有人的执行情况 -->
<div v-if="url_type!=5">
<xy-table :list="showform.mission_distribute" stripe :table-item="distributeTable" :isPage='false'>
<template v-slot:accept_admin_name>
<el-table-column align='left' label="执行人" width="140" header-align="center">
<template slot-scope="scope">
<!-- 有组别的 -->
<div v-if="scope.row.mission_group_id">
{{scope.row.mission_group?(scope.row.mission_group.name?scope.row.mission_group.name:''):''}}
{{scope.row.mission_group?(scope.row.mission_group.type==1?'组长'+':':':'):''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
<div v-else>
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.admin_type==1?'责任人:':''}}
{{scope.row.admin_type==2?'承办人:':''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
</template>
</el-table-column>
<xy-table :list="showform.mission_distribute" stripe :table-item="distributeTable" :isPage='false'>
<template v-slot:accept_admin_name>
<el-table-column align='left' label="执行人" width="140" header-align="center">
<template slot-scope="scope">
<!-- 有组别的 -->
<div v-if="scope.row.mission_group_id">
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.mission_group?(scope.row.mission_group.name?scope.row.mission_group.name:''):''}}
{{scope.row.mission_group?(scope.row.mission_group.type==1?'组长'+':':':'):''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
<div v-else>
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.admin_type==1?'责任人:':''}}
{{scope.row.admin_type==2?'承办人:':''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
</template>
</el-table-column>
</template>
<template v-slot:carry_type>
<el-table-column align='center' label="执行方式" width="120" header-align="center">
@ -192,7 +195,8 @@
<template slot-scope="scope">
<div v-if="scope.row.carry_status===0"></div>
<div v-else-if="scope.row.carry_status===1">执行中</div>
<div v-else-if="scope.row.carry_status===2">已完成</div>
<div v-else-if="scope.row.carry_status===2 && scope.row.carry_type!=2">已完成</div>
<div v-else-if="scope.row.carry_status===2 && scope.row.carry_type===2">已转办</div>
<div v-else></div>
</template>
</el-table-column>
@ -211,15 +215,15 @@
<template v-slot:file_ids>
<el-table-column align='left' label="成果资料" width="120">
<template slot-scope="scope">
<div v-for="item in scope.row.files">
<div style="color:#2D8cF0;cursor: pointer;">
{{item.original_name}}
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
</el-link>
<div v-for="item in scope.row.files">
<div style="color:#2D8cF0;cursor: pointer;">
{{item.original_name}}
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
</el-link>
</div>
</div>
</template>
@ -239,25 +243,27 @@
</div>
<!-- 我的代办里的 -->
<div v-else>
<xy-table :list="my_mission_distribute" stripe :table-item="distributeTable" :isPage='false'>
<template v-slot:accept_admin_name>
<el-table-column align='left' label="执行人" width="140" header-align="center">
<template slot-scope="scope">
<!-- 有组别的 -->
<div v-if="scope.row.mission_group_id">
{{scope.row.mission_group?(scope.row.mission_group.name?scope.row.mission_group.name:''):''}}
{{scope.row.mission_group?(scope.row.mission_group.type==1?'组长'+':':':'):''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
<div v-else>
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.admin_type==1?'责任人:':''}}
{{scope.row.admin_type==2?'承办人:':''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
</template>
</el-table-column>
<xy-table :list="my_mission_distribute" stripe :table-item="distributeTable" :isPage='false'>
<template v-slot:accept_admin_name>
<el-table-column align='left' label="执行人" width="140" header-align="center">
<template slot-scope="scope">
<!-- 有组别的 -->
<div v-if="scope.row.mission_group_id">
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.mission_group?(scope.row.mission_group.name?scope.row.mission_group.name:''):''}}
{{scope.row.mission_group?(scope.row.mission_group.type==1?'组长'+':':':'):''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
<div v-else>
<div v-if="scope.row.from_user">:{{scope.row.from_user?scope.row.from_user.name:''}}</div>
{{scope.row.admin_type==1?'责任人:':''}}
{{scope.row.admin_type==2?'承办人:':''}}
{{scope.row.accept_admin?scope.row.accept_admin.name:''}}
</div>
</template>
</el-table-column>
</template>
<template v-slot:carry_type>
<el-table-column align='center' label="执行方式" width="80" header-align="center">
@ -296,15 +302,15 @@
<el-table-column align='left' label="成果资料" width="120">
<template slot-scope="scope">
<div v-for="item in scope.row.files">
<div style="color:#2D8cF0;cursor: pointer;">
{{item.original_name}}
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
</el-link>
</div>
<div style="color:#2D8cF0;cursor: pointer;">
{{item.original_name}}
<el-link target="_blank" style="margin:0 10px;" @click="toshowFile(item.url)" type="primary">
预览
</el-link>
<el-link target="_blank" @click="base.downLoadFileUrl(item.id)" type="primary">
下载
</el-link>
</div>
</div>
</template>
@ -323,7 +329,7 @@
<Button style="margin-bottom: 5px;"
v-if="scope.row.carry_type===1 && !(scope.row.carry_status==2)"
@click="carryTypeWhat('carry_type1')" type="primary" size="small">任务分解</Button>
<!-- <Button style="margin-bottom: 5px;" v-if="scope.row.carry_type===2" @click="editorUnit('send')" type="primary" size="small"
<!-- <Button style="margin-bottom: 5px;" v-if="scope.row.carry_type===2" @click="editorUnit('send')" type="primary" size="small"
>任务转办</Button> -->
<Button style="margin-bottom: 5px;" v-if="scope.row.keep_status===-1"
@click="startLoad(scope.row,'editor')" type="primary" size="small">提交进展</Button>
@ -380,8 +386,8 @@
<addUnit ref="addUnit" @refresh="carryFinish"></addUnit>
<!-- <checkUnit ref="checkUnit"></checkUnit> -->
<showLogs ref="showLogs"></showLogs>
<addBackPlan ref="addBackPlan" @reload="getDetail" @reloadList="reloadList"></addBackPlan>
<viewFile ref='viewFile'></viewFile>
<addBackPlan ref="addBackPlan" @reload="getDetail" @reloadList="reloadList"></addBackPlan>
<viewFile ref='viewFile'></viewFile>
</div>
</template>
@ -405,7 +411,7 @@
import state from "@/store/modules/user.js"
import viewFile from '@/components/viewFile/viewFile.vue'
import showLogs from '../components/showLogs.vue'
import addBackPlan from '../components/addBackPlan.vue'
import addBackPlan from '../components/addBackPlan.vue'
import {
deepCopy
} from '../../../../utils';
@ -485,8 +491,8 @@
distributeTable: [{
label: '执行人',
prop: 'accept_admin_name',
width: 140,
align:'left'
width: 140,
align: 'left'
}, {
label: '执行状态',
prop: 'carry_status',
@ -503,23 +509,23 @@
prop: 'end_date',
}, {
label: '进展状态',
prop: 'keep_status',
prop: 'keep_status',
width: 80
}, {
label: '当前进展概述',
prop: 'ing_introduce',
align:'left'
prop: 'ing_introduce',
align: 'left'
}, {
label: '完成概述',
prop: 'end_introduce',
align:'left'
prop: 'end_introduce',
align: 'left'
}, {
label: '成果资料',
prop: 'file_ids',
}, {
label: '审核意见',
prop: 'check_contents',
align:'left'
prop: 'check_contents',
align: 'left'
}],
}
@ -530,11 +536,11 @@
this.department_id = state.state.department_id
this.getUnitTypeList()
},
methods: {
toshowFile(url) {
console.log("url", url)
this.$refs.viewFile.url = url
this.$refs.viewFile.diaShow = true
methods: {
toshowFile(url) {
console.log("url", url)
this.$refs.viewFile.url = url
this.$refs.viewFile.diaShow = true
},
startLoad(row, type) {
console.log("row", row)
@ -547,7 +553,7 @@
reloadList() {
this.$emit("refresh")
},
//
// sendidid
carryTypeWhat(e) {
console.log("carryTypeWhat", e)
@ -555,7 +561,8 @@
//
// this.openMyMission()
} else if (e == 'carry_type1') {
//
//
//
if (this.showform.mission_distribute.length > 1) {
this.editorUnit('pid')
@ -619,7 +626,7 @@
accept_department_ids: res?.accept_department_ids,
mission_groups: res?.groups,
}
}
//
let md = []
res.mission_distribute.map(item => {
@ -634,7 +641,7 @@
}
})
this.my_mission_distribute = md
console.log(this.my_mission_distribute)
console.log(this.my_mission_distribute)
this.pictureList = []
for (var f of res.files) {
this.pictureList.push({

@ -7,8 +7,9 @@
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>执行方式
</div>
<div class="xy-table-item-content">
<el-select v-if="formObj.admin_type==2 || formObj.from==1" :disabled="isdisabled || isEditor" v-model="formObj.carry_type"
<div class="xy-table-item-content">
<!-- 承办人或参与对象为个人 只能执行-->
<el-select v-if="formObj.admin_type==2 || formObj.from==1 || formObj.from_user_id" :disabled="isdisabled || isEditor" v-model="formObj.carry_type"
style="width: 400px;" placeholder="请选择">
<el-option v-for="item in carryPidList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
@ -305,10 +306,18 @@
if(!this.formObj.end_date || this.isMoreThanOrEqualToToday(this.formObj.end_date,this.unitEndDate)){
this.$Message.warning('预计完成时间不能为空或晚于任务完成时间')
return
}
if (this.type == 'add') {
this.formObj.carry_status = 1
this.formObj.keep_status = 0
}
if (this.type == 'add') {
//
if(this.formObj.carry_type===2 && this.formObj.admin_type!=1){
this.formObj.keep_status = 2
this.formObj.carry_status = 2
}else{
this.formObj.carry_status = 1
this.formObj.keep_status = 0
}
}
if (this.type == 'editor') {
if(!this.formObj.finish_status){
@ -320,7 +329,9 @@
if (this.type == 'check') {
this.formObj.keep_status = this.check_status
this.formObj.carry_status = this.check_status == 2 ? 2 : 1
}
}
let _files = []
if (this.fileList.length > 0) {
for (var h of this.fileList) {
@ -347,7 +358,8 @@
this.$emit('refresh', 'carry_type0')
} else if (this.formObj.carry_type == 1) {
this.$emit('refresh', 'carry_type1')
} else if (this.formObj.carry_type == 2) {
} else if (this.formObj.carry_type == 2) {
//
this.$emit('refresh', 'carry_type2')
}
}

Loading…
Cancel
Save