master
lion 2 years ago
parent 97d145ef26
commit 70875449ad

@ -34,6 +34,8 @@ export function getUser() {
if (Cookies.get('anquanshengc_user')) {
return Cookies.get('anquanshengc_user')
} else {
return sessionStorage.getItem('anquanshengc_user');
// return sessionStorage.getItem('anquanshengc_user');
return sessionStorage.getItem('userInfo');
}
}

@ -3,7 +3,7 @@
<!-- 查询配置 -->
<div style="padding: 0px 20px 20px 20px;background: #EFF2F9;">
<el-row :gutter="20" class='elrows'>
<el-col :span="24">
<!-- <el-col :span="24">
<el-card class="box-card" style="margin: 20px 0">
<div slot="header" class="clearfix">
<span>年度任务计划执行情况</span>
@ -35,7 +35,7 @@
</div>
</router-link>
</el-card>
</el-col>
</el-col> -->
<el-col :span="12">
<div ref="lxTable" class="table-tree">
<div style="padding: 15px;background-color: #fff;display: flex;align-items: center;" class="form-sub-title">
@ -294,22 +294,65 @@
</el-table> -->
</div>
</el-col>
<el-col :span="12">
<div ref="lxTable" class="table-tree">
<el-col :span="12">
<div ref="lxTable" class="table-tree">
<div style="padding: 15px;background-color: #fff;" class="form-sub-title">
<el-link type="primary" style="font-size:18px" href="#/lawsfile/article">综合数据</el-link>
<p class="no-redirect"></p>
</div>
<div class="overall">
<div>
<p><span>年度计划任务</span></p>
<p><span>已完成任务</span></p>
<p><span>进度</span></p>
</div>
<div>
<p><span>安全检查/</span></p>
<p><span>安全培训/</span></p>
</div>
<div>
<p><span>应急演练</span></p>
<p><span>专项任务开展</span></p>
</div>
<div>
<p><span>安全隐患数量</span></p>
<p><span>安全事件</span></p>
</div>
</div>
</div>
<!-- <div ref="lxTable" class="table-tree">
<div style="padding: 15px;background-color: #fff;" class="form-sub-title">
<el-link type="primary" style="font-size:18px" href="#/lawsfile/article">任务进展</el-link>
<p class="no-redirect"></p>
</div>
<myecharts :data="mission_data" :axisPointerType="'line'"></myecharts>
</div>
</div> -->
</el-col>
<el-col :span="12">
<div ref="lxTable" class="table-tree">
<div style="padding: 15px;background-color: #fff;" class="form-sub-title">
<el-link type="primary" style="font-size:18px" href="#/lawsfile/article">检查整改</el-link>
<p class="no-redirect"></p>
<div style="padding: 15px;background-color: #fff;" class="form-sub-title">
<div>
<el-link type="primary" style="font-size:18px" href="#/lawsfile/article">检查整改</el-link>
<p class="no-redirect"></p>
</div>
<div>
<Select placeholder="问题类型" v-model="select.question_type" style="width:130px;margin-left:5px">
<Option v-for="item in questionList" :value="item.id" :key="item.value">{{ item.value }}</Option>
</Select>
<Select placeholder="检查类型" v-model="select.check_type" style="width:130px;margin-left:5px">
<Option v-for="item in checkList" :value="item.id" :key="item.value">{{ item.value }}</Option>
</Select>
<Select placeholder="责任科室" v-model="select.department_id" style="width:130px;margin-left:5px">
<Option v-for="item in departmentList" :value="item.id" :key="item.value">{{ item.name }}</Option>
</Select>
<DatePicker placeholder="月份" placement="bottom"
style="width: 130px;margin-left:5px" type="month" @on-change="changeMonth"></DatePicker>
<DatePicker placeholder="年份" placement="bottom"
style="width: 130px;margin-left:5px" type="year" @on-change="changeYear"></DatePicker>
</div>
</div>
<myecharts :data="inspection_data"></myecharts>
<myecharts :height="'317px'" :data="inspection_data"></myecharts>
</div>
</el-col>
</el-row>
@ -387,7 +430,13 @@
} from '@/api/task/patrol.js'
import checkUnit from '@/views/task/list/components/checkUnit.vue'
import addPatrol from '@/views/task/list/components/addPatrol.vue'
import showPatrol from '@/views/task/list/components/showPatrol.vue'
import showPatrol from '@/views/task/list/components/showPatrol.vue'
import {
getparameteritem
} from "@/api/system/dictionary.js";
import {
listdept
} from "@/api/system/department.js"
export default {
name: 'Dashboard',
computed: {
@ -406,7 +455,26 @@
showPatrol
},
data() {
return {
return {
select:{
question_type:'',
year:'2023',
department_id:'',
month:'',
check_type:''
},
questionList:[],
departmentList:[],
checkList:[{
id: 1,
value: '专项检查'
}, {
id: 2,
value: '资料收集'
}, {
id: 3,
value: '网络安全'
}],
paginations: {
page: 1,
page_size: 5,
@ -566,7 +634,7 @@
width: 240,
customFn: (row) => {
let arr = []
return ( < div style = {
return ( <div style = {
{
whiteSpace: 'normal'
}
@ -585,11 +653,10 @@
}
preview-src-list = {
arr
} >
}>
</el-image>)
})
} <
/div>)
} </div>)
}
}, {
label: "计划完成日期",
@ -605,11 +672,11 @@
width: 240,
customFn: (row) => {
let arr = []
return ( < div style = {
return ( <div style = {
{
whiteSpace: 'normal'
}
} > {
}> {
row.fix_files.map(item => {
arr.push(item.url)
return ( <el-image style = {
@ -627,8 +694,7 @@
}>
</el-image>)
})
} <
/div>)
} </div>)
}
}, {
label: "上报人",
@ -695,13 +761,30 @@
},
created() {
this.uploadOther.token = getToken();
// this.initLoad();
// this.initLoad();
this.getQuestion()
this.loadDeptOptions()
this.getInspectionData()
this.getMissionData()
this.load();
},
methods: {
methods: {
changeYear(e){},
changeMonth(e){},
async getQuestion() {
const res = await getparameteritem('askList')
this.questionList = res.detail
},
loadDeptOptions() {
listdept().
then((res) => {
this.departmentList = res
}).catch(error => {
console.log(error)
reject(error)
})
},
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
@ -944,5 +1027,21 @@
.dialogConcent {
overflow-y: auto;
}
.overall{
background-color: #fff;
height:350px;
padding: 15px;
padding-top: 0;
font-size: 18px;
>div{
display: flex;
justify-content: space-between;
>p{
max-width: 50%;
width:50%;
margin-bottom: 60px;
}
}
}
</style>

@ -5,7 +5,7 @@
<template v-slot:mission_id>
<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>任务专题
</div>
<div class="xy-table-item-content">
<el-select v-model="form.mission_id" filterable clearable placeholder="请选择任务专题" style="width: 400px;">
@ -54,6 +54,17 @@
</el-select>
</div>
</div>
</template>
<template v-slot:ask_department>
<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.ask_department" type='text' placeholder="请输入责任科室" clearable
style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:ask_introduce>
<div class="xy-table-item">
@ -77,6 +88,7 @@
</div>
</div>
</template>
<template v-slot:file_ids>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -159,17 +171,18 @@
address:'',
lat:'',
lon:'',
ask_id: '',
ask_id: '',
ask_department:'',
ask_introduce: '',
tips: '',
file_ids: [],
},
rules: {
mission_id: [{
required: true,
message: '请选择任务专题'
}],
// mission_id: [{
// required: true,
// message: ''
// }],
date: [{
required: true,
message: '请选择检查日期'
@ -203,7 +216,8 @@
const res = await listunit({
page: 1,
page_size: 9999
})
})
this.unitList = res.data
},
changeSite(e){
@ -258,7 +272,8 @@
address:res?.address,
lat:res?.lat,
lon:res?.lon,
ask_id: res?.ask_id,
ask_id: res?.ask_id,
ask_department:res?.ask_department,
ask_introduce: res?.ask_introduce,
tips: res?.tips,
file_ids: res?.file_ids,
@ -322,13 +337,20 @@
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
if(this.type==='add'){
for(var k of this.unitList){
console.log("adddd",k.name)
if(k.name=='日常巡查'){
this.form.mission_id = k.id
}
}
}
} else {
this.id = ''
this.pictureList = []
this.mission_id = ''
this.mapform=[]
this.mapform=[]
this.$refs['dialog'].reset()
}
},
@ -353,6 +375,9 @@
// .xy-table-item-label {
// width: 160px;
// }
::v-deep .ask_department{
flex-basis: 100%;
}
::v-deep .avue-input-map{
display: none;
}

