master
lion 1 year ago
parent 084d5e80c3
commit d47e39850d

@ -26,6 +26,10 @@ export default {
type:String,
default: ''
},
subtitle:{
type:String,
default: ''
},
form:{
type:Object,
default:()=>{
@ -51,13 +55,15 @@ export default {
//
headerRender(){
return (
<div>
{this.title}
<a class="ivu-modal-close" on-click={this.closeshowChange}><i class="ivu-icon ivu-icon-ios-close"></i></a>
<a class="ivu-modal-screen" on-click={this.fullScreen}><i class={this.isFullScreen?'el-icon-aim':'el-icon-full-screen'}></i></a>
</div>
)
return (
<div>
{this.title} <span style="color:red">{this.subtitle}</span>
<a class="ivu-modal-close" on-click={this.closeshowChange}><i class="ivu-icon ivu-icon-ios-close"></i></a>
<a class="ivu-modal-screen" on-click={this.fullScreen}><i class={this.isFullScreen?'el-icon-aim':'el-icon-full-screen'}></i></a>
</div>
)
},
footerRender(){
if(this.type === 'form'){

@ -1,9 +1,16 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" :type="'form'" :title="type === 'add' ? '发起计划' : '编辑计划'" :form="form"
:rules='rules' @submit="submit">
<template v-slot:lefts>
<xy-dialog ref="dialog" :width="type==='audit'?40:80" :is-show.sync="isShow" :type="'form'" :title="typeName" :form="form"
:rules='rules' @submit="submit">
<template v-slot:audits v-if="type==='audit'">
<el-select style="width:80%;" v-model="audit_status_before" placeholder="请选择">
<el-option :key="1" label="通过" :value="1">
</el-option>
<el-option :key="2" label="退回" :value="2">
</el-option>
</el-select>
</template>
<template v-slot:lefts v-if="type!='audit'">
<div>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -41,7 +48,7 @@
</div>
</template>
<template v-slot:rights>
<template v-slot:rights v-if="type!='audit'">
<div>
<div class="xy-table-item" style="align-items: start;">
<div class="xy-table-item-label" style="font-weight: bold">
@ -82,11 +89,15 @@
</template>
<template v-slot:footerContent>
<Button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="clickSubmit"></Button>
<template v-slot:footerContent>
<Button v-if="type=='audit'" type="primary" style='margin-left:5px;margin-bottom:5px;' @click="clickSubmit"></Button>
</Button>
<Button v-if="type!='audit' && form.audit_status!=0" type="primary" style='margin-left:5px;margin-bottom:5px;' @click="clickSubmit('save')"></Button>
</Button>
<Button v-if="type!='audit' && form.audit_status!=0" type="primary" style='margin-left:5px;margin-bottom:5px;' @click="clickSubmit('confirm')"></Button>
</Button>
<Button 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!='audit' && form.audit_status==2" transfer confirm title="确认要删除吗?" @on-ok="deleteList">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
</template>
@ -125,7 +136,8 @@
data() {
return {
isShow: false,
type: 'add',
type: 'add',
typeName:'',
id: '',
department_id: '',
uploadOther: {
@ -154,8 +166,11 @@
out_line_id: '',
out_line_content: '',
year: '',
status: 2,
},
status: 2,
audit_status:0,
audits:''
},
audit_status_before:'',
monthsArr: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
rules: {
name: [{
@ -292,7 +307,9 @@
content: res?.content,
start_date: res.start_date ? res.start_date : [],
main_department_id: res?.main_department_id,
main_admin_id: res?.main_admin_id
main_admin_id: res?.main_admin_id,
audit_status:res.audit_status?res.audit_status:0,
audits:''
}
for (var f of res.files) {
this.pictureList.push({
@ -314,7 +331,14 @@
})
}
},
clickSubmit() {
clickSubmit(opr) {
if(opr==='save'){
this.form.audit_status = 2
}else if(opr==='confirm'){
this.form.audit_status = 0
}else{
this.form.audit_status = 0
}
this.$refs.dialog.submit()
},
submit() {
@ -332,7 +356,10 @@
this.form.file_ids = []
}
// this.$refs.dialog.submit()
// return
// return
if(this.type==='audit'){
this.form.audit_status=this.audit_status_before
}
console.log("form", this.form)
// return
if (this.type === 'add') {
@ -348,14 +375,14 @@
})
return
}
if (this.type === 'editor') {
if (this.type === 'editor' || this.type==='audit') {
save({
id: this.id,
...this.form
}).then(res => {
Message({
type: 'success',
message: '编辑计划成功'
message: this.type === 'editor'?'编辑计划成功':'审核成功'
})
this.isShow = false
this.$emit('refresh')
@ -379,17 +406,20 @@
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
if (newVal) {
if (this.type === 'editor' || this.type === 'audit') {
this.typeName = this.type === 'editor' ? '编辑计划' :'审核'
this.getDetail()
}
if (this.type === 'add') {
var date = new Date()
var date = new Date()
this.typeName = '发起计划'
this.form.year = date.getFullYear() + ''
}
} else {
this.id = ''
this.pictureList = []
this.pictureList = []
this.audit_status_before = ''
this.checkAllMonth = false
this.isIndeterminateMonth = true
this.$refs['dialog'].reset()

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="typeName" :form="form"
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :subtitle="subtitle" :title="typeName" :form="form"
:rules='rules' @submit="submit">
<!-- <template v-slot:type>
<div class="xy-table-item">
@ -143,10 +143,10 @@
</template>
<template v-slot:name7>
<div>
<div v-if="type!='send'">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{type!='send'?'参与对象':'承办人员'}}
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{type=='pid'?'分解任务给':'参与对象'}}
</div>
<div class="xy-table-item-content" style="width:400px">
<el-radio-group v-model="form.name7" @change='changeName7'>
@ -179,7 +179,7 @@
<div v-if='form.name7==1'>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{type!='send'?'':'承办人员:'}}
</div>
<div class="xy-table-item-content" style='min-width:400px'>
<!-- <el-select style="width:400px" v-model="form.accept_admin_ids" clearable filterable multiple placeholder="请选择人员">
@ -408,7 +408,8 @@
return {
isShow: false,
type: 'add',
typeName:'新增任务',
typeName:'新增任务',
subtitle:'',
is_what_unitType: '',
id: '',
upload_link: '',
@ -1174,11 +1175,13 @@
this.getDetail()
break;
case 'send':
this.typeName = '任务转办'
this.typeName = `任务转办 `
this.subtitle = '注:可转派给承办人员'
this.getDetail()
break;
case 'pid':
this.typeName = '任务分解'
this.typeName = `任务分解 `
this.subtitle = '注:可按照任务内容以及要求进行子任务创建'
this.getDetail()
break;
default:
@ -1188,7 +1191,8 @@
} else {
this.id = ''
this.pictureList = []
this.pictureList = []
this.subtitle = ''
this.mission_groups_list = [{
name: '',
type: 1,

@ -31,12 +31,17 @@
:table-item="table">
<template v-slot:btns>
<el-table-column align='center' label="操作" width="200" header-align="center">
<template slot-scope="scope">
<div>
<template slot-scope="scope">
<div v-if="scope.row.audit_status==0">
<Button v-if="stateObj.is_leader" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="auditPlan(scope.row,'audit')">审核任务</Button>
<div v-else></div>
</div>
<div v-if="scope.row.audit_status==1">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="editUnit(scope.row,1)">发布任务</Button>
</div>
<div>
<div v-if="scope.row.audit_status!=0">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="editorPlan(scope.row.id,'editor')">编辑计划</Button>
</div>
@ -88,12 +93,43 @@
selectMonth: [],
allMonths: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
total: 0,
list: [],
list: [],
auditStatusList:[{
id:0,
value:'待审核',
type:'info'
},{
id:1,
value:'已审核',
type:'success'
},{
id:2,
value:'已保存',
type:''
}],
table: [{
label: "计划名称",
prop: 'name',
align:'left'
}, {
label: "状态",
prop: 'audit_status',
align:'center',
width:120,
customFn: (row) => {
return ( <div> {
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return ( <el-tag type = {
item.type
}> {
item.value
} </el-tag>)
}
})
} </div>)
}
},{
label: "任务要求及内容",
prop: 'content',
// width: 120,
@ -149,13 +185,13 @@
this.$refs.addUnit.type="add"
this.$refs.addUnit.setoutLineId(row.out_line_id)
this.$refs.addUnit.setMissionPlanId(row.id)
this.$refs.addUnit.setType(type)
this.$refs.addUnit.setNameContent(row.name,row.content)
this.$refs.addUnit.setMenuLevel(row.menu,row.level,row.menu_id,row.level_id)
this.$refs.addUnit.setMainId(row.main_department_id,row.main_admin_id)
this.$refs.addUnit.isShow = true
},
toUrlUnit(e){
this.$router.push('/task/list/unit_1')
},
@ -167,7 +203,12 @@
this.$refs.addPlan.type = type
this.$refs.addPlan.isShow = true
},
//
auditPlan(row,type){
this.$refs.addPlan.id = row.id
this.$refs.addPlan.type = type
this.$refs.addPlan.isShow = true
},
cellClicks(e) {
this.$refs.showPlan.id = e.row.id
this.$refs.showPlan.isShow = true

@ -88,57 +88,104 @@
<Button style='margin-right:5px;margin-bottom:5px;' size="small"
@click="backPlan(scope.row)">归档</Button>
</div>
</template>
</template>
<!-- 我的任务 -->
<template v-else>
<!-- 任务是发给部门的只有指定部门科长能看见需要再次分发人员 -->
<!-- 任务发给部门的科长责任人都能进行创建任务派发任务执行任务的操作 -->
<!-- 任务发给部门的科长责任人都能进行任务分解任务转办执行任务的操作 -->
<div
v-if="(scope.row.accept_department_ids && scope.row.accept_department_ids.length>0 && stateObj.is_manger
&& !(scope.row.audit_status==3||scope.row.audit_status==5)) || scope.row.main_admin_id==stateObj.login_id
">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">派发任务</Button>
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">创建任务</Button>
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</div>
">
<Dropdown trigger="click">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
执行任务
<!-- <Icon type="ios-arrow-down"></Icon> -->
</Button>
<template #list>
<DropdownMenu>
<DropdownItem>
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
</DropdownItem>
<DropdownItem>
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</DropdownItem>
<DropdownItem>
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">任务执行</Button>
</div>
</DropdownItem>
</DropdownMenu>
</template>
</Dropdown>
</div>
<!-- 小组的带头人 和小组组长 -->
<div v-else-if="(scope.row.groups && scope.row.groups.length>0 && !(scope.row.audit_status==3||scope.row.audit_status==5))
|| scope.row.main_admin_id==stateObj.login_id">
<!-- 组长权限 -->
<div v-for="item in scope.row.grounp_admin_detail">
<div v-if="item.admin.id===stateObj.login_id">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">派发任务</Button>
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">创建任务</Button>
<Dropdown trigger="click" v-if="scope.row.grounp_admin_detail.includes(stateObj.login_id)">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
执行任务
<!-- <Icon type="ios-arrow-down"></Icon> -->
</Button>
<template #list>
<DropdownMenu>
<DropdownItem>
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
</DropdownItem>
<DropdownItem>
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</DropdownItem>
<DropdownItem>
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">任务执行</Button>
</div>
</DropdownItem>
</DropdownMenu>
</template>
</Dropdown>
</div>
</div>
<!-- 组里面所有人都能执行任务 -->
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
<div v-else>
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</div>
</div>
</div>
<!-- 直接 执行任务 -->
<div v-else>
<div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
<Button v-if="scope.row.unit_type==item.id" type="primary" size="small"
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</div>
</div>
<div>
<div>
<!-- <div v-for="item in unitTypeList">
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</div> -->
<Button style='margin-right:5px;margin-bottom:5px;' type="primary" size="small"
@click="checkUnits(scope.row.id,'show')">查看任务</Button>
</div>

Loading…
Cancel
Save