master
lion 1 year ago
parent 5ad4dd02b1
commit e6af2ed9be

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

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

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

Loading…
Cancel
Save