@ -19,11 +19,36 @@
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" filterable clearable placeholder="请选择计划类型" style="width: 400px;">
<el-option v-for="item in unitTypeList" :key="item.id" :label="item.value" :value="item.id">
<el-option v-for="item in planTypeList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot: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.status" filterable clearable placeholder="请选择计划状态" style="width: 400px;">
<el-option v-for="item in statusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:year>
<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-date-picker style="width: 400px;" v-model="form.year" value-format="yyyy" type="year"
placeholder="选择计划年份">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:start_date>
<div class="xy-table-item">
@ -151,8 +176,7 @@
<div class="xy-table-item-content" style="width:400px">
<el-radio-group v-model="form.name7" @change='changeName7'>
<el-radio :label="1">人员</el-radio>
<el-radio :label="2" v-if='form.type!=4'>部门</el-radio>
<el-radio :label="3" v-if='!(form.type==4||form.type==2)'>组别</el-radio>
<el-radio :label="2">部门</el-radio>
</el-radio-group>
</div>
</div>
@ -172,7 +196,7 @@
</div>
</div>
<div v-if='form.name7==2&&form.type!=4'>
<div v-if='form.name7==2'>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>
@ -188,38 +212,6 @@
</div>
</div>
</div>
<div 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>
</div>
</template>
</xy-dialog>
@ -256,6 +248,7 @@
isShow: false,
type: 'add',
id: '',
plan_type:1,
department_id:'',
uploadOther: {
token: ""
@ -269,36 +262,23 @@
filterMethod(query, item) {
return item.name.indexOf(query) > -1;
},
unitTypeList: [{
id: 1,
value: '专项检查'
}, {
id: 2,
value: '资料收集'
}, {
id: 3,
value: '网络安全'
planTypeList: [],
statusList:[{
id:0,
value:'未完成'
},{
id:1,
value:'开展中'
},{
id:2,
value:'已完成'
}],
endTypeList: [{
id: 1,
name: '提交文字'
}, {
id: 2,
name: '提交附件'
}, {
id: 3,
name: '提交文字与附件'
}],
studyEndTypeList:[{
id: 4,
name: '查看即可'
}, {
id: 5,
name: '需要答题'
}],
form: {
form: {
plan_type:'',
name: '',
type: '',
type: '',
status:1,
year:'',
start_date: '',
end_date: '',
// count:'',
@ -312,7 +292,15 @@
rules: {
name: [{
required: true,
message: '请输入任务名称'
message: '请输入计划名称'
}],
status: [{
required: true,
message: '请选择计划状态'
}],
year: [{
required: true,
message: '请选择计划年份'
}],
start_date: [{
required: true,
@ -330,16 +318,20 @@
}
},
created() {
this.uploadOther.token = getToken();
this.uploadOther.token = getToken();
this.getPlanList()
this.loadDeptOptions()
this.loadUser()
},
methods: {
methods: {
async getPlanList(){
const res = await getparameteritem('planType')
this.planTypeList = res.detail
},
changeName7(e) {
if (e) {
this.form.accept_department_ids = []
this.form.accept_admin_ids = []
this.form.mission_groups = []
this.form.mission_groups_list = []
}
},
//
@ -407,15 +399,16 @@
async getDetail() {
const res = await get(this.id)
this.form = {
this.form = {
plan_type:res?.plan_type,
name: res?.name,
type: res?.type,
type: res?.type,
year:res.year?res.year:new Date().getFullYear(),
start_date: res?.start_date,
end_date: res?.end_date,
status:res.status?res.status:1,
lefts:'',
name7: res.accept_department_ids.length > 0 ? 2 : (res.accept_admin_ids.length > 0 ? 1 : (res
.groups.length > 0 ? 3 : 1)),
name7: res.accept_department_ids.length > 0 ? 2 : 1,
file_ids: res?.file_ids,
content: res?.content,
accept_admin_ids: res?.accept_admin_ids,
@ -428,7 +421,6 @@
name: f.original_name
})
}
// res.guide_upload ? this.guidePictureList.push(res.guide_upload) : ''
},
submit() {
let _files = []
@ -445,7 +437,7 @@
this.form.file_ids = []
}
console.log("form",this.form)
// return
if (this.type === 'add') {
save({
@ -453,7 +445,7 @@
}).then(res => {
Message({
type: 'success',
message: '新增任务成功'
message: '新增计划成功'
})
this.isShow = false
this.$emit('refresh')
@ -467,7 +459,7 @@
}).then(res => {
Message({
type: 'success',
message: '编辑任务成功'
message: '编辑计划成功'
})
this.isShow = false
this.$emit('refresh')
@ -486,13 +478,23 @@
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
}
if(this.type==='add'){
var date = new Date()
this.form.year = date.getFullYear()+''
}
} else {
this.id = ''
this.id = ''
this.plan_type = 1
this.pictureList = []
this.$refs['dialog'].reset()
}
},
},
plan_type(newval){
if(newval){
this.form.plan_type=newval
}
}
}
}
@ -506,9 +508,9 @@
flex-basis: 100%;
}
// ::v-deep .type {
// display: none;
// }
::v-deep .plan_type {
display: none;
}
::v-deep .el-form>div{
align-items: flex-start!important;
}

@ -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%;
}

@ -53,7 +53,12 @@
</template>
{{showform.site?showform.site.name:(showform.address?showform.address:'')}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
责任科室
</template>
{{showform.ask_department?showform.ask_department:''}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
问题描述
@ -103,7 +108,7 @@
<template slot="label">
分管领导确认
</template>
<span v-if="showform.status==1&&showform.check_leader==1">
<span v-if="showform.status==1&&showform.check_leader==1&&(showform.leader_status===null)">
待审核
</span>
<span v-else>
@ -114,7 +119,7 @@
<template slot="label">
重要领导确认
</template>
<span v-if="showform.status==1&&showform.check_main==1">
<span v-if="showform.status==1&&showform.check_main==1&&(showform.main_status===null)">
待审核
</span>
<span v-else>
@ -144,7 +149,7 @@
<span v-if='showform.status==8'>
部门退回
</span>
<span v-else-if="showform.status==2">
<span v-else-if="showform.status==2||showform.status==1">
待接收
</span>
<span v-else-if="showform.status==6">
@ -234,7 +239,7 @@
<template slot="label">
分管领导确认
</template>
<span v-if="showform.status==9&&showform.re_check_leader==1">
<span v-if="showform.status==9&&showform.re_check_leader==1&&showform.re_leader_status===null">
待审核
</span>
<span v-else>
@ -245,7 +250,7 @@
<template slot="label">
重要领导确认
</template>
<span v-if="showform.status==9&&showform.re_check_main==1">
<span v-if="showform.status==9&&showform.re_check_main==1&&showform.re_main_status===null">
待审核
</span>
<span v-else>
@ -333,12 +338,12 @@
</div>
</template>
<!-- 领导确认 -->
<template v-slot:check_leader_form v-if="showform.status==1&&(is_leader||is_main_leader)">
<template v-slot:check_leader_form v-if="showform.status==1&&((is_leader&&showform.leader_status===null)||(is_main_leader&&showform.main_status===null))">
<el-divider>领导确认</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="4" v-if="showform.check_leader==1&&is_leader">
<el-descriptions-item span="4" v-if="showform.check_leader==1&&is_leader&&showform.leader_status===null">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>分管领导确认
</template>
@ -349,7 +354,7 @@
</el-select>
</div>
</el-descriptions-item>
<el-descriptions-item span="4" v-if="showform.check_main==1&&is_main_leader">
<el-descriptions-item span="4" v-if="showform.check_main==1&&is_main_leader&&showform.main_status===null">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>主要领导确认
</template>
@ -545,12 +550,12 @@
</div>
</template>
<!-- 领导确认整改 -->
<template v-slot:confirm_leader_form v-if="showform.status==9">
<template v-slot:confirm_leader_form v-if="showform.status==9&&((is_leader&&showform.re_leader_status===null)||(is_main_leader&&showform.re_main_status===null))">
<el-divider>领导确认整改</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="4" v-if="showform.re_check_leader==1&&is_leader">
<el-descriptions-item span="4" v-if="showform.re_check_leader==1&&is_leader&&showform.re_leader_status===null">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>分管领导确认
</template>
@ -561,7 +566,7 @@
</el-select>
</div>
</el-descriptions-item>
<el-descriptions-item span="4" v-if="showform.re_check_main==1&&is_main_leader">
<el-descriptions-item span="4" v-if="showform.re_check_main==1&&is_main_leader&&showform.re_main_status===null">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>主要领导确认
</template>
@ -581,8 +586,12 @@
<Button v-if="showform.status==0||showform.status==8" type="primary"
style='margin-left:5px;margin-bottom:5px;' @click="submit">审核</Button>
<Button
v-if="showform.status==1&&((showform.check_leader==1&&is_leader)||(showform.check_main==1&&is_main_leader))"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认</Button>
v-if="showform.status==1&&(showform.check_leader==1&&is_leader&&showform.leader_status===null)"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认</Button>
<Button
v-if="showform.status==1&&(showform.check_main==1&&is_main_leader&&showform.main_status===null)"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认</Button>
<Button v-if="showform.status==2&&is_myself" type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit">接收</Button>
<Button v-if="(showform.status==3||showform.status==7)&&is_myself" type="primary"
@ -590,8 +599,12 @@
<Button v-if="showform.status==4" type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit">确认整改</Button>
<Button
v-if="showform.status==9&&((showform.re_check_leader==1&&is_leader)||(showform.re_check_main==1&&is_main_leader))"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认整改</Button>
v-if="showform.status==9&&(showform.re_check_leader==1&&is_leader&&showform.re_leader_status===null)"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认整改</Button>
<Button
v-if="showform.status==9&&(showform.re_check_main==1&&is_main_leader&&showform.re_main_status===null)"
type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit">领导确认整改</Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(showform.id)">
<Button type="primary" style="margin-left:5px;margin-bottom:5px;" ghost>删除</Button>
</Poptip>
@ -803,22 +816,14 @@
deleteList(id) {
var that = this;
if (id) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(id).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
del(id).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
}
},
//
@ -929,8 +934,10 @@
accept_status: '',
check_leader: res.check_leader == 1 ? 1 : 0,
check_main: res.check_main == 1 ? 1 : 0,
leader_status: res.leader_status == 1 ? 1 : 0,
main_status: res.main_status == 1 ? 1 : 0,
// leader_status: res.leader_status == 1 ? 1 : 0,
// main_status: res.main_status == 1 ? 1 : 0,
leader_status: res?.leader_status,
main_status: res?.main_status,
name7: name7value,
accept_department_ids: res.accept_department_ids?res.accept_department_ids:[],
accept_admin_ids: res.accept_admin_ids?res.accept_admin_ids:[],
@ -949,8 +956,10 @@
confirm_status: '',
re_check_leader: res.re_check_leader == 1 ? 1 : 0,
re_check_main: res.re_check_main == 1 ? 1 : 0,
re_leader_status: res.re_leader_status == 1 ? 1 : 0,
re_main_status: res.re_main_status == 1 ? 1 : 0,
// re_leader_status: res.re_leader_status == 1 ? 1 : 0,
// re_main_status: res.re_main_status == 1 ? 1 : 0,
re_leader_status: res?.re_leader_status,
re_main_status: res?.re_main_status,
patrol_name: '',
check_name: '',
@ -1070,14 +1079,26 @@
if (this.form.check_leader == 1 && this.form.check_main == 1) {
if (this.form.leader_status == 1 && this.form.main_status == 1) {
this.form.status = 2
} else {
} else if(this.form.leader_status === 0 || this.form.main_status === 0){
this.form.status = 6
}
}else{
this.form.status = 1
}
} else {
if (this.form.check_leader == 1) {
this.form.status = this.form.leader_status == 1 ? 2 : 6
} else if (this.form.check_main == 1) {
this.form.status = this.form.main_status == 1 ? 2 : 6
if (this.form.check_leader == 1) {
if(this.form.leader_status==1){
this.form.status=2
}else if(this.form.leader_status===0){
this.form.status = 6
}
} else if (this.form.check_main == 1) {
if(this.form.main_status==1){
this.form.status=2
}else if(this.form.main_status===0){
this.form.status = 6
}
}
}
}
@ -1141,14 +1162,24 @@
if (this.form.re_check_leader == 1 && this.form.re_check_main == 1) {
if (this.form.re_leader_status == 1 && this.form.re_main_status == 1) {
this.form.status = 5
} else {
} else if(this.form.re_leader_status === 0 || this.form.re_main_status === 0){
this.form.status = 7
}else{
this.form.status = 9
}
} else {
if (this.form.re_check_leader == 1) {
this.form.status = this.form.re_leader_status == 1 ? 5 : 7
} else if (this.form.re_check_main == 1) {
this.form.status = this.form.re_main_status == 1 ? 5 : 7
if (this.form.re_check_leader == 1) {
if(this.form.re_leader_status == 1){
this.form.status==5
}else if(this.form.re_leader_status === 0){
this.form.status=7
}
} else if (this.form.re_check_main == 1) {
if(this.form.re_main_status == 1){
this.form.status==5
}else if(this.form.re_main_status === 0){
this.form.status=7
}
}
}
}

@ -32,8 +32,8 @@
<template slot-scope="scope">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')"></Button>
<Button v-if='scope.row.status==0&&(is_guiji||is_chuzhang||login_id==scope.row.admin_id)' type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPatrol(scope.row.id,'editor')"></Button>
<Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader)||(scope.row.check_main==1&&is_main_leader))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')"></Button>
<Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader)||(scope.row.re_check_main==1&&is_main_leader))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')"></Button>
<Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader&&scope.row.leader_status===null)||(scope.row.check_main==1&&is_main_leader&&scope.row.main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')"></Button>
<Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader&&scope.row.re_leader_status===null)||(scope.row.re_check_main==1&&is_main_leader&&scope.row.re_main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')"></Button>
</template>
</el-table-column>
</template>
@ -50,7 +50,7 @@
import {
listpatrol,del,leads
} from '@/api/task/patrol.js'
import {getUser} from "@/utils/auth";
import {getInfo} from "@/api/user.js";
import {listunit} from '@/api/task/unit.js'
export default{
@ -111,11 +111,11 @@ import {getUser} from "@/utils/auth";
prop:'mission.name',
align:'left',
fixed:'left',
width:240
width:200
},{
label:"检查日期",
prop:'date',
width:180,
width:120,
},{
label:"状态",
prop:'status',
@ -130,11 +130,19 @@ import {getUser} from "@/utils/auth";
},{
label:"问题类型",
prop:'ask.value',
width:180,
width:120,
},{
label:"地点",
prop:'site.name',
align:'left',
width:180,
formatter:(cell,data,value,index)=>{
if(cell.site){
return cell.site.name
}else{
return cell.address
}
}
},{
label:"问题图片",
prop:'files',
@ -171,11 +179,11 @@ import {getUser} from "@/utils/auth";
},{
label:"计划完成日期",
prop:'plan_end_date',
width:180,
width:120,
},{
label:"整改完成日期",
prop:'fix_end_date',
width:180,
width:120,
},{
label:"整改图片",
prop:'fix_files',
@ -212,7 +220,14 @@ import {getUser} from "@/utils/auth";
},{
label:"上报人",
prop:'admin.name',
width:180,
width:120,
},{
label:"上报时间",
prop:'created_at',
width:120,
formatter:(cell,data,value,index)=>{
return value?value.substring(0,11):''
}
}],
list:[],
@ -233,16 +248,17 @@ import {getUser} from "@/utils/auth";
this.select.myself = path[1]
this.my_name = path[1]==1?'我的任务':'检查问题'
}
this.getMissonList()
this.getUserId()
this.getLeads()
this.getList()
this.getMissonList()
},
methods: {
async getUserId(){
let res = await getUser()
this.login_id = JSON.parse(res).id
this.department_id = JSON.parse(res).department_id
const res = await getInfo()
this.login_id = res.id
this.department_id = res.department_id
this.getLeads()
this.getList()
},
async getLeads(){
const res = await leads()
@ -268,6 +284,7 @@ import {getUser} from "@/utils/auth";
if(this.login_id==res.chuzhang_leader.id){
this.is_main_leader = true
}
},
async getList(){
const res = await listpatrol({...this.select})
@ -292,6 +309,14 @@ import {getUser} from "@/utils/auth";
cellClicks(e){
this.$refs.showPatrol.id= e.row.id
// this.$refs.showPatrol.id= id
// this.$refs.showPatrol.type= type
this.$refs.showPatrol.is_leader=this.is_leader
this.$refs.showPatrol.is_main_leader=this.is_main_leader
this.$refs.showPatrol.is_guiji=this.is_guiji
this.$refs.showPatrol.is_chuzhang=this.is_chuzhang
this.$refs.showPatrol.login_id=this.login_id
this.$refs.showPatrol.department_id=this.department_id
this.$refs.showPatrol.isShow = true
},
showPatrol(id,type){

@ -1,19 +1,21 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" :text="'任务计划'" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<lx-header icon="md-apps" :text="textName" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" clearable style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
<Select filterable clearable style='width:200px;margin-right: 10px;' v-model="select.status" placeholder="检查状态">
<Select filterable clearable style='width:200px;margin-right: 10px;' v-model="select.status" placeholder="计划状态">
<Option v-for="item in statusList" :value="item.id">{{item.value}}</Option>
</Select>
<DatePicker style='width:200px;margin-right: 10px;' placeholder="年份" placement="bottom"
format='yyyy' type="year" @on-change="changeYear"></DatePicker>
<!-- <Select filterable clearable style='width:200px;margin-right: 10px;' v-model="select.mission_id" placeholder="专项任务">
<Option v-for="item in missionList" :value="item.id">{{item.name}}</Option>
</Select> -->
<Button type="primary" @click="getList"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addPlan'].isShow=true,$refs['addPlan'].type='add'"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="editorPlan('','add')"></Button>
</div>
</slot>
</lx-header>
@ -26,17 +28,16 @@
@pageSizeChange="e => {select.page_size = e,getList()}"
@pageIndexChange="e => {select.page = e,getList()}"
:table-item="table">
<!-- <template v-slot:btns>
<el-table-column fixed="right" align='center' label="操作" min-width="180" header-align="center">
<template slot-scope="scope">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')"></Button>
<Button v-if='scope.row.status==0&&(is_guiji||is_chuzhang||login_id==scope.row.admin_id)' type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPatrol(scope.row.id,'editor')"></Button>
<Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader)||(scope.row.check_main==1&&is_main_leader))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')"></Button>
<Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader)||(scope.row.re_check_main==1&&is_main_leader))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')"></Button>
</template>
</el-table-column>
</template> -->
<template v-slot:btns>
<el-table-column fixed="right" align='center' label="操作" width="180" header-align="center">
<template slot-scope="scope">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPlan(scope.row.id,'editor')"></Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" style="margin-right:5px;margin-bottom:5px;" size="small" ghost>删除</Button>
</Poptip>
</template>
</el-table-column>
</template>
</xy-table>
<addPlan ref='addPlan' @refresh='getList'></addPlan>
</div>
@ -54,64 +55,41 @@
},
data(){
return{
textName:'',
select:{
keyword:'',
page:1,
page_size:10,
status:'',
myself:0,
mission_id:''
// myself_update:0
// is_myself_audit:0,
year:'',
plan_type:''
},
total:0,
statusList:[{
id:-1,
value:'已撤回'
},{
id:0,
value:'待审核'
value:'未完成'
},{
id:1,
value:'待领导确认'
value:'开展中'
},{
id:2,
value:'已分发,待接收'
},{
id:3,
value:'已接收'
},{
id:4,
value:'提交整改'
},{
id:5,
value:'已整改'
},{
id:6,
value:'不通过'
},{
id:7,
value:'整改不通过,重新整改'
},{
id:8,
value:'部门退回'
},{
id:9,
value:'待领导确认整改'
value:'已完成'
}],
table:[{
label:"计划名称",
prop:'name',
align:'left',
fixed:'left',
width:240
// width:200
},{
label:"类型",
prop:'type',
width:180,
prop:'type_detail.value',
width:120,
},{
label:"状态",
prop:'status',
width:180,
width:120,
formatter:(cell,data,value,index)=>{
for(var item of this.statusList){
if(item.id==value){
@ -122,27 +100,39 @@
},{
label:"开始日期",
prop:'start_date',
width:180,
width:120,
},{
label:"结束日期",
prop:'end_date',
width:180,
width:120,
},{
label:"制定人",
prop:'admin.name',
width:180,
width:120,
},{
label:"制定日期",
prop:'created_at',
width:180,
width:120,
formatter:(cell,data,value,index)=>{
return value?value.substring(0,11):''
}
}],
list:[],
}
},
created(){
if (this.$route.path) {
let path = this.$route.path.split("_")
this.select.plan_type = path[1]
this.textName = path[1]==1?'年度计划':(path[1]==2?'专题计划':'')
}
this.getList()
},
methods: {
changeYear(e){
console.log(e)
this.select.year = e
},
async getList(){
const res = await listplan({...this.select})
this.list = res.data
@ -150,7 +140,10 @@
},
pageChange(){},
editorPatrol(id,type){
editorPlan(id,type){
if(type=='add'){
this.$refs.addPlan.plan_type= this.select.plan_type
}
this.$refs.addPlan.id= id
this.$refs.addPlan.type= type
this.$refs.addPlan.isShow = true
@ -158,21 +151,13 @@
deleteList(id){
var that = this;
if (id) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(id).then(response => {
this.$Message.success('操作成功');
that.getList();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
del(id).then(response => {
this.$Message.success('操作成功');
that.getList();
}).catch(error => {
console.log(error)
reject(error)
})
}
}
},

@ -158,7 +158,7 @@
listunit,
del
} from '@/api/task/unit.js'
import {getUser} from "@/utils/auth";
import {getInfo} from "@/api/user.js";
export default {
components: {
addUnit,
@ -405,9 +405,9 @@
}
},
async getUserId(){
let res = await getUser()
this.login_id = JSON.parse(res).id
this.department_id = JSON.parse(res).department_id
let res = await getInfo()
this.login_id = res.id
this.department_id = res.department_id
},
showPatrol(id, type) {
this.$refs.showPatrol.id = id

@ -4,10 +4,10 @@
<lx-header icon="md-apps" :text="type_name" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Select v-if="path_type==1||path_type==5" filterable clearable style='width:150px;margin-right: 10px;' v-model="select.type" placeholder="任务类">
<Select v-if="path_type==1||path_type==5" filterable clearable style='width:150px;margin-right: 10px;' v-model="select.type" placeholder="任务类">
<Option v-for="(item,index) in typeName" v-if="index<typeName.length-1" :value="item.type">{{item.name}}</Option>
</Select>
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.unit_type" placeholder="任务类">
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.unit_type" placeholder="任务类">
<Option v-for="(item,index) in unitTypeList" :value="item.id">{{item.value}}</Option>
</Select>
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.audit_status" placeholder="任务状态">
@ -144,7 +144,7 @@
</el-table-column>
<el-table-column fixed="right" align='center' label="操作" width="180" header-align="center">
<template slot-scope="scope">
<div v-if="path_type==1">
<div v-if="path_type==1||path_type==2">
<Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="editorUnit(scope.row.id,'editor')"></Button>
<Button v-if="scope.row.audit_admin_id==login_id&&scope.row.audit_status==0" style="margin-right:5px;margin-bottom:5px;" type="primary" size="small" @click="checkUnits(scope.row.id,'check')"></Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
@ -152,11 +152,14 @@
</Poptip>
</div>
<div v-else>
<!-- <Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="editorUnit(scope.row.id,'editor')"></Button> -->
<Button type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="checkUnits(scope.row.id,'show')"></Button>
<Button v-if="scope.row.type==2" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="openAsks(scope.row)"></Button>
<Button v-else type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="$refs['addPatrol'].mission_id=scope.row.id,$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<Button v-if="!path_type_2" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="editorUnit(scope.row.id,'editor')"></Button>
<Button v-if="(!path_type_2)&&scope.row.audit_admin_id==login_id&&scope.row.audit_status==0" style="margin-right:5px;margin-bottom:5px;" type="primary" size="small" @click="checkUnits(scope.row.id,'check')"></Button>
<Button v-if="path_type_2==4||path_type_2==5" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="checkUnits(scope.row.id,'show')"></Button>
<Button v-if="scope.row.type==2&&(path_type_2==4||path_type_2==5)" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="openAsks(scope.row)"></Button>
<Button v-if="(scope.row.type!=2)&&(path_type_2==4||path_type_2==5)" type="primary" size="small" style="margin-right:5px;margin-bottom:5px;" @click="$refs['addPatrol'].mission_id=scope.row.id,$refs['addPatrol'].isShow=true,$refs['addPatrol'].type='add'"></Button>
<Poptip v-if="path_type==4&&!path_type_2" transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
<Button type="primary" style="margin-right:5px;margin-bottom:5px;" size="small" ghost>删除</Button>
</Poptip>
</div>
</template>
@ -185,7 +188,8 @@
listunit,
del
} from '@/api/task/unit.js'
import {getUser} from "@/utils/auth";
import {getInfo} from "@/api/user.js";
export default {
components: {
addUnit,
@ -265,6 +269,9 @@
},{
id:2,
value:'不通过'
},{
id:3,
value:'已完成'
}],
unitTypeList: [{
id: 1,
@ -297,40 +304,50 @@
prop: 'name',
align: 'left',
// fixed:'left',
width: 240
width: 200
}, {
label: "状态",
prop: 'audit_status',
width: 180,
width: 120,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '开展中' : (value == 2 ? '不通过' : (value == 0 ? '待审核' : ''))
for(var item of this.auditStatusList){
if(item.id==value){
return item.value
}
}
}
},{
label: "开始日期",
prop: 'start_date',
width: 180,
width: 120,
align:'center'
}, {
label: "结束日期",
prop: 'end_date',
width: 180,
width: 120,
align:'center'
}, {
label: "任务类型",
prop: 'type',
width: 180,
width: 120,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '专项任务' : (value == 2 ? '文件学习培训' : (value == 3 ? '事件隐患任务' : (value == 4 ? '科室任务' : '')))
}
}, {
label: "任务类别",
prop: 'unit_type',
width: 180,
width: 120,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '专项检查' : (value == 2 ? '资料收集' : (value == 3 ? '网络安全' : ''))
}
}, {
label: "完成要求",
prop: 'end_type',
width: 180,
width: 180,
align:'center',
formatter: (cell, data, value, index) => {
return value == 1 ? '提交文字' : (value == 2 ? '提交附件' : (value == 3 ? '提交文字与附件' : (value == 4 ? '查看即可' : (value == 5 ? '需要答题' : ''))))
}
@ -338,31 +355,23 @@
label: "参与人员",
prop: '_names',
width: 360,
algn: 'left',
align: 'left',
customFn: (row) => {
// return ( <div style = {
// {
// whiteSpace: 'normal',
// textAlign: 'left'
// }
// }>
// {
// row._names.map(item => {
// return ( <el-tag style = {
// {
// marginRight: '5px',
// marginBottom: '2px'
// }
// }> {
// item
// } </el-tag>
// )
// })
// } </div>)
}
}],
}
},{
label: "创建人",
prop: 'admin.name',
width: 120,
align: 'center',
},{
label: "创建时间",
prop: 'created_at',
width: 120,
align: 'center',
formatter: (cell, data, value, index) => {
return value?value.substring(0,11):''
}
}],
inspectionTable: {
'巡查日期': 'date',
'状态': 'status',
@ -407,6 +416,7 @@
}],
list: [],
path_type:1,
path_type_2:'',
login_id:'',
department_id:'',
@ -427,8 +437,9 @@
this.select.type = ''
this.select.myself = 1
// this.select.myself_department = 1
this.type_name = '专项任务'
this.type_name = '我的任务'
this.path_type = path[1]
this.path_type_2 = path[2]
}
if(path[2]&&path[2]==4){
this.select.type = ''
@ -436,6 +447,7 @@
this.select.myself_department = 1
this.type_name = '科室任务'
this.path_type = path[1]
this.path_type_2 = path[2]
}
}
console.log("this.path_type ",this.path_type)
@ -468,9 +480,9 @@
}
},
async getUserId(){
let res = await getUser()
this.login_id = JSON.parse(res).id
this.department_id = JSON.parse(res).department_id
let res = await getInfo()
this.login_id = res.id
this.department_id = res.department_id
},
showPatrol(id, type) {
this.$refs.showPatrol.id = id
@ -550,21 +562,13 @@
deleteList(id) {
var that = this;
if (id) {
this.$Modal.confirm({
title: '确认要删除数据?',
onOk: () => {
del(id).then(response => {
this.$Message.success('操作成功');
that.getList();
}).catch(error => {
console.log(error)
reject(error)
})
},
onCancel: () => {
//this.$Message.info('Clicked cancel');
}
});
del(id).then(response => {
this.$Message.success('操作成功');
that.getList();
}).catch(error => {
console.log(error)
reject(error)
})
}
}
},

Loading…
Cancel
Save