|
|
|
|
@ -7,16 +7,16 @@
|
|
|
|
|
<DatePicker style='width:200px;margin-right: 10px;' placeholder="年份" placement="bottom" format='yyyy'
|
|
|
|
|
type="year" @on-change="changeYear"></DatePicker>
|
|
|
|
|
<Input v-model="select.keyword" clearable style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
|
|
|
|
<!-- has_mission_plans -->
|
|
|
|
|
<Select clearable style='width:200px;margin-right: 10px;' v-model="select.has_mission_plans"
|
|
|
|
|
placeholder="是否已发布计划">
|
|
|
|
|
<Option v-for="item in hasMissionList" :value="item.id">{{item.value}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
<Select clearable style='width:200px;margin-right: 10px;' v-model="select.has_missions"
|
|
|
|
|
placeholder="是否已发布任务">
|
|
|
|
|
<Option v-for="item in hasMissionList" :value="item.id">{{item.value}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
|
|
|
|
|
<!-- has_mission_plans -->
|
|
|
|
|
<Select clearable style='width:200px;margin-right: 10px;' v-model="select.has_mission_plans"
|
|
|
|
|
placeholder="是否已发布计划">
|
|
|
|
|
<Option v-for="item in hasMissionList" :value="item.id">{{item.value}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
<Select clearable style='width:200px;margin-right: 10px;' v-model="select.has_missions"
|
|
|
|
|
placeholder="是否已发布任务">
|
|
|
|
|
<Option v-for="item in hasMissionList" :value="item.id">{{item.value}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
|
|
|
|
|
<Button type="primary" @click="getList">查询</Button>
|
|
|
|
|
<Button type="primary" style="margin-left: 10px;" @click="editorOutline('','add')">添加</Button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -26,30 +26,30 @@
|
|
|
|
|
|
|
|
|
|
<!-- @cell-click="cellClicks" -->
|
|
|
|
|
<xy-table :list="mission_log" :table-item="missionLogTable" :showIndex='false' :isPage='false'
|
|
|
|
|
:span-method="spanMethod">
|
|
|
|
|
has_mission
|
|
|
|
|
<template v-slot:has_mission>
|
|
|
|
|
<el-table-column align='center' label="是否创建计划或专项任务" fixed="right" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.mission_plans.length>0">
|
|
|
|
|
已创建计划
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="scope.row.missions.length>0">
|
|
|
|
|
已创建专项任务
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
:span-method="spanMethod">
|
|
|
|
|
has_mission
|
|
|
|
|
<template v-slot:has_mission>
|
|
|
|
|
<el-table-column align='center' label="是否创建计划或专项任务" fixed="right" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.mission_plans.length>0">
|
|
|
|
|
已创建计划
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="scope.row.missions.length>0">
|
|
|
|
|
已创建专项任务
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' label="操作" fixed="right" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
|
|
|
|
|
@click="editPlan(scope.row,'add')">年度计划</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
|
|
|
|
|
@click="editUnit(scope.row,4)">专题任务</Button>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
|
|
|
|
|
@click="editPlan(scope.row,'add')">年度计划</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
|
|
|
|
|
@click="editUnit(scope.row,4)">专题任务</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
|
|
|
|
|
@ -59,8 +59,8 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
<addOutline ref="addOutline" @refresh="getList"></addOutline>
|
|
|
|
|
<addPlan ref="addPlan" @refresh="getList"></addPlan>
|
|
|
|
|
<addOutline ref="addOutline" @refresh="getList"></addOutline>
|
|
|
|
|
<addPlan ref="addPlan" @refresh="getList"></addPlan>
|
|
|
|
|
<addUnit ref="addUnit" @toUnit="getList" @refresh="getList"></addUnit>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -77,15 +77,15 @@
|
|
|
|
|
getMergeCells,
|
|
|
|
|
groupBy
|
|
|
|
|
} from '@/utils/contactTable.js'
|
|
|
|
|
import addOutline from '../list/components/addOutline.vue'
|
|
|
|
|
import addPlan from '../list/components/addPlan.vue'
|
|
|
|
|
import addUnit from '../list/components/addUnit.vue'
|
|
|
|
|
import addOutline from '../list/components/addOutline.vue'
|
|
|
|
|
import addPlan from '../list/components/addPlan.vue'
|
|
|
|
|
import addUnit from '../list/components/addUnit.vue'
|
|
|
|
|
import state from '@/store/modules/user.js'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addOutline,
|
|
|
|
|
addPlan,
|
|
|
|
|
addUnit,
|
|
|
|
|
addOutline,
|
|
|
|
|
addPlan,
|
|
|
|
|
addUnit,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -96,16 +96,16 @@
|
|
|
|
|
page_size: 99999,
|
|
|
|
|
year: new Date().getFullYear(),
|
|
|
|
|
sort_name: 'created_at',
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
has_mission_plans:'',
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
has_mission_plans:'',
|
|
|
|
|
has_missions:''
|
|
|
|
|
},
|
|
|
|
|
hasMissionList:[{
|
|
|
|
|
id:0,
|
|
|
|
|
value:'否',
|
|
|
|
|
},{
|
|
|
|
|
id:1,
|
|
|
|
|
value:'是',
|
|
|
|
|
},
|
|
|
|
|
hasMissionList:[{
|
|
|
|
|
id:0,
|
|
|
|
|
value:'否',
|
|
|
|
|
},{
|
|
|
|
|
id:1,
|
|
|
|
|
value:'是',
|
|
|
|
|
}],
|
|
|
|
|
menuList: [],
|
|
|
|
|
mission_log: [],
|
|
|
|
|
@ -122,7 +122,17 @@
|
|
|
|
|
align: 'center',
|
|
|
|
|
fixed: 'left'
|
|
|
|
|
}, {
|
|
|
|
|
label: "主要内容",
|
|
|
|
|
label: "工作内容",
|
|
|
|
|
prop: 'work_content',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 240
|
|
|
|
|
},{
|
|
|
|
|
label: "要求",
|
|
|
|
|
prop: 'work_require',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 240
|
|
|
|
|
},{
|
|
|
|
|
label: "主要工作",
|
|
|
|
|
prop: 'content',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 240
|
|
|
|
|
@ -131,7 +141,7 @@
|
|
|
|
|
prop: 'period',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
label: "工作要求",
|
|
|
|
|
label: "工作步骤",
|
|
|
|
|
prop: 'require',
|
|
|
|
|
width: 240
|
|
|
|
|
}, {
|
|
|
|
|
@ -175,7 +185,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// this.getMenuList()
|
|
|
|
|
// this.getMenuList()
|
|
|
|
|
this.stateObj = state.state
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
@ -187,11 +197,11 @@
|
|
|
|
|
async getList() {
|
|
|
|
|
const res = await index({
|
|
|
|
|
|
|
|
|
|
...this.select,
|
|
|
|
|
has_mission_plans:this.select.has_mission_plans?this.select.has_mission_plans:(this.select.has_mission_plans===0?0:''),
|
|
|
|
|
has_missions:this.select.has_missions?this.select.has_missions:(this.select.has_missions===0?0:''),
|
|
|
|
|
|
|
|
|
|
'with_relations[0]':"missionPlans",
|
|
|
|
|
...this.select,
|
|
|
|
|
has_mission_plans:this.select.has_mission_plans?this.select.has_mission_plans:(this.select.has_mission_plans===0?0:''),
|
|
|
|
|
has_missions:this.select.has_missions?this.select.has_missions:(this.select.has_missions===0?0:''),
|
|
|
|
|
|
|
|
|
|
'with_relations[0]':"missionPlans",
|
|
|
|
|
'with_relations[1]':"missions",
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'year',
|
|
|
|
|
@ -208,8 +218,8 @@
|
|
|
|
|
changeYear(e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select.year = e
|
|
|
|
|
}else{
|
|
|
|
|
this.select.year = new Date().getFullYear()
|
|
|
|
|
}else{
|
|
|
|
|
this.select.year = new Date().getFullYear()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
spanMethod({
|
|
|
|
|
@ -221,37 +231,37 @@
|
|
|
|
|
|
|
|
|
|
return this.spanArr[rowIndex][columnIndex]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editorOutline(id, type) {
|
|
|
|
|
if (id) {
|
|
|
|
|
this.$refs.addOutline.id = id
|
|
|
|
|
}
|
|
|
|
|
this.$refs.addOutline.setMissionId(this.id)
|
|
|
|
|
this.$refs.addOutline.setName(`${this.select.year}任务大纲`)
|
|
|
|
|
this.$refs.addOutline.type = type
|
|
|
|
|
// this.$refs.addOutline.menuList = this.menuList
|
|
|
|
|
this.$refs.addOutline.isShow = true
|
|
|
|
|
},
|
|
|
|
|
editUnit(row,type){
|
|
|
|
|
this.$refs.addUnit.type="add"
|
|
|
|
|
this.$refs.addUnit.setoutLineId(row.id)
|
|
|
|
|
this.$refs.addUnit.setType(type)
|
|
|
|
|
this.$refs.addUnit.setNameContent(row.content,row.flow)
|
|
|
|
|
this.$refs.addUnit.setMenuLevel(row.menu,row.level,row.menu_id,row.level_id)
|
|
|
|
|
this.$refs.addUnit.setMainId(this.stateObj.department_id,this.stateObj.login_id)
|
|
|
|
|
this.$refs.addUnit.isShow = true
|
|
|
|
|
},
|
|
|
|
|
editPlan(row,type){
|
|
|
|
|
this.$refs.addPlan.type="add"
|
|
|
|
|
this.$refs.addPlan.setMenuLevel(row)
|
|
|
|
|
this.$refs.addPlan.setMainId(this.stateObj.department_id,this.stateObj.login_id)
|
|
|
|
|
this.$refs.addPlan.isShow = true
|
|
|
|
|
},
|
|
|
|
|
toUrlPlan(){
|
|
|
|
|
this.$router.push('/task/list/plan_1')
|
|
|
|
|
},
|
|
|
|
|
toUrlUnit(e){
|
|
|
|
|
this.$router.push('/task/list/unit_4')
|
|
|
|
|
|
|
|
|
|
editorOutline(id, type) {
|
|
|
|
|
if (id) {
|
|
|
|
|
this.$refs.addOutline.id = id
|
|
|
|
|
}
|
|
|
|
|
this.$refs.addOutline.setMissionId(this.id)
|
|
|
|
|
this.$refs.addOutline.setName(`${this.select.year}任务大纲`)
|
|
|
|
|
this.$refs.addOutline.type = type
|
|
|
|
|
// this.$refs.addOutline.menuList = this.menuList
|
|
|
|
|
this.$refs.addOutline.isShow = true
|
|
|
|
|
},
|
|
|
|
|
editUnit(row,type){
|
|
|
|
|
this.$refs.addUnit.type="add"
|
|
|
|
|
this.$refs.addUnit.setoutLineId(row.id)
|
|
|
|
|
this.$refs.addUnit.setType(type)
|
|
|
|
|
this.$refs.addUnit.setNameContent(row.content,row.flow)
|
|
|
|
|
this.$refs.addUnit.setMenuLevel(row.menu,row.level,row.menu_id,row.level_id)
|
|
|
|
|
this.$refs.addUnit.setMainId(this.stateObj.department_id,this.stateObj.login_id)
|
|
|
|
|
this.$refs.addUnit.isShow = true
|
|
|
|
|
},
|
|
|
|
|
editPlan(row,type){
|
|
|
|
|
this.$refs.addPlan.type="add"
|
|
|
|
|
this.$refs.addPlan.setMenuLevel(row)
|
|
|
|
|
this.$refs.addPlan.setMainId(this.stateObj.department_id,this.stateObj.login_id)
|
|
|
|
|
this.$refs.addPlan.isShow = true
|
|
|
|
|
},
|
|
|
|
|
toUrlPlan(){
|
|
|
|
|
this.$router.push('/task/list/plan_1')
|
|
|
|
|
},
|
|
|
|
|
toUrlUnit(e){
|
|
|
|
|
this.$router.push('/task/list/unit_4')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -263,4 +273,4 @@
|
|
|
|
|
::v-deep .el-table .cell.el-tooltip {
|
|
|
|
|
white-space: normal !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|