You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1553 lines
56 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="`查看`" :form="form" :rules="rules"
@submit="submit">
<!-- ${type_name} -->
<template v-slot:steps v-if="!(showform.status==-1||showform.status==6)">
<el-steps :active="steps_active" finish-status="success" direction="vertical">
<el-step title="问题"></el-step>
<el-step title="整改意见"></el-step>
<el-step title="整改接收"></el-step>
<el-step title="整改反馈"></el-step>
<el-step title="审核"></el-step>
</el-steps>
</template>
<!-- 填报信息 -->
<template v-slot:contents>
<div>
<el-divider>检查问题</el-divider>
<div>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item>
<template slot="label">
任务专题
</template>
{{showform.mission?showform.mission.name:''}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
状态
</template>
{{showform.status_name?showform.status_name:''}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
上报人
</template>
{{showform.admin?showform.admin.name:''}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
检查日期
</template>
{{showform.date}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
问题类型
</template>
{{showform.ask?showform.ask.value:''}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
检查地点
</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">
问题描述
</template>
{{showform.ask_introduce?showform.ask_introduce:''}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
整改建议
</template>
{{showform.tips?showform.tips:''}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
附件
</template>
<el-image v-for="url in showurl"
style="width: 146px; height: 146px;display:inline-block;margin-right:5px;margin-bottom:5px" :src="url"
:preview-src-list="showurl">
</el-image>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div v-if='showform.status>0'>
<el-divider>整改意见</el-divider>
<div>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item>
<template slot="label">
规计科确认结果
</template>
<div>
<span v-if='showform.status==6'>
退回
</span>
<span v-else-if="showform.status==1">
待领导确认
</span>
<span v-else>
需整改
</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
分管领导确认结果
</template>
<span v-if="showform.status==1&&showform.check_leader==1&&(showform.leader_status===null)">
待确认
</span>
<span v-else>
{{showform.check_leader==1?(showform.leader_status==1?'需整改':'退回'):'-'}}
</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
主要领导确认结果
</template>
<span v-if="showform.status==1&&showform.check_main==1&&(showform.main_status===null)">
待确认
</span>
<span v-else>
{{showform.check_main==1?(showform.main_status==1?'需整改':'退回'):'-'}}
</span>
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
责任对象
</template>
<div v-if="showform.accept_admin_ids_details&&showform.accept_admin_ids_details.length>0">
<el-tag style='margin-right:10px' v-for='item in showform.accept_admin_ids_details'>
{{item.name}}
</el-tag>
</div>
<div v-if="showform.accept_department_ids_details&&showform.accept_department_ids_details.length>0">
<el-tag style='margin-right:10px' v-for='item in showform.accept_department_ids_details'>
{{item.name}}
</el-tag>
</div>
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
备注
</template>
{{showform.check_remark?showform.check_remark:''}}
</el-descriptions-item>
<el-descriptions-item span='4' v-if="showform.check_leader==1&&showform.leader_status!=null">
<template slot="label">
分管领导意见
</template>
{{showform.check_leader_remark?showform.check_leader_remark:''}}
</el-descriptions-item>
<el-descriptions-item span='4' v-if="showform.check_main==1&&showform.main_status!=null">
<template slot="label">
主要领导意见
</template>
{{showform.check_main_remark?showform.check_main_remark:''}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div v-if='showform.status>2'>
<el-divider>整改接收</el-divider>
<div>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item :span="showform.status==8?'4':''">
<template slot="label">
接收结果
</template>
<div>
<span v-if='showform.status==8'>
退回
</span>
<span v-else-if="showform.status==2||showform.status==1">
待接收
</span>
<span v-else-if="showform.status==6">
</span>
<span v-else>
已接收
</span>
</div>
</el-descriptions-item>
<template v-if="showform.status==8">
<el-descriptions-item :span="showform.status==8?'4':''">
<template slot="label">
退回原因
</template>
{{showform.reason?showform.reason:''}}
</el-descriptions-item>
</template>
<template v-if="showform.status>2&&!(showform.status==8||showform.status==6)">
<el-descriptions-item>
<template slot="label">
计划时间
</template>
{{showform.plan_end_date?showform.plan_end_date:''}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
责任人
</template>
{{showform.duty_admin?showform.duty_admin.name:''}}
</el-descriptions-item>
</template>
<template v-if="showform.status>2&&!(showform.status==8||showform.status==6)">
<el-descriptions-item span="4">
<template slot="label">
整改目标
</template>
{{showform.target?showform.target:''}}
</el-descriptions-item>
</template>
</el-descriptions>
</div>
</div>
<div v-if='showform.status>3&&!(showform.status==8||showform.status==6)'>
<el-divider>整改反馈</el-divider>
<div>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item>
<template slot="label">
完成情况
</template>
{{showform.fix_status==1?'已完成':'已列计划'}}
</el-descriptions-item>
<el-descriptions-item span='2'>
<template slot="label">
时间
</template>
{{showform.fix_end_date?showform.fix_end_date:''}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
整改说明
</template>
{{form.fix_introduce?form.fix_introduce:''}}
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
整改附件
</template>
<el-image v-for="url in showfixurl"
style="width: 146px; height: 146px;display:inline-block;margin-right:5px;margin-bottom:5px" :src="url"
:preview-src-list="showfixurl">
</el-image>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div v-if='showform.status>4&&!(showform.status==8||showform.status==6)'>
<el-divider>审核结果</el-divider>
<div>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item>
<template slot="label">
规计科审核结果
</template>
<div>
<span v-if='showform.status==5'>
整改通过
</span>
<span v-else-if="showform.status==7">
整改不通过,重新整改
</span>
<span v-else-if="showform.status==9">
待领导审核
</span>
<span v-else>
待确认
</span>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
分管领导审核结果
</template>
<span v-if="showform.status==9&&showform.re_check_leader==1&&showform.re_leader_status===null">
待审核
</span>
<span v-else>
{{showform.re_check_leader==1?(showform.re_leader_status==1?'通过':'不通过'):'-'}}
</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
主要领导审核结果
</template>
<span v-if="showform.status==9&&showform.re_check_main==1&&showform.re_main_status===null">
待审核
</span>
<span v-else>
{{showform.re_check_main==1?(showform.re_main_status==1?'通过':'不通过'):'-'}}
</span>
</el-descriptions-item>
<el-descriptions-item span='4'>
<template slot="label">
备注
</template>
{{showform.re_remark?showform.re_remark:''}}
</el-descriptions-item>
<el-descriptions-item span='4' v-if="showform.re_check_leader==1&&showform.re_leader_status!=null">
<template slot="label">
分管领导意见
</template>
{{showform.re_leader_remark?showform.re_leader_remark:''}}
</el-descriptions-item>
<el-descriptions-item span='4' v-if="showform.re_check_main==1&&showform.re_main_status!=null">
<template slot="label">
主要领导意见
</template>
{{showform.re_main_remark?showform.re_main_remark:''}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 操作 -->
<div v-if="(showform.status==0||showform.status==8)&&(is_guiji||is_chuzhang)">
<el-divider>整改意见</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
<div style="display: flex;width:100%;padding-bottom:12px">
<div style="margin-right:10px">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>需否整改:
</div>
<div>
<el-select v-model="form.status" filterable clearable placeholder="请选择需否整改" style="width: 300px;">
<el-option v-for="item in checkList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
<div style="display: flex;width:100%;">
<div style="margin-right:10px;margin-left:11px;">是否需要分管领导确认:
</div>
<div>
<el-radio-group v-model="form.check_leader">
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex;width:100%;margin-left:11px;">
<div style="margin-right:10px">是否需要主要领导确认:
</div>
<div>
<el-radio-group v-model="form.check_main">
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex;width:100%;margin-left:11px;padding-bottom: 12px;">
<div style="margin-right:10px">责任对象选择:
</div>
<div>
<el-radio-group v-model="form.name7" @change='changeName7'>
<el-radio :label="1">人员</el-radio>
<el-radio :label="2">部门</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex;width:100%;margin-left:11px;">
<div style="margin-right:10px">备注:
</div>
<div>
<el-input v-model="form.check_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
</div>
</div>
</el-descriptions-item>
<el-descriptions-item span="2" :labelStyle="{'display':'none'}">
<template slot="label">
<!-- 选择 -->
</template>
<div v-if="form.name7==1">
<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 v-else>
<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>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 整改 意见 -->
<div 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="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
<div v-if="showform.check_leader==1&&is_leader&&showform.leader_status===null">
<div style="display: flex;width:100%;padding-bottom:12px">
<div style="margin-right:10px">分管领导确认:
</div>
<div>
<el-select v-model="form.leader_status" filterable placeholder="请选择审核结果" style="width: 300px;">
<el-option v-for="item in leaderCheckList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
<div style="display: flex;width:100%;">
<div style="margin-right:10px">是否需要主要领导确认:
</div>
<div>
<el-radio-group v-model="form.check_main">
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</div>
</div>
<div v-else-if="showform.check_main==1&&is_main_leader&&showform.main_status===null">
<div style="display: flex;width:100%;padding-bottom:12px">
<div style="margin-right:10px">主要领导意见:
</div>
<div>
<el-select v-model="form.main_status" filterable placeholder="请选择审核结果" style="width: 300px;">
<el-option v-for="item in leaderCheckList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</div>
<div style="display: flex;width:100%;padding-bottom:15px;" >
<div style="margin-right:10px">责任对象选择:
</div>
<div>
<el-radio-group v-model="form.name7" @change='changeName7'>
<el-radio :label="1">人员</el-radio>
<el-radio :label="2">部门</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex;width:100%;padding-bottom:15px;" >
<div style="margin-right:10px">备注:
</div>
<div>
<el-input v-if="showform.check_leader==1&&is_leader&&showform.leader_status===null" v-model="form.check_leader_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
<el-input v-if="showform.check_main==1&&is_main_leader&&showform.main_status===null" v-model="form.check_main_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
</div>
</div>
</el-descriptions-item>
<el-descriptions-item span="2" :labelStyle="{'display':'none'}">
<div v-if="form.name7==1">
<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 v-else>
<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>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 科室接收 -->
<div v-if="showform.status==2&&is_myself">
<el-divider>整改接收</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="4">
<template slot="label">
<div>
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否接收
</div>
</template>
<div>
<el-select @change='changeAcceptStatus' v-model="form.status" filterable clearable placeholder="请选择是否接收"
style="width: 300px;">
<el-option v-for="item in acceptList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</el-descriptions-item>
<el-descriptions-item span="4" v-if="showTarget&&showform.status==2">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>计划完成日期
</template>
<div>
<el-date-picker style="width: 300px;" v-model="form.plan_end_date" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择计划完成日期">
</el-date-picker>
</div>
</el-descriptions-item>
<el-descriptions-item span="4" v-if="showTarget&&showform.status==2">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>责任人
</template>
<div>
<el-select v-model="form.duty_admin_id" filterable clearable placeholder="请选择责任人" style="width: 300px;">
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</el-descriptions-item>
<el-descriptions-item span="2" v-if="showTarget&&showform.status==2">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>整改目标
</template>
<div>
<el-input v-model="form.target" :rows='5' type='textarea' placeholder="请输入原因" clearable
style="width: 400px;"></el-input>
</div>
</el-descriptions-item>
<el-descriptions-item span="2" v-if="showReason&&showform.status==2">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>不接收原因
</template>
<div>
<el-input v-model="form.reason" :rows='5' type='textarea' placeholder="请输入原因" clearable
style="width: 400px;"></el-input>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 提交整改 -->
<div v-if="(showform.status==3||showform.status==7)&&is_myself">
<el-divider>整改反馈</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="4">
<template slot="label">
<div>
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>完成情况
</div>
</template>
<div>
<el-radio-group v-model="form.fix_status">
<el-radio :label="1">已完成</el-radio>
<el-radio :label="0">已列计划</el-radio>
</el-radio-group>
</div>
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>时间
</template>
<div>
<el-date-picker format="yyyy-MM-dd HH:mm" style="width: 300px;" v-model="form.fix_end_date"
value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择结束日期">
</el-date-picker>
</div>
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>整改说明
</template>
<div>
<el-input v-model="form.fix_introduce" :rows='5' type='textarea' placeholder="请输入问题描述" clearable
style="width: 300px;"></el-input>
</div>
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>整改附件
</template>
<div>
<el-upload :action="action" class='upload-demo' list-type="picture-card" :file-list="pictureList"
ref="pictureUpload" style="width:600px" :auto-upload="true" :data="uploadOther"
:on-preview="handlePictureCardPreview" :on-success="handlesuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 确认整改 -->
<div v-if="showform.status==4&&(is_guiji||is_chuzhang)">
<el-divider>审核</el-divider>
<div>
<el-descriptions class="margin-top" :column="4">
<el-descriptions-item span="2" :labelStyle="{'display':'none'}" contentClassName="wraps" :colon='false'>
<div style="display: flex;width:100%;padding-bottom:12px">
<div style="margin-right:10px">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>审核结果:
</div>
<div>
<el-select v-model="form.status" filterable clearable placeholder="请选择审核结果" style="width: 300px;">
<el-option v-for="item in confirmList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
<div style="display: flex;width:100%;">
<div style="margin-right:10px;margin-left:11px;">是否需要分管领导审核:
</div>
<div>
<el-radio-group v-model="form.re_check_leader">
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex;width:100%;margin-left:11px;">
<div style="margin-right:10px">是否需要主要领导审核:
</div>
<div>
<el-radio-group v-model="form.re_check_main">
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</div>
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>备注
</template>
<div>
<el-input v-model="form.re_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 领导审核整改 -->
<div 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&&showform.re_leader_status===null">
<template slot="label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>分管领导审核
</template>
<div>
<el-select v-model="form.re_leader_status" filterable placeholder="请选择审核结果">
<el-option v-for="item in leaderConfirmList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</el-descriptions-item>
<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>
<div>
<el-radio-group v-model="form.re_check_main">
<el-radio :label="0">否</el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</div>
</el-descriptions-item>
<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>
<div>
<el-input v-model="form.re_leader_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
</div>
</el-descriptions-item>
<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>
<div>
<el-select v-model="form.re_main_status" filterable placeholder="请选择审核结果" style="width: 300px;">
<el-option v-for="item in leaderConfirmList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</el-descriptions-item>
<el-descriptions-item span="2" 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>
<div>
<el-input v-model="form.re_main_remark" :rows='5' type='textarea' placeholder="请输入备注" clearable
style="width: 400px;"></el-input>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</template>
<template v-slot:footerContent>
<div v-if='is_guiji||is_chuzhang' style="display: inline-block;">
<!-- 整改意见 -->
<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.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"
style='margin-left:5px;margin-bottom:5px;' @click="submit">提交整改</Button>
<!-- 审核整改 -->
<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_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> -->
</div>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false">取消</Button>
</template>
</xy-dialog>
<el-dialog :visible.sync="showPic">
<img width="100%" :src="showPicUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import {
Message
} from 'element-ui'
import {
getparameteritem
} from "@/api/system/dictionary.js";
import {
save,
get,
del
} from "@/api/task/patrol.js";
import {
listdept
} from "@/api/system/department.js"
import {
listCommonuser
} from "@/api/common.js"
import {
getToken
} from '@/utils/auth'
export default {
components: {},
data() {
return {
isShow: false,
type: 'add',
typeNameList: {
show: '查看',
check: '审核',
leader: '领导意见',
accept: '接收',
reform: '提交整改',
confirm: '确认整改',
leaderconfirm: '领导意见整改'
},
type_name: '',
statusList: [{
id: -1,
value: '已撤回'
}, {
id: 0,
value: '待确认'
}, {
id: 1,
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: '待领导审核'
}],
id: '',
uploadOther: {
token: ""
},
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
pictureList: [],
showPic: false,
showPicUrl: '',
showform: {},
showurl: [],
showfixurl: [],
steps_active: 1,
showReason:true,
showTarget:true,
form: {
steps: '',
contents:'',
status: '',
check_leader: '',
check_main: '',
leader_status: 1,
main_status: 1,
name7: 1,
accept_department_ids: [],
accept_admin_ids: [],
accept_status: '',
plan_end_date: '',
duty_admin_id: '',
reason: '',
accept_admin_name: "",
plan_end_date_name: '',
duty_admin_name: '',
fix_status: 1,
fix_end_date: '',
fix_introduce: '',
fix_file_ids: [],
confirm_status: '',
re_check_leader: 0,
re_check_main: 0,
re_leader_status: 1,
re_main_status: 1,
mission_id: '',
date: '',
site_id: '',
ask_id: '',
ask_introduce: '',
tips: '',
file_ids: [],
},
checkList: [{
id: 2,
name: '需整改'
}, {
id: 6,
name: '退回'
}],
confirmList: [{
id: 5,
name: '通过'
}, {
id: 7,
name: '不通过'
}],
leaderCheckList: [{
id: 1,
name: '需整改'
}, {
id: 0,
name: '退回'
}],
leaderConfirmList: [{
id: 1,
name: '通过'
}, {
id: 0,
name: '不通过'
}],
acceptList: [{
id: 3,
name: '是'
}, {
id: 8,
name: '否'
}],
deptOptions: [],
checkAll: false,
isIndeterminate: true,
userdata: [],
filterMethod(query, item) {
return item.name.indexOf(query) > -1;
},
rules: {
// status: [{
// required: true,
// message: '请选择状态'
// }]
},
login_id:'',
department_id:'',
is_myself:false,
is_leader: false,
is_main_leader: false,
is_guiji: false,
is_chuzhang: false,
}
},
created() {
this.uploadOther.token = getToken();
this.loadDeptOptions()
this.loadUser()
},
methods: {
deleteList(id) {
var that = this;
if (id) {
del(id).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
}
},
//切换用户选择 人员还是部门 清空
changeName7(e) {
if (e) {
this.form.accept_department_ids = []
this.form.accept_admin_ids = []
}
},
// 切换接收的状态 清空
changeAcceptStatus(e) {
console.log(e)
if(e){
this.form.duty_admin_id = ''
this.form.reason = ''
this.form.target = ''
this.form.plan_end_date = ''
if (e==3) {
this.showTarget = true
this.showReason = false
}else if(e==8){
this.showReason = true
this.showTarget = false
}
}else{
this.showReason = true
this.showTarget = true
}
},
// 选择科室
loadDeptOptions() {
listdept().
then((res) => {
for (var m of res) {
m.checked = false;
}
this.deptOptions = res;
}).catch(error => {
console.log(error)
reject(error)
})
},
loadUser() {
listCommonuser({
page_size: 999
}).
then((res) => {
this.userdata = res.data?res.data.reverse():[];
}).catch(error => {
console.log(error)
})
},
handleCheckAllChange(val) {
let options = [];
for (var m of this.deptOptions) {
options.push(m.id);
}
this.form.accept_department_ids = val ? options : [];
this.isIndeterminate = false;
},
handleCheckedDeptSingleChange(v) {
//如果出现取消的操作 就要执行删除
console.log(v);
var that = this;
if (this.form.accept_department_ids)
that.delDeptItem();
},
//删除操作
delDeptItem() {
for (var m of this.deptOptions) {
if (this.form.accept_department_ids.indexOf(m.id) == -1) {
var d = this.form.accept_department_ids.filter(function(t) {
return t.department_id == m.id;
})
if (d.length != 0) {
delDep(d[0].id).then(response => {}).catch(error => {
console.log(error)
})
}
}
}
},
handleCheckedDeptChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.deptOptions.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.deptOptions.length;
},
handleRemove(file, fileList) {
this.pictureList = fileList
},
handlesuccess(response, file, fileList) {
this.pictureList = fileList
},
handlePictureCardPreview(file) {
this.showPicUrl = file.url;
this.showPic = true;
},
async getDetail() {
const res = await get(this.id)
// 选择人或部门
let name7value = 1
if (res.accept_department_ids) {
name7value = res.accept_department_ids.length > 0 ? 2 : 1
} else if (res.accept_admin_ids) {
name7value = res.accept_admin_ids.length > 0 ? 1 : 1
} else {
name7value = 1
}
this.form.name7 = name7value
this.form = {
steps: '',
contents:'',
// 审核
status: '',
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,
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:[],
accept_status: '',
plan_end_date: res?.plan_end_date,
duty_admin_id: res?.duty_admin_id,
reason: res?.reason,
accept_admin_name: "",
plan_end_date_name: '',
duty_admin_name: '',
fix_status: res.fix_status===0 ? 0 : 1,
fix_end_date: res?.fix_end_date,
fix_introduce: res?.fix_introduce,
fix_file_ids: res?.fix_file_ids,
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,
re_main_status: res?.re_main_status,
target:res?.target,
check_remark:res?.check_remark,
check_leader_remark:res?.check_leader_remark,
check_main_remark:res?.check_main_remark,
re_remark:res?.re_remark,
re_leader_remark:res?.re_leader_remark,
re_main_remark:res?.re_main_remark,
mission_id: res?.mission_id,
date: res?.date,
site_id: res?.site_id,
ask_id: res?.ask_id,
ask_introduce: res?.ask_introduce,
tips: res?.tips,
file_ids: res?.file_ids,
}
for (var f of res.files) {
this.showurl.push(f.url)
}
for (var f of res.fix_files) {
this.pictureList.push({
url: f.url,
id: f.id,
name: f.original_name
})
this.showfixurl.push(f.url)
}
// 判断该问题下发给的人 是否为登陆人
if(res.accept_admin_ids&&res.accept_admin_ids.length>0){
for(var a of res.accept_admin_ids){
if(this.login_id==a){
this.is_myself = true
}
}
}
if(res.accept_department_ids&&res.accept_department_ids.length>0){
for(var d of res.accept_department_ids){
if(this.department_id==d){
this.is_myself = true
}
}
}
console.log("this.is_myself",this.is_myself)
// 流程步骤
if (res.status == 4 || res.status == 9) {
this.steps_active = 4
} else if (res.status == 0 || res.status == 8 || res.status == 1) {
this.steps_active = 1
} else if (res.status == 2) {
this.steps_active = 2
} else if(res.status == 3 || res.status == 7){
this.steps_active = 3
}else if(res.status == 5 ){
this.steps_active = 5
}
this.statusList.map(item => {
if (item.id == res.status) {
res.status_name = item.value
}
})
// type 根据status传值
if (res.status == 0 || res.status == 8) {
this.type = 'check'
} else if (res.status == 1) {
this.type = 'leader'
} else if (res.status == 2) {
this.type = 'accept'
} else if (res.status == 3 || res.status == 7) {
this.type = 'reform'
} else if (res.status == 4) {
this.type = 'confirm'
} else if (res.status == 9) {
this.type = 'leaderconfirm'
} else {
this.type = 'show'
}
this.type_name = this.typeNameList[this.type]
this.showform = res
this.$forceUpdate()
},
submit() {
let _files = []
if (this.pictureList.length > 0) {
for (var h of this.pictureList) {
if (h.response) {
_files.push(h.response.id)
} else {
_files.push(h.id)
}
}
this.form.fix_file_ids = _files
} else {
this.form.fix_file_ids = []
}
// return
// 审核或领导意见
if (this.type === 'check') {
if (this.form.accept_department_ids || this.form.accept_admin_ids) {
if (!(this.form.accept_department_ids.length > 0 || this.form.accept_admin_ids.length > 0)) {
Message({
type: 'warning',
message: `请选择分发的部门或人员`
})
return
}
}
}
// 需要领导审核 status=1
if (this.type === 'check') {
if (this.form.check_leader == 1 || this.form.check_main == 1) {
this.form.status = 1
}
}
// 领导审核
if (this.type === 'leader') {
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 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) {
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
}
}
}
}
// 部门接收
if (this.type === 'accept') {
if (this.form.status == 3) {
if (!this.form.plan_end_date) {
Message({
type: 'warning',
message: `请选择计划时间`
})
return
}
// if (!this.form.duty_admin_id) {
// Message({
// type: 'warning',
// message: `请选择责任人`
// })
// return
// }
} else if (this.form.status == 8) {
console.log("this.form.reason", this.form.reason)
if (!this.form.reason) {
Message({
type: 'warning',
message: `请输入退回理由`
})
return
}
}
}
// 提交整改
if (this.type === 'reform') {
this.form.status = 4
if (!this.form.fix_end_date) {
Message({
type: 'warning',
message: `请选择整改结束时间`
})
return
}
if (!this.form.fix_introduce) {
Message({
type: 'warning',
message: `请输入整改说明`
})
return
}
}
// 是否需要领导意见整改 status=9
if (this.type === 'confirm') {
if (this.form.re_check_leader == 1 || this.form.re_check_main == 1) {
this.form.status = 9
}
}
// 领导意见整改审核
if (this.type === 'leaderconfirm') {
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 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) {
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
}
}
}
}
if (!this.form.status) {
Message({
type: 'warning',
message: `请选择状态`
})
return
}
// return
save({
id: this.id,
...this.form
}).then(res => {
Message({
type: 'success',
message: `${this.typeNameList[this.type]}成功`
})
this.isShow = false
this.$emit('refresh')
})
},
},
watch: {
isShow(newVal) {
if (newVal) {
this.getDetail()
// if (this.type === 'check') {
// }
} else {
this.id = ''
this.pictureList = []
this.showform = {}
this.showurl = []
this.showfixurl = []
this.is_leader=false
this.is_main_leader=false
this.is_guiji=false
this.is_chuzhang=false
this.department_id=''
this.login_id=''
this.is_myself = false
this.$refs['dialog'].reset()
}
}
}
}
</script>
<style scoped>
/deep/ .el-icon-circle-close {
color: #fff
}
</style>
<style scoped lang="scss">
::v-deep .status,
::v-deep .check_leader,
::v-deep .check_main,
::v-deep .accept_admin_ids,
::v-deep .accept_department_ids,
::v-deep .plan_end_date,
::v-deep .duty_admin_id,
::v-deep .fix_status,
::v-deep .fix_end_date,
::v-deep .fix_introduce,
::v-deep .fix_file_ids,
::v-deep .confirm_status,
::v-deep .re_check_leader,
::v-deep .re_check_main,
::v-deep .re_leader_status,
::v-deep .re_main_status,
::v-deep .plan_end_date_name,
::v-deep .duty_admin_name,
::v-deep .accept_admin_name{
flex-basis: 80%;
display:none
}
::v-deep .el-form{
>div{
align-items: flex-start!important;
}
}
::v-deep .wraps{
flex-wrap: wrap;
margin-bottom:-12px;
}
::v-deep .contents{
flex-basis: 80%;
}
::v-deep .steps{
flex-basis: 15%;
margin-top:20px;
}
::v-deep .el-steps{
position: fixed;
}
::v-deep .el-step{
flex-basis: 17%!important;
}
::v-deep .margin-top {
padding: 20px;
font-size: 16px;
}
::v-deep .el-descriptions-item__label:not(.is-bordered-label) {
line-height: 40px;
min-width: 120px;
}
::v-deep .el-descriptions-item__container .el-descriptions-item__content {
line-height: 40px;
}
::v-deep .steps {
padding: 0 20px;
}
::v-deep .el-step__head.is-success {
color: #338de3;
border-color: #338de3;
line-height: 27px;
}
::v-deep .el-step__title.is-success {
color: #338de3;
}
::v-deep .el-step__head.is-process,
::v-deep .el-step__head.is-wait {
line-height: 27px;
}
// .xy-table-item-label {
// width: 160px;
// }
.img__delete {
transform: scale(0.8, 0.8);
position: absolute;
top: 4px;
right: 4px;
}
::v-deep .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
::v-deep .avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
::v-deep .el-upload--picture-card {
font-size: 28px;
color: #8c939d;
width: 146px !important;
height: 146px !important;
line-height: 146px !important;
text-align: center;
}
::v-deep .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 146px !important;
height: 146px !important;
line-height: 146px !important;
text-align: center;
}
::v-deep .avatar {
width: 80px !important;
display: block;
border-radius: 6px;
}
// ::v-deep .xy-table-item-label {
// width: 160px !important;
// }
::v-deep .el-date-editor .el-range-separator {
width: auto !important;
}
::v-deep .el-input-number .el-input__inner {
text-align: left !important;
}
.searchCompanys {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
.el-input {
width: 80%
}
}
</style>