菜单整合
This commit is contained in:
parent
9308f1e8f5
commit
28515318fc
|
@ -0,0 +1,26 @@
|
||||||
|
<template>
|
||||||
|
<div >
|
||||||
|
<div>
|
||||||
|
<app-main />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { AppMain } from './components'
|
||||||
|
import ResizeMixin from './mixin/ResizeHandler'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Layout',
|
||||||
|
components: {
|
||||||
|
AppMain
|
||||||
|
},
|
||||||
|
mixins: [ResizeMixin],
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "~@/styles/mixin.scss";
|
||||||
|
@import "~@/styles/variables.scss";
|
||||||
|
</style>
|
||||||
|
|
|
@ -5,6 +5,7 @@ Vue.use(Router)
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from '@/layout'
|
import Layout from '@/layout'
|
||||||
|
import Middle from '@/layout/middle.vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: sub-menu only appear when route children.length >= 1
|
* Note: sub-menu only appear when route children.length >= 1
|
||||||
|
@ -206,6 +207,12 @@ export const asyncRoutes = [
|
||||||
meta: { title: '日常监督', icon: 'table', perms: ['supervision'] },
|
meta: { title: '日常监督', icon: 'table', perms: ['supervision'] },
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: 'basicGoal',
|
||||||
|
name: 'basicGoal',
|
||||||
|
component: () => import('@/views/supervisionNew/basicGoal.vue'),
|
||||||
|
meta: { title: '年度基础目标' , perms: ['task2']}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'content',
|
path: 'content',
|
||||||
name: 'Content',
|
name: 'Content',
|
||||||
|
@ -214,15 +221,45 @@ export const asyncRoutes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'task',
|
path: 'task',
|
||||||
name: 'Task',
|
name: 'task',
|
||||||
component: () => import('@/views/supervision/task.vue'),
|
component: Middle,
|
||||||
meta: { title: '报送任务', perms: ['task_view'] }
|
redirect: '/supervision/task',
|
||||||
|
meta: { title: '报送任务' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'goal',
|
||||||
|
name: 'goal',
|
||||||
|
component: () => import('@/views/supervisionNew/task.vue'),
|
||||||
|
meta: { title: '质量目标' , perms: ['task2']}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'other',
|
||||||
|
name: 'other',
|
||||||
|
component: () => import('@/views/supervision/task.vue'),
|
||||||
|
meta: { title: '其他任务'}
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mytask',
|
path: 'taskMy',
|
||||||
name: 'myTask',
|
name: 'taskMy',
|
||||||
component: () => import('@/views/supervision/mytask.vue'),
|
component: Middle,
|
||||||
meta: { title: '我的报送任务', perms: ['record_view'] }
|
redirect: '/supervision/task',
|
||||||
|
meta: { title: '我的报送任务' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'myGoalTask',
|
||||||
|
name: 'myGoalTask',
|
||||||
|
component: () => import('@/views/supervisionNew/mytask.vue'),
|
||||||
|
meta: { title: '质量目标', perms: ['task2do']}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'myOthertask',
|
||||||
|
name: 'myOthertask',
|
||||||
|
component: () => import('@/views/supervision/mytask.vue'),
|
||||||
|
meta: { title: '其他任务', perms: ['record_view'] }
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'record',
|
path: 'record',
|
||||||
|
@ -237,47 +274,12 @@ export const asyncRoutes = [
|
||||||
meta: { title: '报送任务执行', perms: ['task_view'] },
|
meta: { title: '报送任务执行', perms: ['task_view'] },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/supervisionNew',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/supervisionNew/task',
|
|
||||||
name: 'supervisionNew',
|
|
||||||
meta: { title: '日常监督(新)', icon: 'table'},
|
|
||||||
alwaysShow: true,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'basicGoal',
|
|
||||||
name: 'basicGoal',
|
|
||||||
component: () => import('@/views/supervisionNew/basicGoal.vue'),
|
|
||||||
meta: { title: '年度基础目标' , perms: ['task2']}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'task',
|
|
||||||
name: 'Task',
|
|
||||||
component: () => import('@/views/supervisionNew/task.vue'),
|
|
||||||
meta: { title: '报送任务' , perms: ['task2']}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'myTask',
|
|
||||||
name: 'mytask',
|
|
||||||
component: () => import('@/views/supervisionNew/mytask.vue'),
|
|
||||||
meta: { title: '我的任务'}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'statistics',
|
path: 'statistics',
|
||||||
name: 'statistics',
|
name: 'statistics',
|
||||||
component: () => import('@/views/supervisionNew/statistics.vue'),
|
component: () => import('@/views/supervisionNew/statistics.vue'),
|
||||||
meta: { title: '部门报告'},
|
meta: { title: '部门报告'},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'mytaskDo',
|
|
||||||
name: 'mytaskDo',
|
|
||||||
component: () => import('@/views/supervisionNew/mytaskDo.vue'),
|
|
||||||
meta: { title: '我的任务执行'},
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'task2do/:id',
|
path: 'task2do/:id',
|
||||||
name: 'Task2do',
|
name: 'Task2do',
|
||||||
|
@ -287,6 +289,48 @@ export const asyncRoutes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: '/supervisionNew',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/supervisionNew/task',
|
||||||
|
// name: 'supervisionNew',
|
||||||
|
// meta: { title: '日常监督(新)', icon: 'table'},
|
||||||
|
// alwaysShow: true,
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'basicGoal',
|
||||||
|
// name: 'basicGoal',
|
||||||
|
// component: () => import('@/views/supervisionNew/basicGoal.vue'),
|
||||||
|
// meta: { title: '年度基础目标' , perms: ['task2']}
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'task',
|
||||||
|
// name: 'Task',
|
||||||
|
// component: () => import('@/views/supervisionNew/task.vue'),
|
||||||
|
// meta: { title: '报送任务' , perms: ['task2']}
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'myTask',
|
||||||
|
// name: 'mytask',
|
||||||
|
// component: () => import('@/views/supervisionNew/mytask.vue'),
|
||||||
|
// meta: { title: '我的任务'}
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'statistics',
|
||||||
|
// name: 'statistics',
|
||||||
|
// component: () => import('@/views/supervisionNew/statistics.vue'),
|
||||||
|
// meta: { title: '部门报告'},
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'mytaskDo',
|
||||||
|
// name: 'mytaskDo',
|
||||||
|
// component: () => import('@/views/supervisionNew/mytaskDo.vue'),
|
||||||
|
// meta: { title: '我的任务执行'},
|
||||||
|
// hidden: true
|
||||||
|
// },
|
||||||
|
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: '/qualityinspect',
|
path: '/qualityinspect',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -3,6 +3,7 @@ const getters = {
|
||||||
device: state => state.app.device,
|
device: state => state.app.device,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
|
dept: state => state.user.dept,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
perms: state => state.user.perms,
|
perms: state => state.user.perms,
|
||||||
permission_routes: state => state.permission.routes
|
permission_routes: state => state.permission.routes
|
||||||
|
|
|
@ -33,11 +33,11 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['task2do'])"
|
v-if="checkPermission(['task2'])"
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-link>
|
>编辑</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['task2do'])"
|
v-if="checkPermission(['task2'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
>删除</el-link>
|
>删除</el-link>
|
||||||
|
@ -77,6 +77,22 @@
|
||||||
<el-input v-model="form.pgoal_1" type="number" style="width:90%"/>
|
<el-input v-model="form.pgoal_1" type="number" style="width:90%"/>
|
||||||
<span>件</span>
|
<span>件</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="报告/证书合格率" prop="pgoal_2">
|
||||||
|
<el-input v-model="form.pgoal_2" type="number" style="width:90%"/>
|
||||||
|
<span>%</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报告/证书及时率" prop="pgoal_3">
|
||||||
|
<el-input v-model="form.pgoal_3" type="number" style="width:90%"/>
|
||||||
|
<span>%</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="能力验证满意率" prop="pgoal_4">
|
||||||
|
<el-input v-model="form.pgoal_4" type="number" style="width:90%"/>
|
||||||
|
<span>%</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户投诉处理满意率" prop="pgoal_5">
|
||||||
|
<el-input v-model="form.pgoal_5" type="number" style="width:90%"/>
|
||||||
|
<span>%</span>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
|
@ -86,17 +102,13 @@
|
||||||
:on-remove="handleRemove1"
|
:on-remove="handleRemove1"
|
||||||
:headers="upHeaders"
|
:headers="upHeaders"
|
||||||
:file-list="fileList1"
|
:file-list="fileList1"
|
||||||
:limit="1"
|
:limit="5"
|
||||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报告/证书合格率" prop="pgoal_2">
|
<!-- <el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
||||||
<el-input v-model="form.pgoal_2" type="number" style="width:90%"/>
|
|
||||||
<span>%</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
:action="upUrl"
|
:action="upUrl"
|
||||||
|
@ -111,10 +123,6 @@
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报告/证书及时率" prop="pgoal_3">
|
|
||||||
<el-input v-model="form.pgoal_3" type="number" style="width:90%"/>
|
|
||||||
<span>%</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
|
@ -130,10 +138,6 @@
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="能力验证满意率" prop="pgoal_4">
|
|
||||||
<el-input v-model="form.pgoal_4" type="number" style="width:90%"/>
|
|
||||||
<span>%</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
|
@ -149,10 +153,6 @@
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="客户投诉处理满意率" prop="pgoal_5">
|
|
||||||
<el-input v-model="form.pgoal_5" type="number" style="width:90%"/>
|
|
||||||
<span>%</span>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -203,10 +203,10 @@
|
||||||
upHeaders: upHeaders(),
|
upHeaders: upHeaders(),
|
||||||
upUrl: upUrl(),
|
upUrl: upUrl(),
|
||||||
fileList1:[],
|
fileList1:[],
|
||||||
fileList2:[],
|
// fileList2:[],
|
||||||
fileList3:[],
|
// fileList3:[],
|
||||||
fileList4:[],
|
// fileList4:[],
|
||||||
fileList5:[],
|
// fileList5:[],
|
||||||
dialogType:"new",
|
dialogType:"new",
|
||||||
form: defaultForm,
|
form: defaultForm,
|
||||||
listLoading:false,
|
listLoading:false,
|
||||||
|
@ -242,37 +242,51 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUpSuccess1(res, file, filelist) {
|
handleUpSuccess1(res, file, filelist) {
|
||||||
this.form.pgoal_1_file = res.data.id;
|
|
||||||
debugger;
|
debugger;
|
||||||
|
console.log(res)
|
||||||
|
console.log(file)
|
||||||
|
console.log(filelist)
|
||||||
|
// this.form.pgoal_1_file = res.data.id;
|
||||||
|
console.log(filelist)
|
||||||
|
this.form.pgoal_1_file = '';
|
||||||
|
this.form.pgoal_2_file = '';
|
||||||
|
this.form.pgoal_3_file = '';
|
||||||
|
this.form.pgoal_4_file = '';
|
||||||
|
this.form.pgoal_5_file = '';
|
||||||
|
for(let i=0;i<filelist.length;i++){
|
||||||
|
let key = 'pgoal_'+(i+1)+'_file';
|
||||||
|
if(filelist[i].response){
|
||||||
|
this.form[key] = filelist[i].response.data.id;
|
||||||
|
}else{
|
||||||
|
this.form[key] = filelist[i].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
},
|
},
|
||||||
handleUpSuccess2(res, file, filelist) {
|
// handleUpSuccess2(res, file, filelist) {
|
||||||
this.form.pgoal_2_file = res.data.id;
|
// this.form.pgoal_2_file = res.data.id;
|
||||||
},
|
// },
|
||||||
handleUpSuccess3(res, file, filelist) {
|
|
||||||
this.form.pgoal_3_file = res.data.id;
|
|
||||||
},
|
|
||||||
handleUpSuccess4(res, file, filelist) {
|
|
||||||
this.form.pgoal_4_file = res.data.id;
|
|
||||||
},
|
|
||||||
handleUpSuccess5(res, file, filelist) {
|
|
||||||
this.form.pgoal_5_file = res.data.id;
|
|
||||||
},
|
|
||||||
handleRemove1(file, filelist){
|
handleRemove1(file, filelist){
|
||||||
this.form.pgoal_1_file = null;
|
debugger;
|
||||||
},
|
console.log(file)
|
||||||
handleRemove2(file, filelist){
|
console.log(filelist)
|
||||||
this.form.pgoal_2_file = null;
|
this.form.pgoal_1_file = '';
|
||||||
},
|
this.form.pgoal_2_file = '';
|
||||||
handleRemove3(file, filelist){
|
this.form.pgoal_3_file = '';
|
||||||
this.form.pgoal_3_file = null;
|
this.form.pgoal_4_file = '';
|
||||||
},
|
this.form.pgoal_5_file = '';
|
||||||
handleRemove4(file, filelist){
|
for(let i=0;i<filelist.length;i++){
|
||||||
this.form.pgoal_4_file = null;
|
let key = 'pgoal_'+(i+1)+'_file';
|
||||||
},
|
if(filelist[i].response){
|
||||||
handleRemove5(file, filelist){
|
this.form[key] = filelist[i].response.data.id;
|
||||||
this.form.pgoal_5_file = null;
|
}else{
|
||||||
|
this.form[key] = filelist[i].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// handleRemove2(file, filelist){
|
||||||
|
// this.form.pgoal_2_file = null;
|
||||||
|
// },
|
||||||
checkPermission,
|
checkPermission,
|
||||||
getList(){
|
getList(){
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
@ -292,28 +306,49 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
|
debugger;
|
||||||
this.form = Object.assign({}, scope.row); // copy obj
|
this.form = Object.assign({}, scope.row); // copy obj
|
||||||
this.form.year = ''+this.form.year;
|
this.form.year = ''+this.form.year;
|
||||||
this.fileList1=[{
|
this.fileList1=[];
|
||||||
name:this.form.pgoal_1_file_.name,
|
if(scope.row.pgoal_1_file_!==null){
|
||||||
url: this.form.pgoal_1_file_.path,
|
this.fileList1.push({
|
||||||
}];
|
name:scope.row.pgoal_1_file_.name,
|
||||||
this.fileList2=[{
|
url: scope.row.pgoal_1_file_.path,
|
||||||
name:this.form.pgoal_2_file_.name,
|
id: scope.row.pgoal_1_file
|
||||||
url: this.form.pgoal_2_file_.path,
|
})
|
||||||
}];
|
}
|
||||||
this.fileList3=[{
|
if(scope.row.pgoal_2_file_!==null){
|
||||||
name:this.form.pgoal_3_file_.name,
|
this.fileList1.push({
|
||||||
url: this.form.pgoal_3_file_.path,
|
name:scope.row.pgoal_2_file_.name,
|
||||||
}];
|
url: scope.row.pgoal_2_file_.path,
|
||||||
this.fileList4=[{
|
id: scope.row.pgoal_2_file
|
||||||
name:this.form.pgoal_4_file_.name,
|
})
|
||||||
url: this.form.pgoal_4_file_.path,
|
}
|
||||||
}];
|
if(scope.row.pgoal_3_file_!==null){
|
||||||
this.fileList5=[{
|
this.fileList1.push({
|
||||||
name:this.form.pgoal_5_file_.name,
|
name:scope.row.pgoal_3_file_.name,
|
||||||
url: this.form.pgoal_5_file_.path,
|
url: scope.row.pgoal_3_file_.path,
|
||||||
}];
|
id: scope.row.pgoal_3_file
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(scope.row.pgoal_4_file_!==null){
|
||||||
|
this.fileList1.push({
|
||||||
|
name:scope.row.pgoal_4_file_.name,
|
||||||
|
url:scope.row.pgoal_4_file_.path,
|
||||||
|
id:scope.row.pgoal_4_file
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(scope.row.pgoal_5_file_!==null){
|
||||||
|
this.fileList1.push({
|
||||||
|
name:scope.row.pgoal_5_file_.name,
|
||||||
|
url: scope.row.pgoal_5_file_.path,
|
||||||
|
id: scope.row.pgoal_5_file
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// this.fileList2=[{
|
||||||
|
// name:this.form.pgoal_2_file_.name,
|
||||||
|
// url: this.form.pgoal_2_file_.path,
|
||||||
|
// }];
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -341,7 +376,7 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = this.dialogType === "edit";
|
const isEdit = this.dialogType === "edit";
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
updatePgoal(this.task.id, this.form).then((res) => {
|
updatePgoal(this.form.id, this.form).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
debugger;
|
debugger;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
@ -4,6 +4,18 @@
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-card :style="{height:leftHeight+'px'}" class="leftCard">
|
<el-card :style="{height:leftHeight+'px'}" class="leftCard">
|
||||||
<h5>任务列表</h5>
|
<h5>任务列表</h5>
|
||||||
|
<el-select
|
||||||
|
v-model="listQuery.dept"
|
||||||
|
placeholder="报送部门"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in orgData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
<el-table :data="dataList.results" @row-click="itemClick">
|
<el-table :data="dataList.results" @row-click="itemClick">
|
||||||
<el-table-column type="expand" >
|
<el-table-column type="expand" >
|
||||||
<template slot-scope="props" v-if="props.row.task2_&&props.row.task2_.type==20">
|
<template slot-scope="props" v-if="props.row.task2_&&props.row.task2_.type==20">
|
||||||
|
@ -86,38 +98,60 @@
|
||||||
<div v-if="type==10">
|
<div v-if="type==10">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<span style="font-weight: bold;margin-top: px;">{{task2Item.task2_.year}}年目标制定</span>
|
<span style="font-weight: bold;margin-top: px;">{{deptName}} {{task2Item.task2_.year}}年目标制定</span>
|
||||||
<el-button type="primary" @click="addNewGoal">添加新目标</el-button>
|
<el-button type="primary" @click="addNewGoal">添加新目标</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>指导文件:</span>
|
||||||
|
<div v-if="task.pgoal_1_file_!==null">
|
||||||
|
<el-link :href="task.pgoal_1_file_.path" target="_blank" type="primary">{{task.pgoal_1_file_.name}}</el-link>
|
||||||
|
</div>
|
||||||
|
<div v-if="task.pgoal_2_file_!==null">
|
||||||
|
<el-link :href="task.pgoal_2_file_.path" target="_blank" type="primary">{{task.pgoal_2_file_.name}}</el-link>
|
||||||
|
</div>
|
||||||
|
<div v-if="task.pgoal_3_file_!==null">
|
||||||
|
<el-link :href="task.pgoal_3_file_.path" target="_blank" type="primary">{{task.pgoal_3_file_.name}}</el-link>
|
||||||
|
</div>
|
||||||
|
<div v-if="task.pgoal_4_file_!==null">
|
||||||
|
<el-link :href="task.pgoal_4_file_.path" target="_blank" type="primary">{{task.pgoal_4_file_.name}}</el-link>
|
||||||
|
</div>
|
||||||
|
<div v-if="task.pgoal_5_file_!==null">
|
||||||
|
<el-link :href="task.pgoal_5_file_.path" target="_blank" type="primary">{{task.pgoal_5_file_.name}}</el-link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="12" style="margin-top:10px" v-for="(item,$index) in subData">
|
<el-col :span="12" style="margin-top:10px" v-for="(item,$index) in subData">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div style="padding:10px 20px 5px 10px">
|
<div style="padding:10px 20px 5px 10px">
|
||||||
<div v-if="item.goal_key" style="font-size:18px">
|
<div v-if="item.goal_key" style="font-size:18px;height: 25px;">
|
||||||
{{item.goal_name}}
|
{{item.goal_name}}
|
||||||
<span v-if="item.goal_name=='重大质量事故'">(件)</span>
|
<span v-if="item.goal_name=='重大质量事故'">(件)</span>
|
||||||
<span v-else-if="item.goal_key!=''&&item.goal_key!=='other'">(%)</span>
|
<span v-else-if="item.goal_key!=''&&item.goal_key!=='other'">(%)</span>
|
||||||
<span v-else-if="item.goal_key==''||item.goal_key==='other'"></span>
|
<span v-else-if="item.goal_key==''||item.goal_key==='other'"></span>
|
||||||
|
|
||||||
<div class="tabType" v-if="item.goal_key==''||item.goal_key==='other'">自定义目标</div>
|
<div class="tabType" v-if="item.goal_key==''||item.goal_key=='other'">自定义目标</div>
|
||||||
<div class="tabType tabTypeBasic" v-else>基础目标</div>
|
<div class="tabType tabTypeBasic" v-else>基础目标</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="font-size:18px">新增目标</div>
|
<div v-else style="font-size:18px;height: 25px;">新增目标</div>
|
||||||
<el-row style="height:140px">
|
<el-row style="height:165px">
|
||||||
<p v-if="!item.goal_key" style="font-size:18px">目标名称:
|
<div v-if="!item.goal_key" style="font-size:18px">目标名称:
|
||||||
<el-input v-model="item.goal_name" style="width:60%"/>
|
<el-input v-model="item.goal_name" style="width:60%"/>
|
||||||
</p>
|
</div>
|
||||||
<el-col :span="10">
|
<el-col>
|
||||||
<p v-if="item.goal_key&&item.goal_key!=''&&item.goal_key!='other'">集团目标值:{{ item. goal_value_a}}</p>
|
<div v-if="item.goal_key&&item.goal_key!=''&&item.goal_key!='other'"
|
||||||
|
>
|
||||||
|
集团目标值:{{ item. goal_value_a}}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
<p>公司目标:
|
<p>公司目标:
|
||||||
<el-input v-model="item.goal_value_b" type="number" style="width:100px"/>
|
<el-input v-model="item.goal_value_b" type="number" style="width:100px"/>
|
||||||
</p>
|
</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="24">
|
||||||
<p v-if="item.goal_key&&item.goal_key!==''&&item.goal_key!=='other'">集团目标文件:<el-link type="primary" :href="item.goal_o_file_.file">{{item.goal_o_file_.name}}</el-link></p>
|
<div style="display:flex;position:relative">
|
||||||
<p style="display:flex;position:relative">
|
<span style="display: inline-block;line-height: 33px;">公司文件:</span>
|
||||||
<span>公司文件:</span>
|
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload1"
|
ref="upload1"
|
||||||
:action="upUrl"
|
:action="upUrl"
|
||||||
|
@ -132,64 +166,81 @@
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</p>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-button size="small" @click="historyFiles(item)"
|
||||||
|
style="margin-left:10px;height:32px;position: absolute;right: 0px;top:-25px">历史文件</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="text-align:right;" v-if="task2Item.task2_.state!==30">
|
<div style="text-align:right;" v-if="task2Item.task2_.state!==30">
|
||||||
<el-button v-if="!item.goal_key||item.goal_key==''||item.goal_key=='other'" size="small" type="warning" @click="delGoal(item,$index)">删除</el-button>
|
<el-button v-if="!item.goal_key||item.goal_key==''||item.goal_key=='other'" size="small" type="warning" @click="delGoal(item,$index)">删除</el-button>
|
||||||
<el-button size="small" type="primary" v-loading="saveLoading" @click="saveGoal(item)">保存</el-button>
|
<el-button size="small" type="primary" v-loading="saveLoading" @click="saveGoal(item)">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog title="历史文件" :visible.sync="historyFile">
|
||||||
|
<div
|
||||||
|
class="recordfiles"
|
||||||
|
v-for="(item, index) in fileList"
|
||||||
|
v-bind:key="item.id"
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<el-link :href="item.path" target="_blank" type="primary">
|
||||||
|
{{item.name}}
|
||||||
|
</el-link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="historyFile = false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="type==20">
|
<div v-else-if="type==20">
|
||||||
<el-card id="numCard">
|
<el-card id="numCard">
|
||||||
<span style="font-weight: bold;margin-bottom: 10px;display: inline-block;">{{task2Item.task2_.year}}年{{ cycleList[task2Item.task2_.cycle] }}日常监督</span>
|
<span style="font-weight: bold;margin-bottom: 10px;display: inline-block;">{{deptName}}{{task2Item.task2_.year}}年{{ cycleList[task2Item.task2_.cycle] }}日常监督</span>
|
||||||
<div style="display:flex;justify-content:space-between;">
|
<div style="display:flex;justify-content:space-between;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="Form"
|
ref="Form"
|
||||||
:model="numbers"
|
:model="numbers"
|
||||||
label-width="120px"
|
label-width="115px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
:rules="rule"
|
:rules="rule"
|
||||||
>
|
>
|
||||||
<el-col :span="8">
|
<el-col :lg="8" :md="12" :sm="24">
|
||||||
<el-form-item label="应发报告:" prop="num_expect">
|
|
||||||
<el-input v-model="numbers.num_expect" type="number" style="width:150px"/>
|
|
||||||
<span>件</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="已发放报告:" prop="num_issue">
|
|
||||||
<el-input v-model="numbers.num_issue" type="number" style="width:150px"/>
|
|
||||||
<span>件</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="重大事故:" prop="num_acc">
|
<el-form-item label="重大事故:" prop="num_acc">
|
||||||
<el-input v-model="numbers.num_acc" type="number" style="width:150px"/>
|
<el-input v-model="numbers.num_acc" type="number" style="width:150px"/>
|
||||||
<span>件</span>
|
<span class="danwei">件</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="8" :md="12" :sm="24">
|
||||||
|
<el-form-item label="应发报告:" prop="num_expect">
|
||||||
|
<el-input v-model="numbers.num_expect" type="number" style="width:150px"/>
|
||||||
|
<span class="danwei">件</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="8" :md="12" :sm="24">
|
||||||
|
<el-form-item label="已发放报告:" prop="num_issue">
|
||||||
|
<el-input v-model="numbers.num_issue" type="number" style="width:150px"/>
|
||||||
|
<span class="danwei">件</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin:auto 0">
|
<div style="position: absolute; right: 50px; top: 5px;">
|
||||||
<el-button type="primary" @click="numsConfirm('Form')">确认</el-button>
|
<el-button type="primary" size="mini" @click="numsConfirm('Form')">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<!-- 不准确报告 -->
|
<!-- 不准确报告 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">不准确报告</span>
|
<span class="cardTitle">不准确报告</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="rcList.length==0" type="primary" @click="handleNoNum('rc')">无记录</el-button>
|
<el-button v-if="rcList.length==0" size="mini" type="primary" @click="handleNoNum('rc')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('rc')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('rc')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('rc')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -226,14 +277,14 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 超期报告 -->
|
<!-- 超期报告 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">超期报告</span>
|
<span class="cardTitle">超期报告</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="rc2List.length==0" type="primary" @click="handleNoNum('rc2')">无记录</el-button>
|
<el-button v-if="rc2List.length==0" size="mini" type="primary" @click="handleNoNum('rc2')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('rc2')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('rc2')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('rc2')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('rc2')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -277,14 +328,14 @@
|
||||||
</saverc-dialog>
|
</saverc-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 能力验证结果 -->
|
<!-- 能力验证结果 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">能力验证结果</span>
|
<span class="cardTitle">能力验证结果</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="ptList.length==0" type="primary" @click="handleNoNum('pt')">无记录</el-button>
|
<el-button v-if="ptList.length==0" size="mini" type="primary" @click="handleNoNum('pt')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('pt')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('pt')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('pt')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('pt')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -338,14 +389,14 @@
|
||||||
</savept-dialog>
|
</savept-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 客户投诉 -->
|
<!-- 客户投诉 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">客户投诉</span>
|
<span class="cardTitle">客户投诉</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="complaintList.length==0" type="primary" @click="handleNoNum('complaint')">无记录</el-button>
|
<el-button v-if="complaintList.length==0" size="mini" type="primary" @click="handleNoNum('complaint')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('complaint')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('complaint')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('complaint')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('complaint')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -395,14 +446,14 @@
|
||||||
</savecom-dialog>
|
</savecom-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 风险识别 -->
|
<!-- 风险识别 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">风险识别</span>
|
<span class="cardTitle">风险识别</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="riskList.length==0" type="primary" @click="handleNoNum('risk')">无记录</el-button>
|
<el-button v-if="riskList.length==0" size="mini" type="primary" @click="handleNoNum('risk')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('risk')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('risk')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('risk')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('risk')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -454,14 +505,14 @@
|
||||||
</saverisk-dialog>
|
</saverisk-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 外部监督检查 -->
|
<!-- 外部监督检查 -->
|
||||||
<el-col :span="12" style="margin-top:10px">
|
<el-col :lg="12" :md="24" style="margin-top:10px">
|
||||||
<el-card >
|
<el-card >
|
||||||
<div class="cardHead">
|
<div class="cardHead">
|
||||||
<span class="cardTitle">外部监督检查</span>
|
<span class="cardTitle">外部监督检查</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button v-if="oinspectList.length==0" type="primary" @click="handleNoNum('oinspect')">无记录</el-button>
|
<el-button v-if="oinspectList.length==0" size="mini" type="primary" @click="handleNoNum('oinspect')">无记录</el-button>
|
||||||
<el-button type="primary" @click="handleImport('oinspect')">导入</el-button>
|
<el-button type="primary" size="mini" @click="handleImport('oinspect')">导入</el-button>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('oinspect')"></el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleCreate('oinspect')"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -472,7 +523,6 @@
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
|
|
||||||
<el-table-column label="检查分类">
|
<el-table-column label="检查分类">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ cateOptions[scope.row.cate] }}</span>
|
<span>{{ cateOptions[scope.row.cate] }}</span>
|
||||||
|
@ -552,7 +602,8 @@
|
||||||
import { getMyTask2Do,getPgoalDeptList,createPgoalDept,updatePgoalDept,noNum,
|
import { getMyTask2Do,getPgoalDeptList,createPgoalDept,updatePgoalDept,noNum,
|
||||||
deletePgoalDept,saveNum,getPtList,deletePt,getRcList,deleteRc,getRiskList,
|
deletePgoalDept,saveNum,getPtList,deletePt,getRcList,deleteRc,getRiskList,
|
||||||
deleteRisk,getComplaintList,deleteComplaint,getOinspectList,deleteOinspect,
|
deleteRisk,getComplaintList,deleteComplaint,getOinspectList,deleteOinspect,
|
||||||
impPt,impRc,impOverdue,impRisk,impComplaint,impOinspect} from "@/api/task";
|
impPt,impRc,impOverdue,impRisk,impComplaint,impOinspect,getPgoalList} from "@/api/task";
|
||||||
|
import { getOrgList, getSubOrgList } from "@/api/org";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
|
@ -561,6 +612,7 @@
|
||||||
import saveriskDialog from "./risk_form.vue";
|
import saveriskDialog from "./risk_form.vue";
|
||||||
import savecomDialog from "./complaint_form.vue";
|
import savecomDialog from "./complaint_form.vue";
|
||||||
import saveoinDialog from "./oinspect_form.vue";
|
import saveoinDialog from "./oinspect_form.vue";
|
||||||
|
import user from "@/store/modules/user";
|
||||||
const defaulttask = {
|
const defaulttask = {
|
||||||
year: "",
|
year: "",
|
||||||
cycle: "",
|
cycle: "",
|
||||||
|
@ -577,15 +629,20 @@
|
||||||
upHeaders: upHeaders(),
|
upHeaders: upHeaders(),
|
||||||
upUrl: upUrl(),
|
upUrl: upUrl(),
|
||||||
dialogType:"new",
|
dialogType:"new",
|
||||||
|
orgData:[],
|
||||||
subData:[],
|
subData:[],
|
||||||
|
fileList:[],
|
||||||
task2do:'',
|
task2do:'',
|
||||||
taskYear:'',
|
taskYear:'',
|
||||||
|
deptName:'',
|
||||||
numbers:{
|
numbers:{
|
||||||
num_issue:null,//已发放报告数量
|
num_issue:null,//已发放报告数量
|
||||||
num_expect:null,//应发报告数
|
num_expect:null,//应发报告数
|
||||||
num_acc:0,
|
num_acc:0,
|
||||||
},
|
},
|
||||||
task2Item:{},
|
task2Item:{},
|
||||||
|
task:{},
|
||||||
|
historyFile:false,
|
||||||
saveLoading:false,
|
saveLoading:false,
|
||||||
listLoading:false,
|
listLoading:false,
|
||||||
dialogVisible:false,
|
dialogVisible:false,
|
||||||
|
@ -596,6 +653,7 @@
|
||||||
},
|
},
|
||||||
listQuery:{
|
listQuery:{
|
||||||
page: 1,
|
page: 1,
|
||||||
|
dept:null,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
typeOptions:{
|
typeOptions:{
|
||||||
|
@ -655,14 +713,174 @@
|
||||||
mounted(){
|
mounted(){
|
||||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
this.leftHeight = height1-15;
|
this.leftHeight = height1-15;
|
||||||
|
this.listQuery.dept =this.$store.getters.dept;
|
||||||
|
this.getOrgList();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
checkPermission,
|
||||||
|
getOrgList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.checkPermission(["record_confirm"])) {
|
||||||
|
getOrgList({ can_supervision: true }).then((res) => {
|
||||||
|
that.orgData = res.data;
|
||||||
|
that.orgData.filter(item=>{
|
||||||
|
if(item.id==that.listQuery.dept){
|
||||||
|
that.deptName = item.name;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
getSubOrgList().then((res) => {
|
||||||
|
that.orgData = res.data;
|
||||||
|
that.orgData.filter(item=>{
|
||||||
|
if(item.id==that.listQuery.dept){
|
||||||
|
that.deptName = item.name;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getList(){
|
||||||
|
this.listLoading = true;
|
||||||
|
this.dataList.results =[];
|
||||||
|
this.dataList.count =0;
|
||||||
|
getMyTask2Do(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.dataList.results = response.data;
|
||||||
|
this.dataList.count = response.data.length;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleFilter() {
|
||||||
|
let that = this;
|
||||||
|
that.subData = [];
|
||||||
|
that.rcList=[],//报告证书{应发/超期}
|
||||||
|
that.rc2List=[]
|
||||||
|
that.ptList=[],//能力验证
|
||||||
|
that.riskList=[],//风险
|
||||||
|
that.complaintList=[],//投诉
|
||||||
|
that.oinspectList=[],//外部监查
|
||||||
|
that.numbers.num_acc = '';
|
||||||
|
that.numbers.num_expect = '';
|
||||||
|
that.numbers.num_issue = '';
|
||||||
|
that.listQuery.page = 1;
|
||||||
|
that.orgData.filter(item=>{
|
||||||
|
if(item.id==that.listQuery.dept){
|
||||||
|
that.deptName = item.name;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.getList();
|
||||||
|
},
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
search:'',
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
itemClick(item){
|
||||||
|
console.log(item);
|
||||||
|
let that = this;
|
||||||
|
that.task2Item = item;
|
||||||
|
that.task2do = item.id;
|
||||||
|
that.type = item.task2_.type;
|
||||||
|
if(item.task2_.type==10){
|
||||||
|
that.taskYear = item.task2_.year;
|
||||||
|
//获取任务目标值
|
||||||
|
getPgoalDeptList({task2do:item.id}).then(res=>{
|
||||||
|
let data = res.data.results;
|
||||||
|
that.subData = [];
|
||||||
|
data.forEach(item => {
|
||||||
|
let obj = item;
|
||||||
|
obj.fileLists = [];
|
||||||
|
if(item.goal_file!==null){
|
||||||
|
let file = {};
|
||||||
|
file.name = item.goal_file_.name;
|
||||||
|
file.value = item.goal_file_.path;
|
||||||
|
obj.fileLists.push(file);
|
||||||
|
that.subData.push(obj);
|
||||||
|
}else{
|
||||||
|
that.subData.push(obj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
//获取集团指导文件
|
||||||
|
getPgoalList({year:item.task2_.year,page:0}).then(resp=>{
|
||||||
|
that.task= resp.data[0];
|
||||||
|
console.log(that.task)
|
||||||
|
debugger;
|
||||||
|
})
|
||||||
|
}else{//日常监督
|
||||||
|
this.numbers.num_expect = item.num_expect;
|
||||||
|
this.numbers.num_issue = item.num_issue;
|
||||||
|
this.$nextTick(re=>{
|
||||||
|
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
let height2 = document.getElementById('numCard').clientHeight;
|
||||||
|
let height3 = (height1 - height2 - 200) / 3;
|
||||||
|
this.tableHeight = height3;
|
||||||
|
})
|
||||||
|
//获取6个列表
|
||||||
|
this.getPtList();
|
||||||
|
this.getRcList();
|
||||||
|
this.getRiskList();
|
||||||
|
this.getComplaintList();
|
||||||
|
this.getOinspectList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRcList(){
|
||||||
|
let that = this;
|
||||||
|
getRcList({task2do:that.task2do,etype:10}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.rcList =res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getRcList({task2do:that.task2do,etype:20}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.rc2List =res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPtList(){
|
||||||
|
let that = this;
|
||||||
|
getPtList({task2do:that.task2do}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.ptList=res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getRiskList(){
|
||||||
|
let that = this;
|
||||||
|
getRiskList({task2do:that.task2do}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.riskList = res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getComplaintList(){
|
||||||
|
let that = this;
|
||||||
|
getComplaintList({task2do:that.task2do}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.complaintList = res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getOinspectList(){
|
||||||
|
let that = this;
|
||||||
|
getOinspectList({task2do:that.task2do}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.oinspectList=res.data.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
historyFiles(item){
|
||||||
|
this.historyFile = true;
|
||||||
|
this.fileList = item.goal_files_;
|
||||||
|
},
|
||||||
addNewGoal(){
|
addNewGoal(){
|
||||||
// debugger;
|
|
||||||
this.subData.push({goal_name:'',goal_file:'',goal_value_b:0,year:this.taskYear});
|
this.subData.push({goal_name:'',goal_file:'',goal_value_b:0,year:this.taskYear});
|
||||||
console.log(this.subData)
|
|
||||||
},
|
},
|
||||||
delGoal(item,index){
|
delGoal(item,index){
|
||||||
if(item.id){
|
if(item.id){
|
||||||
|
@ -723,145 +941,18 @@
|
||||||
this.subData[index].goal_file = null;
|
this.subData[index].goal_file = null;
|
||||||
},
|
},
|
||||||
handleSuccessImp(res, file, fileList){
|
handleSuccessImp(res, file, fileList){
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
this.impForm.path = res.data.path;
|
this.impForm.path = res.data.path;
|
||||||
},
|
},
|
||||||
handleRemoveImp(file, fileList){
|
handleRemoveImp(file, fileList){
|
||||||
this.impForm.path = '';
|
this.impForm.path = '';
|
||||||
},
|
},
|
||||||
checkPermission,
|
|
||||||
getList(){
|
|
||||||
this.listLoading = true;
|
|
||||||
getMyTask2Do(this.listQuery).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.dataList.results = response.data;
|
|
||||||
this.dataList.count = response.data.length;
|
|
||||||
}
|
|
||||||
this.listLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleFilter() {
|
|
||||||
this.listQuery.page = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
resetFilter() {
|
|
||||||
this.listQuery = {
|
|
||||||
page: 1,
|
|
||||||
search:'',
|
|
||||||
page_size: 20,
|
|
||||||
}
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
itemClick(item){
|
|
||||||
console.log(item);
|
|
||||||
let that = this;
|
|
||||||
that.task2Item = item;
|
|
||||||
that.task2do = item.id;
|
|
||||||
that.type = item.task2_.type;
|
|
||||||
if(item.task2_.type==10){
|
|
||||||
that.taskYear = item.task2_.year;
|
|
||||||
//获取任务目标值
|
|
||||||
getPgoalDeptList({task2do:item.id}).then(res=>{
|
|
||||||
let data = res.data.results;
|
|
||||||
that.subData = [];
|
|
||||||
data.forEach(item => {
|
|
||||||
let obj = item;
|
|
||||||
obj.fileLists = [];
|
|
||||||
if(item.goal_file!==null){
|
|
||||||
let file = {};
|
|
||||||
file.name = item.goal_file_.name;
|
|
||||||
file.value = item.goal_file_.path;
|
|
||||||
obj.fileLists.push(file);
|
|
||||||
that.subData.push(obj);
|
|
||||||
}else{
|
|
||||||
that.subData.push(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
})
|
|
||||||
}else{//日常监督
|
|
||||||
this.numbers.num_expect = item.num_expect;
|
|
||||||
this.numbers.num_issue = item.num_issue;
|
|
||||||
this.$nextTick(re=>{
|
|
||||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
|
|
||||||
let height2 = document.getElementById('numCard').clientHeight;
|
|
||||||
let height3 = (height1 - height2 - 195) / 3;
|
|
||||||
this.tableHeight = height3;
|
|
||||||
})
|
|
||||||
//获取6个列表
|
|
||||||
this.getPtList();
|
|
||||||
this.getRcList();
|
|
||||||
this.getRiskList();
|
|
||||||
this.getComplaintList();
|
|
||||||
this.getOinspectList();
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getRcList(){
|
|
||||||
let that = this;
|
|
||||||
getRcList({task2do:that.task2do,etype:10}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
that.rcList =res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
getRcList({task2do:that.task2do,etype:20}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
that.rc2List =res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getPtList(){
|
|
||||||
let that = this;
|
|
||||||
getPtList({task2do:that.task2do}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res.data.results)
|
|
||||||
that.ptList=res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getRiskList(){
|
|
||||||
let that = this;
|
|
||||||
getRiskList({task2do:that.task2do}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
that.riskList = res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getComplaintList(){
|
|
||||||
let that = this;
|
|
||||||
getComplaintList({task2do:that.task2do}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
that.complaintList = res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOinspectList(){
|
|
||||||
let that = this;
|
|
||||||
getOinspectList({task2do:that.task2do}).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
// debugger;
|
|
||||||
console.log(res)
|
|
||||||
that.oinspectList=res.data.results;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
numsConfirm(form){
|
numsConfirm(form){
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
saveNum(this.task2do,this.numbers).then((res) => {
|
saveNum(this.task2do,this.numbers).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -978,7 +1069,6 @@
|
||||||
}
|
}
|
||||||
let base_url = this.downloadUrl.substr(0, this.downloadUrl.length - 3);
|
let base_url = this.downloadUrl.substr(0, this.downloadUrl.length - 3);
|
||||||
this.downloadUrl = base_url+file_url;
|
this.downloadUrl = base_url+file_url;
|
||||||
// this.downloads();
|
|
||||||
},
|
},
|
||||||
imporCconfirm(){
|
imporCconfirm(){
|
||||||
this.impForm.task2do =this.task2do;
|
this.impForm.task2do =this.task2do;
|
||||||
|
@ -1055,28 +1145,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
// downloadFile(type){
|
|
||||||
// let file_url = '';
|
|
||||||
// if(type=='rc'){
|
|
||||||
// form.key = "num_error";
|
|
||||||
// }else if(type=='rc2'){
|
|
||||||
// form.key = "num_overdue"
|
|
||||||
// }else if(type=='pt'){
|
|
||||||
// form.key = "num_pt"
|
|
||||||
// }else if(type=='risk'){
|
|
||||||
// form.key = "num_risk"
|
|
||||||
// }else if(type=='complaint'){
|
|
||||||
// form.key = "num_complaint"
|
|
||||||
// }else if(type=='oinspect'){
|
|
||||||
// form.key = "num_oinspect "
|
|
||||||
// }
|
|
||||||
// noNum(this.task2do,form).then(res=>{
|
|
||||||
// if(res.code>=200){
|
|
||||||
// this.$message.success("提交成功");
|
|
||||||
// }else{}
|
|
||||||
// })
|
|
||||||
|
|
||||||
// },
|
|
||||||
rcSaveSuccess(){
|
rcSaveSuccess(){
|
||||||
this.dialogRc = false;
|
this.dialogRc = false;
|
||||||
this.getRcList();
|
this.getRcList();
|
||||||
|
@ -1157,7 +1225,9 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
width: 200px
|
width: 200px
|
||||||
}
|
}
|
||||||
|
.danwei{
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
.taskUpload>.el-upload-list{
|
.taskUpload>.el-upload-list{
|
||||||
/* position:relative; */
|
/* position:relative; */
|
||||||
|
|
|
@ -109,17 +109,17 @@
|
||||||
<td class="numCell">{{item[1]}}</td>
|
<td class="numCell">{{item[1]}}</td>
|
||||||
<td class="numCell">{{item[2]}}</td>
|
<td class="numCell">{{item[2]}}</td>
|
||||||
<td class="numCell">{{item[3]}}</td>
|
<td class="numCell">{{item[3]}}</td>
|
||||||
|
<td class="numCell">{{item[4]}}</td>
|
||||||
<td class="numCell">{{item[5]}}</td>
|
<td class="numCell">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell numCell_last">{{item[6]}}</td>
|
||||||
<td class="numCell numCell_last">{{item[7]}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<el-row id="echartsContainer">
|
<el-row id="echartsContainer">
|
||||||
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee;border-top:0">
|
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee;border-top:0;padding-top: 0;">
|
||||||
<div id="bar1" style="width:495px;height:300px;"></div>
|
<div id="bar1" style="width:495px;height:300px;"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="chartsWrap" style="border-top:0">
|
<el-col :span="12" class="chartsWrap" style="border-top:0;padding-top: 0;">
|
||||||
<div id="bar2" style="width:495px;height:300px;margin-left: 10px;"></div>
|
<div id="bar2" style="width:495px;height:300px;margin-left: 10px;"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee">
|
<el-col :span="12" class="chartsWrap" style="border-right:1px solid #eeeeee">
|
||||||
|
@ -600,7 +600,6 @@
|
||||||
let data = res.data.filter(item=>{
|
let data = res.data.filter(item=>{
|
||||||
return item.task2_.type==20
|
return item.task2_.type==20
|
||||||
});
|
});
|
||||||
console.log(data)
|
|
||||||
data.forEach(element => {
|
data.forEach(element => {
|
||||||
let obj = element;
|
let obj = element;
|
||||||
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
||||||
|
@ -654,8 +653,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// debugger;
|
|
||||||
console.log(that.tableDatas)
|
|
||||||
that.timeStamp++;
|
that.timeStamp++;
|
||||||
for(let k=0;k<that.tableDatas.length;k++){
|
for(let k=0;k<that.tableDatas.length;k++){
|
||||||
let num = 0;
|
let num = 0;
|
||||||
|
@ -666,25 +663,26 @@
|
||||||
let num5 = that.tableDatas[k][4]?that.tableDatas[k][4]:0;
|
let num5 = that.tableDatas[k][4]?that.tableDatas[k][4]:0;
|
||||||
let num6 = that.tableDatas[k][5]?that.tableDatas[k][5]:0;
|
let num6 = that.tableDatas[k][5]?that.tableDatas[k][5]:0;
|
||||||
if(k==3){
|
if(k==3){
|
||||||
num = ((that.tableDatas[1][7]-that.tableDatas[2][7])/that.tableDatas[1][7]).toFixed(4)
|
num = ((that.tableDatas[1][6]-that.tableDatas[2][6])/that.tableDatas[1][6]).toFixed(4)
|
||||||
}else if(k==6){
|
}else if(k==6){
|
||||||
num = (that.tableDatas[5][7]/that.tableDatas[4][7]).toFixed(4)
|
num = (that.tableDatas[5][6]/that.tableDatas[4][6]).toFixed(4)
|
||||||
}else if(k==9){
|
}else if(k==9){
|
||||||
num =(that.tableDatas[8][7]/that.tableDatas[7][7]).toFixed(4)
|
num =(that.tableDatas[8][6]/that.tableDatas[7][6]).toFixed(4)
|
||||||
}else if(k==12){
|
}else if(k==12){
|
||||||
num = (that.tableDatas[11][7]/that.tableDatas[10][7]).toFixed(4)
|
num = (that.tableDatas[11][6]/that.tableDatas[10][6]).toFixed(4)
|
||||||
}else{
|
}else{
|
||||||
num = Number(num1)+Number(num2)+Number(num3)+Number(num4)+Number(num5)+Number(num6);
|
num = Number(num1)+Number(num2)+Number(num3)+Number(num4)+Number(num5)+Number(num6);
|
||||||
}
|
}
|
||||||
if(num!=='NaN'&&num!==NaN){
|
if(num!=='NaN'&&num!==NaN){
|
||||||
if(k==3||k==6||k==9||k==12){
|
if(k==3||k==6||k==9||k==12){
|
||||||
let numbe = Number(num)*100;
|
console.log(parseFloat((Number(num)*100)))
|
||||||
that.tableDatas[k][7] = numbe;
|
let numbe = parseFloat((Number(num)*100).toPrecision(12));
|
||||||
|
that.tableDatas[k][6] = numbe;
|
||||||
}else{
|
}else{
|
||||||
that.tableDatas[k][7] = num;
|
that.tableDatas[k][6] = num;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.tableDatas[k][7] = ''
|
that.tableDatas[k][6] = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,7 +840,7 @@
|
||||||
}
|
}
|
||||||
.chartsWrap{
|
.chartsWrap{
|
||||||
/* margin-top: 30px; */
|
/* margin-top: 30px; */
|
||||||
/* padding-top: 50px; */
|
padding-top: 10px;
|
||||||
border-top: 1px solid #eeeeee;
|
border-top: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -0,0 +1,562 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-row :gutter="6">
|
||||||
|
<el-select
|
||||||
|
v-model="listQuery.belong_dept"
|
||||||
|
placeholder="报送部门"
|
||||||
|
clearable
|
||||||
|
@change="belongDeptChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in orgData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="listQuery.task2__year"
|
||||||
|
type="year"
|
||||||
|
placeholder="选择年"
|
||||||
|
value-format="yyyy"
|
||||||
|
style="width:200px"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleFilter"
|
||||||
|
>查看</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="handlePrint"
|
||||||
|
>打印</el-button
|
||||||
|
>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-top:10px">
|
||||||
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
|
<h3 style="text-align: center;">{{ fileName }}</h3>
|
||||||
|
<p v-if="fileName!==''" style="text-align: center;">{{ listQuery.task2__year }}年 1—12月质量目标双月报</p>
|
||||||
|
<el-row id="echartsContainer">
|
||||||
|
<el-col :span="24" class="chartsWrap">
|
||||||
|
<div id="main" style="width:1000px;height:300px;margin-left: 10px;"></div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getTask2Do } from "@/api/task";
|
||||||
|
import { getOrgList, getSubOrgList } from "@/api/org";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
timeStamp:0,
|
||||||
|
listQuery:{
|
||||||
|
belong_dept:'',
|
||||||
|
task2__year:'',
|
||||||
|
page:0
|
||||||
|
},
|
||||||
|
|
||||||
|
deptName:'',
|
||||||
|
fileName:'',
|
||||||
|
|
||||||
|
tableDatas:[
|
||||||
|
[],[],[],[],[],[],[],[],[],[],[],[],[]
|
||||||
|
],
|
||||||
|
orgData:[],
|
||||||
|
barChart1:null,
|
||||||
|
bar1option:{},
|
||||||
|
barchart2:null,
|
||||||
|
lineChart1:null,
|
||||||
|
lineChart2:null,
|
||||||
|
lineChart3:null,
|
||||||
|
lineChart4:null,
|
||||||
|
xAxisData:["1-2月","3-4月","5-6月","7-8月","9-10月","11-12月"],
|
||||||
|
line1Data:[],
|
||||||
|
line2Data:[],
|
||||||
|
line3Data:[],
|
||||||
|
line4Data:[],
|
||||||
|
line1Option:{},
|
||||||
|
line2Option:{},
|
||||||
|
line3Option:{},
|
||||||
|
line4Option:{},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getGroup();
|
||||||
|
this.optionSet();
|
||||||
|
var myChart = echarts.init(document.getElementById('main'));
|
||||||
|
var option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger:"axis",
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow'
|
||||||
|
},
|
||||||
|
formatter:"{a1}<br/>{b1}:{c1}%"
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data:['目标值']
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: ["中存","中存","中存","中存","中存","中存"]
|
||||||
|
},
|
||||||
|
color:['#91cc75','#438af4'],
|
||||||
|
yAxis: {
|
||||||
|
axisLabel:{
|
||||||
|
formatter:"{value}%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '',
|
||||||
|
type: 'bar',
|
||||||
|
z:"-1",
|
||||||
|
barGap: '-100%',
|
||||||
|
data: [100, 100, 100, 100, 100, 100],
|
||||||
|
markLine : {
|
||||||
|
symbol:"none",
|
||||||
|
label: {
|
||||||
|
position: "end", //将警示值放在哪个位置,三个值“start”,"middle","end" 开始 中点 结束
|
||||||
|
},
|
||||||
|
data : [{
|
||||||
|
silent:false, //鼠标悬停事件 true没有,false有
|
||||||
|
lineStyle:{ //警戒线的样式 ,虚实 颜色
|
||||||
|
type:"solid",
|
||||||
|
color:"#ffb4b4",
|
||||||
|
},
|
||||||
|
label:{
|
||||||
|
position:'end',
|
||||||
|
formatter:"目标(90)",
|
||||||
|
color:"#ffb4b4",
|
||||||
|
fontSize:'8'
|
||||||
|
},
|
||||||
|
yAxis:90 // 警戒线的标注值,可以有多个yAxis,多条警示线 或者采用 {type : 'average', name: '平均值'},type值有 max min average,分为最大,最小,平均值
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '及时率',
|
||||||
|
type: 'bar',
|
||||||
|
data: [95, 92, 96, 90, 91, 98]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
belongDeptChange(a){
|
||||||
|
this.fileName = '';
|
||||||
|
let selectItem = this.orgData.filter(item=>{
|
||||||
|
return item.id==a
|
||||||
|
})
|
||||||
|
this.deptName = selectItem[0].name;
|
||||||
|
},
|
||||||
|
optionSet(){
|
||||||
|
let chartDom3 = document.getElementById('lin1');
|
||||||
|
this.lineChart1 = echarts.init(chartDom3);
|
||||||
|
this.line1Option = {
|
||||||
|
title: {
|
||||||
|
text: '报告/证书合格率'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['报告/证书合格率']
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '5%',
|
||||||
|
right: '7%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
feature: {
|
||||||
|
saveAsImage: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: this.xAxisData
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '报告/证书合格率',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'Total',
|
||||||
|
data: this.line1Data
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
let chartDom4 = document.getElementById('lin2');
|
||||||
|
this.lineChart2 = echarts.init(chartDom4);
|
||||||
|
this.line2Option = {
|
||||||
|
title: {
|
||||||
|
text: '报告/证书及时率'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['报告/证书及时率']
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '7%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
feature: {
|
||||||
|
saveAsImage: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: this.xAxisData
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '报告/证书及时率',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'Total',
|
||||||
|
data: this.line2Data
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
let chartDom5 = document.getElementById('lin3');
|
||||||
|
this.lineChart3 = echarts.init(chartDom5);
|
||||||
|
this.line3Option = {
|
||||||
|
title: {
|
||||||
|
text: '能力验证满意率'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['能力验证满意率']
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '5%',
|
||||||
|
right: '7%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
feature: {
|
||||||
|
saveAsImage: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: this.xAxisData
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '能力验证满意率',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'Total',
|
||||||
|
data: this.line3Data
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
let chartDom6 = document.getElementById('lin4');
|
||||||
|
this.lineChart4 = echarts.init(chartDom6);
|
||||||
|
this.line4Option = {
|
||||||
|
title: {
|
||||||
|
text: '客户投诉处理满意率'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['客户投诉处理满意率']
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '7%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
feature: {
|
||||||
|
saveAsImage: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: this.xAxisData
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '客户投诉处理满意率',
|
||||||
|
type: 'line',
|
||||||
|
stack: 'Total',
|
||||||
|
data:this.line4Data
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleFilter(){
|
||||||
|
let that = this;
|
||||||
|
if(that.listQuery.belong_dept!==''){
|
||||||
|
if(that.listQuery.task2__year!==''){
|
||||||
|
that.bar1Data = [];
|
||||||
|
that.bar2Data = [];
|
||||||
|
that.line1Data = [];
|
||||||
|
that.line2Data = [];
|
||||||
|
that.line3Data = [];
|
||||||
|
that.line4Data = [];
|
||||||
|
that.fileName = that.deptName;
|
||||||
|
that.tableData1 = [];
|
||||||
|
that.tableDatas = [ [],[],[],[],[],[],[],[],[],[],[],[],[]];
|
||||||
|
getTask2Do(that.listQuery).then(res=>{
|
||||||
|
let data = res.data.filter(item=>{
|
||||||
|
return item.task2_.type==20
|
||||||
|
});
|
||||||
|
data.forEach(element => {
|
||||||
|
let obj = element;
|
||||||
|
if(element.num_issue!==null&&element.num_error!==null&&element.num_issue!==0){
|
||||||
|
let rate1 = ((element.num_issue-element.num_error)/element.num_issue).toFixed(4)
|
||||||
|
obj.rate1 = Number(rate1)*100
|
||||||
|
}else{
|
||||||
|
obj.rate1 = ''
|
||||||
|
}
|
||||||
|
if(element.num_expect!==null&&element.num_issue!==null&&element.num_expect!==0){
|
||||||
|
let rate2 = (element.num_issue/element.num_expect).toFixed(4)
|
||||||
|
obj.rate2 = Number(rate2)*100
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
obj.rate2 = ''
|
||||||
|
}
|
||||||
|
if(element.num_pt!==null&&element.num_pt_10!==null&&element.num_pt!==0){
|
||||||
|
let rate3 = (element.num_pt_10/element.num_pt).toFixed(4)
|
||||||
|
obj.rate3 = Number(rate3)*100
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
obj.rate3 = ''
|
||||||
|
}
|
||||||
|
if(element.num_complaint!==null&&element.num_complaint_10!==null&&element.num_complaint!==0){
|
||||||
|
let rate4 = (element.num_complaint_10/element.num_complaint).toFixed(4)
|
||||||
|
obj.rate4 = Number(rate4)*100
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
obj.rate4 = ''
|
||||||
|
}
|
||||||
|
let ind = element.task2_.cycle-1;
|
||||||
|
that.tableData1[ind] = obj;
|
||||||
|
});
|
||||||
|
for (let i = 0; i < that.tableData1.length; i++) {
|
||||||
|
let item = that.tableData1[i];
|
||||||
|
if(item!==undefined){
|
||||||
|
for(let j = 0; j < that.tableDatas.length; j++){
|
||||||
|
that.tableDatas[j][i] =
|
||||||
|
j==0?item.num_acc:
|
||||||
|
j==1?item.num_issue:
|
||||||
|
j==2?item.num_error:
|
||||||
|
j==3?item.rate1:
|
||||||
|
j==4?item.num_expect:
|
||||||
|
j==5?item.num_issue:
|
||||||
|
j==6?item.rate2:
|
||||||
|
j==7?item.num_pt:
|
||||||
|
j==8?item.num_pt_10:
|
||||||
|
j==9?item.rate3:
|
||||||
|
j==10?item.num_complaint:
|
||||||
|
j==11?item.num_complaint_10:
|
||||||
|
item.rate4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.timeStamp++;
|
||||||
|
for(let k=0;k<that.tableDatas.length;k++){
|
||||||
|
let num = 0;
|
||||||
|
let num1 = that.tableDatas[k][0]?that.tableDatas[k][0]:0;
|
||||||
|
let num2 = that.tableDatas[k][1]?that.tableDatas[k][1]:0;
|
||||||
|
let num3 = that.tableDatas[k][2]?that.tableDatas[k][2]:0;
|
||||||
|
let num4 = that.tableDatas[k][3]?that.tableDatas[k][3]:0;
|
||||||
|
let num5 = that.tableDatas[k][4]?that.tableDatas[k][4]:0;
|
||||||
|
let num6 = that.tableDatas[k][5]?that.tableDatas[k][5]:0;
|
||||||
|
if(k==3){
|
||||||
|
num = ((that.tableDatas[1][7]-that.tableDatas[2][7])/that.tableDatas[1][7]).toFixed(4)
|
||||||
|
}else if(k==6){
|
||||||
|
num = (that.tableDatas[5][7]/that.tableDatas[4][7]).toFixed(4)
|
||||||
|
}else if(k==9){
|
||||||
|
num =(that.tableDatas[8][7]/that.tableDatas[7][7]).toFixed(4)
|
||||||
|
}else if(k==12){
|
||||||
|
num = (that.tableDatas[11][7]/that.tableDatas[10][7]).toFixed(4)
|
||||||
|
}else{
|
||||||
|
num = Number(num1)+Number(num2)+Number(num3)+Number(num4)+Number(num5)+Number(num6);
|
||||||
|
}
|
||||||
|
if(num!=='NaN'&&num!==NaN){
|
||||||
|
if(k==3||k==6||k==9||k==12){
|
||||||
|
// debugger;
|
||||||
|
console.log(parseFloat((Number(num)*100)))
|
||||||
|
// parseFloat((Number(num)*100).toPrecision(12))
|
||||||
|
let numbe = parseFloat((Number(num)*100).toPrecision(12));
|
||||||
|
that.tableDatas[k][7] = numbe;
|
||||||
|
}else{
|
||||||
|
that.tableDatas[k][7] = num;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
that.tableDatas[k][7] = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(let i=0;i<6;i++){
|
||||||
|
if(that.tableDatas[1][i]!==undefined){
|
||||||
|
that.bar1Data.push(Number(that.tableDatas[1][i]))
|
||||||
|
}else{
|
||||||
|
that.bar1Data.push(0)
|
||||||
|
}
|
||||||
|
if(that.tableDatas[4][i]!==undefined){
|
||||||
|
that.bar2Data.push(Number(that.tableDatas[4][i]))
|
||||||
|
}else{
|
||||||
|
that.bar2Data.push(0)
|
||||||
|
}
|
||||||
|
if(that.tableDatas[3][i]!==undefined){
|
||||||
|
that.line1Data.push(Number(that.tableDatas[3][i]))
|
||||||
|
}else{
|
||||||
|
that.line1Data.push(0)
|
||||||
|
}
|
||||||
|
if(that.tableDatas[6][i]!==undefined){
|
||||||
|
that.line2Data.push(Number(that.tableDatas[6][i]))
|
||||||
|
}else{
|
||||||
|
that.line2Data.push(0)
|
||||||
|
}
|
||||||
|
if(that.tableDatas[9][i]!==undefined){
|
||||||
|
that.line3Data.push(Number(that.tableDatas[9][i]))
|
||||||
|
}else{
|
||||||
|
that.line3Data.push(0)
|
||||||
|
}
|
||||||
|
if(that.tableDatas[12][i]!==undefined){
|
||||||
|
that.line4Data.push(Number(that.tableDatas[12][i]))
|
||||||
|
}else{
|
||||||
|
that.line4Data.push(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.bar1Option.series[0].data = that.bar1Data;
|
||||||
|
that.bar2Option.series[0].data = that.bar2Data;
|
||||||
|
that.line1Option.series[0].data = that.line1Data;
|
||||||
|
that.line2Option.series[0].data = that.line2Data;
|
||||||
|
that.line3Option.series[0].data = that.line3Data;
|
||||||
|
that.line4Option.series[0].data = that.line4Data;
|
||||||
|
|
||||||
|
that.barChart1.clear();
|
||||||
|
that.barChart1.setOption(that.bar1Option);
|
||||||
|
that.barChart2.clear();
|
||||||
|
that.barChart2.setOption(that.bar2Option);
|
||||||
|
|
||||||
|
that.lineChart1.clear();
|
||||||
|
that.lineChart1.setOption(that.line1Option);
|
||||||
|
that.lineChart2.clear();
|
||||||
|
that.lineChart2.setOption(that.line2Option);
|
||||||
|
|
||||||
|
that.lineChart3.clear();
|
||||||
|
that.lineChart3.setOption(that.line3Option);
|
||||||
|
that.lineChart4.clear();
|
||||||
|
that.lineChart4.setOption(that.line4Option);
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.$message.warning('请选择时间')
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$message.warning('请选择部门')
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handlePrint() {
|
||||||
|
this.$PRINT('#myReport');
|
||||||
|
},
|
||||||
|
|
||||||
|
checkPermission,
|
||||||
|
getGroup() {
|
||||||
|
if (this.checkPermission(["record_confirm"])) {
|
||||||
|
getOrgList({ can_supervision: true }).then((res) => {
|
||||||
|
this.orgData = res.data;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
getSubOrgList().then((res) => {
|
||||||
|
this.orgData = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.printContainer{
|
||||||
|
width: 1075px;
|
||||||
|
}
|
||||||
|
#numTable,#echartsContainer{
|
||||||
|
margin-left: 37px;
|
||||||
|
}
|
||||||
|
#numTable td{
|
||||||
|
height: 32px;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
.numCell{
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
.numCell.numCell_last{
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
#echartsContainer{
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.chartsWrap{
|
||||||
|
/* margin-top: 30px; */
|
||||||
|
/* padding-top: 50px; */
|
||||||
|
border-top: 1px solid #eeeeee;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -46,7 +46,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="年份" prop="year"></el-table-column>
|
<el-table-column label="年份" prop="year"></el-table-column>
|
||||||
<el-table-column label="周期">
|
<el-table-column label="周期">
|
||||||
<template slot-scope="scope" v-if="scope.row.state==20">{{ cycleList[scope.row.cycle] }}</template>
|
<template slot-scope="scope">{{ cycleList[scope.row.cycle] }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态">
|
<el-table-column label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -55,6 +55,7 @@
|
||||||
<el-tag v-else type="success">已关闭</el-tag>
|
<el-tag v-else type="success">已关闭</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="截止日期" prop="end_date"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
|
@ -133,6 +134,16 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="截止日期" prop="end_date">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="task.end_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择截止日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width:50%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -149,6 +160,7 @@
|
||||||
year: "",
|
year: "",
|
||||||
cycle: "",
|
cycle: "",
|
||||||
type: 10,
|
type: 10,
|
||||||
|
end_date:''
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components:{Pagination},
|
components:{Pagination},
|
||||||
|
@ -185,6 +197,7 @@
|
||||||
rule1: {
|
rule1: {
|
||||||
year: [{ required: true, message: "请选择", trigger: "blur" }],
|
year: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||||
cycle: [{ required: true, message: "请选择", trigger: "blur" }],
|
cycle: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||||
|
end_date: [{ required: true, message: "请选择", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -228,6 +241,7 @@
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.task = Object.assign({}, scope.row); // copy obj
|
this.task = Object.assign({}, scope.row); // copy obj
|
||||||
this.task.year = ''+this.task.year;
|
this.task.year = ''+this.task.year;
|
||||||
|
this.task.end_date = ''+this.task.end_date;
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -7,26 +7,32 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 10px; margin-right: 10px">
|
<div style="margin-left: 10px; margin-right: 10px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">任务类型:</span>
|
<span class="term">任务类型:</span>
|
||||||
<span class="desc" v-if="task.type==10">目标制定</span>
|
<span class="desc" v-if="task.type==10">目标制定</span>
|
||||||
<span class="desc" v-else>日常监督</span>
|
<span class="desc" v-else>日常监督</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">年份:</span>
|
<span class="term">年份:</span>
|
||||||
<span class="desc"> {{ task.year }}</span>
|
<span class="desc"> {{ task.year }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">周期:</span>
|
<span class="term">周期:</span>
|
||||||
<span class="desc"> {{ cycleOptions[task.cycle] }}</span>
|
<span class="desc"> {{ cycleOptions[task.cycle] }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
|
<div style="margin-bottom: 6px">
|
||||||
|
<span class="term">截止日期:</span>
|
||||||
|
<span class="desc"> {{ task.end_date }}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">任务状态</span>
|
<span class="term">任务状态</span>
|
||||||
<span class="desc">
|
<span class="desc">
|
||||||
|
@ -46,7 +52,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<div style="margin-bottom: 6px">
|
<div style="margin-bottom: 6px">
|
||||||
<span class="term">创建人:</span>
|
<span class="term">创建人:</span>
|
||||||
<span class="desc">{{ task.create_by_name }}</span>
|
<span class="desc">{{ task.create_by_name }}</span>
|
||||||
|
@ -95,7 +101,12 @@
|
||||||
{{scope.row.belong_dept_.name}}
|
{{scope.row.belong_dept_.name}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否完成">
|
<el-table-column label="执行进度">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.pross }}%
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否完成">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.count_up>scope.row.count_all " effect="plain">是</el-tag>
|
<el-tag v-if="scope.row.count_up>scope.row.count_all " effect="plain">是</el-tag>
|
||||||
<el-tag type="danger" effect="plain" v-else>否</el-tag>
|
<el-tag type="danger" effect="plain" v-else>否</el-tag>
|
||||||
|
@ -537,7 +548,15 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// debugger;
|
// debugger;
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
this.taskdeptall = res.data.results;
|
this.taskdeptall = [];
|
||||||
|
let taskdept = res.data.results;
|
||||||
|
taskdept.forEach(item=>{
|
||||||
|
let obj = item;
|
||||||
|
// debugger;
|
||||||
|
let pross = Number((item.count_up/item.count_all).toFixed(4))
|
||||||
|
obj.pross = parseFloat((pross*100).toPrecision(12));
|
||||||
|
this.taskdeptall.push(obj);
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
|
|
Loading…
Reference in New Issue