|
|
|
|
@ -2,16 +2,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '发起任务' : '编辑任务'" :form="form"
|
|
|
|
|
:rules='rules' @submit="submit">
|
|
|
|
|
<!-- <template v-slot:mission_name>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>计划名称:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.mission_name" placeholder="请输入计划名称" clearable style="width: 400px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<template v-slot:name>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -58,7 +49,34 @@
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:mission_plan_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>关联计划:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.mission_plan_id" filterable clearable placeholder="请选择计划" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in missionPlanList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:audit_status>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>任务状态:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.audit_status" filterable clearable placeholder="请选择任务状态" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in auditStatusList" :key="item.id" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:lefts>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
@ -148,75 +166,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:audit_admin_id v-if="form.is_audit==1">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>审批人:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.audit_admin_id" filterable clearable placeholder="请选择审批人" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:file_ids>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class='upload-demo' :file-list="pictureList" ref="pictureUpload"
|
|
|
|
|
style="width:600px" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
|
|
|
|
|
:on-remove="handleRemove">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:content>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>说明:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.content" :rows='5' type='textarea' placeholder="请输入说明" clearable
|
|
|
|
|
style="width:400px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:end_type>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="width:140px">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{mission_type==2?'学习方式':'任务完成要求'}}:
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="xy-table-item-content" style='min-width:100px'>
|
|
|
|
|
<el-select v-if='mission_type==2' style="width: 400px;" v-model="form.end_type" filterable clearable placeholder="请选择完成要求">
|
|
|
|
|
<el-option v-for="item in studyEndTypeList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-select v-else style="width: 400px;" v-model="form.end_type" filterable clearable placeholder="请选择任完成要求">
|
|
|
|
|
<el-option v-for="item in endTypeList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<Button type="primary" style="height: 40px;margin-left: 10px;vertical-align: top;" v-if="mission_type==2&&form.end_type==5" @click="openQs">建设题库</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:end_content>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="width:140px">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>{{mission_type==2?'学习要求':'任务完成详情'}}:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.end_content" :rows='5' type='textarea' placeholder="请输入完成详情" clearable
|
|
|
|
|
style="width: 400px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
<template v-slot:name7>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -296,76 +246,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:accept_admin_ids 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>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style='min-width:100px'>
|
|
|
|
|
<el-transfer filterable :titles="['待选择', '已选择']" :props="{key: 'id',label: 'name'}"
|
|
|
|
|
:filter-method="filterMethod" :format="{ noChecked: '${total}',hasChecked: '${checked}/${total}' }"
|
|
|
|
|
filter-placeholder="请选择参与人员" v-model="form.accept_admin_ids" :data="userdata">
|
|
|
|
|
</el-transfer>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:accept_department_ids v-if='form.name7==2&&form.type!=4'>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style='min-width:100px'>
|
|
|
|
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
<div style="margin: 15px 0;"></div>
|
|
|
|
|
<el-checkbox-group v-model="form.accept_department_ids" @change="handleCheckedDeptChange">
|
|
|
|
|
<el-checkbox @change="handleCheckedDeptSingleChange" v-for="dept in deptOptions" :label="dept.id"
|
|
|
|
|
:key="dept.id">{{dept.name}}</el-checkbox>
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:mission_groups v-if='form.name7==3&&!(form.type==4||form.type==2)'>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style='min-width:100px'>
|
|
|
|
|
<Button type='primary' @click="mission_groups_list.push({name:'',type:1,link_id:[]})">新增组别</Button>
|
|
|
|
|
<div v-for="(item,index) in mission_groups_list" style='margin:10px;margin-left:0'>
|
|
|
|
|
<div>
|
|
|
|
|
<Button style="margin-right:10px" @click="mission_groups_list.splice(index,1)">删除</Button>
|
|
|
|
|
组别:{{item.name=mission_groups_name[index]}}
|
|
|
|
|
<el-radio-group v-model="item.type" @change='item.link_id=[]' style="margin:10px;margin-right:20px">
|
|
|
|
|
<el-radio :label="1">人员</el-radio>
|
|
|
|
|
<el-radio :label="2">部门</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
<el-select v-if='item.type==1' v-model="item.link_id" clearable filterable multiple placeholder="请选择人员">
|
|
|
|
|
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-select v-if='item.type==2' v-model="item.link_id" clearable filterable multiple placeholder="请选择部门">
|
|
|
|
|
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
<!-- 答题 -->
|
|
|
|
|
<!-- <template v-slot:is_need_answer v-if="mission_type==2&&form.end_type==5">
|
|
|
|
|
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -396,7 +277,10 @@
|
|
|
|
|
import {
|
|
|
|
|
getToken
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
import addQuestion from './addQuestion.vue'
|
|
|
|
|
import addQuestion from './addQuestion.vue'
|
|
|
|
|
import {
|
|
|
|
|
listplan
|
|
|
|
|
} from '@/api/task/plan.js'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addQuestion
|
|
|
|
|
@ -419,7 +303,20 @@
|
|
|
|
|
userdata: [],
|
|
|
|
|
filterMethod(query, item) {
|
|
|
|
|
return item.name.indexOf(query) > -1;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
auditStatusList:[{
|
|
|
|
|
id:0,
|
|
|
|
|
value:'待审核'
|
|
|
|
|
},{
|
|
|
|
|
id:1,
|
|
|
|
|
value:'开展中'
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:'不通过'
|
|
|
|
|
},{
|
|
|
|
|
id:3,
|
|
|
|
|
value:'已完成'
|
|
|
|
|
}],
|
|
|
|
|
unitTypeList: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
value: '专项检查'
|
|
|
|
|
@ -446,20 +343,24 @@
|
|
|
|
|
}, {
|
|
|
|
|
id: 5,
|
|
|
|
|
name: '需要答题'
|
|
|
|
|
}],
|
|
|
|
|
}],
|
|
|
|
|
missionPlanList:[],
|
|
|
|
|
form: {
|
|
|
|
|
type: '',
|
|
|
|
|
|
|
|
|
|
// mission_name:'',
|
|
|
|
|
name: '',
|
|
|
|
|
unit_type: '',
|
|
|
|
|
start_date: '',
|
|
|
|
|
end_date: '',
|
|
|
|
|
mission_plan_id:'',
|
|
|
|
|
audit_status:1,
|
|
|
|
|
lefts:'',
|
|
|
|
|
name7: 1,
|
|
|
|
|
is_need_answer:'',
|
|
|
|
|
is_audit: 0,
|
|
|
|
|
audit_admin_id: '',
|
|
|
|
|
audit_status: 1,
|
|
|
|
|
// audit_status: 1,
|
|
|
|
|
file_ids: '',
|
|
|
|
|
content: '',
|
|
|
|
|
|
|
|
|
|
@ -508,10 +409,15 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.loadDeptOptions()
|
|
|
|
|
this.loadDeptOptions()
|
|
|
|
|
this.getMissionPlan()
|
|
|
|
|
// this.loadUser()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getMissionPlan(){
|
|
|
|
|
const res = await listplan({page:1,page_size:9999})
|
|
|
|
|
this.missionPlanList = res.data
|
|
|
|
|
},
|
|
|
|
|
openQs(){
|
|
|
|
|
this.$refs.addQuestion.qsShow=true
|
|
|
|
|
this.$refs.addQuestion.topicList = this.form.ask
|
|
|
|
|
@ -604,19 +510,22 @@
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await get(this.id)
|
|
|
|
|
this.form = {
|
|
|
|
|
type: res?.type,
|
|
|
|
|
type: res?.type,
|
|
|
|
|
|
|
|
|
|
name: res?.name,
|
|
|
|
|
// mission_name:res?.mission_name,
|
|
|
|
|
unit_type: res?.unit_type,
|
|
|
|
|
start_date: res?.start_date,
|
|
|
|
|
end_date: res?.end_date,
|
|
|
|
|
mission_plan_id:res?.mission_plan_id,
|
|
|
|
|
audit_status: res.audit_status?res.audit_status:1,
|
|
|
|
|
lefts:'',
|
|
|
|
|
name7: res.accept_department_ids.length > 0 ? 2 : (res.accept_admin_ids.length > 0 ? 1 : (res
|
|
|
|
|
.groups.length > 0 ? 3 : 1)),
|
|
|
|
|
is_need_answer:'',
|
|
|
|
|
is_audit: res.audit_admin_id ? 1 : 0,
|
|
|
|
|
audit_admin_id: res.audit_admin_id ? res.audit_admin_id : '',
|
|
|
|
|
audit_status: res.audit_status?res.audit_status:1,
|
|
|
|
|
|
|
|
|
|
file_ids: res?.file_ids,
|
|
|
|
|
content: res?.content,
|
|
|
|
|
end_type: res?.end_type,
|
|
|
|
|
@ -693,9 +602,9 @@
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.mission_groups = this.mission_groups_list
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.form.mission_groups = this.mission_groups_list
|
|
|
|
|
// return
|
|
|
|
|
if (this.type === 'add') {
|
|
|
|
|
save({
|
|
|
|
|
@ -760,7 +669,9 @@
|
|
|
|
|
::v-deep .content,
|
|
|
|
|
::v-deep .end_type,
|
|
|
|
|
::v-deep .file_ids,
|
|
|
|
|
::v-deep .is_need_answer{
|
|
|
|
|
::v-deep .is_need_answer,
|
|
|
|
|
// ::v-deep .mission_plan_id
|
|
|
|
|
{
|
|
|
|
|
flex-basis: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|