@@ -96,6 +333,7 @@
} from '@/utils/auth';
import LxHeader from "@/components/LxHeader/index.vue";
import Tinymce from '@/components/Tinymce';
+ import myecharts from '@/components/myecharts';
import viewInfo from '../lawsfile/index/components/viewInfo.vue'
import {
listarticle,
@@ -104,7 +342,16 @@
import {
getdaily,
listtask
- } from "../../api/daily/index.js";
+ } from "../../api/daily/index.js";
+ import {
+ listunit
+ } from '@/api/task/unit.js'
+ import {
+ listpatrol
+ } from '@/api/task/patrol.js'
+ import checkUnit from '@/views/task/list/components/checkUnit.vue'
+ import addPatrol from '@/views/task/list/components/addPatrol.vue'
+ import showPatrol from '@/views/task/list/components/showPatrol.vue'
export default {
name: 'Dashboard',
computed: {
@@ -116,7 +363,11 @@
components: {
LxHeader,
Tinymce,
- viewInfo
+ viewInfo,
+ myecharts,
+ checkUnit,
+ addPatrol,
+ showPatrol
},
data() {
return {
@@ -128,8 +379,21 @@
dialogDailyViewVisible: false,
tableHeight: 0,
clientHeight: 0,
- tableData: [],
+ tableData: [],
+
+ daliyName: 'first',
+ auditList:[],
+ myselfList:[],
+ patrolList:[],
+ auditTotal:0,
+ myselfTotal:0,
+ patrolTotal:0,
dailytableData: [],
+ lawData: [],
+ dangerData: [],
+ yearData: [],
+ mission_data: {},
+ inspection_data: {},
formLabelWidth: "120px",
lawform: {
title: "",
@@ -145,19 +409,212 @@
end_date: "",
department_list: [],
daterange: null
- },
+ },
+ missionTable: [{
+ label: "标题",
+ prop: 'name',
+ align: 'left',
+ fixed:'left',
+ width: 240
+ }, {
+ label: "状态",
+ prop: 'audit_status',
+ width: 180,
+ formatter: (cell, data, value, index) => {
+ return value == 1 ? '开展中' : (value == 2 ? '不通过' : (value == 0 ? '待审核' : ''))
+ }
+ },{
+ label: "开始日期",
+ prop: 'start_date',
+ width: 180,
+ }, {
+ label: "结束日期",
+ prop: 'end_date',
+ width: 180,
+ }, {
+ label: "任务类型",
+ prop: 'type',
+ width: 180,
+ formatter: (cell, data, value, index) => {
+ return value == 1 ? '专项任务' : (value == 2 ? '文件学习培训' : (value == 3 ? '事件隐患任务' : (value == 4 ? '科室任务' : '')))
+ }
+ }, {
+ label: "任务类别",
+ prop: 'unit_type',
+ width: 180,
+ formatter: (cell, data, value, index) => {
+ return value == 1 ? '专项检查' : (value == 2 ? '资料收集' : (value == 3 ? '网络安全' : ''))
+ }
+ }, {
+ label: "完成要求",
+ prop: 'end_type',
+ width: 180,
+ formatter: (cell, data, value, index) => {
+ return value == 1 ? '提交文字' : (value == 2 ? '提交附件' : (value == 3 ? '提交文字与附件' : ''))
+ }
+ }, {
+ label: "参与人员",
+ prop: '_names',
+ width: 360,
+ algn: 'left',
+ customFn: (row) => {
+ }
+
+ }],
+ 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:'待领导确认整改'
+ }],
+ patrolTable:[{
+ label:"任务专题",
+ prop:'mission.name',
+ align:'left',
+ fixed:'left',
+ width:240
+ },{
+ label:"检查日期",
+ prop:'date',
+ width:180,
+ },{
+ label:"状态",
+ prop:'status',
+ width:180,
+ formatter:(cell,data,value,index)=>{
+ for(var item of this.statusList){
+ if(item.id==value){
+ return item.value
+ }
+ }
+ }
+ },{
+ label:"问题类型",
+ prop:'ask.value',
+ width:180,
+ },{
+ label:"地点",
+ prop:'site.name',
+ width:180,
+ },{
+ label:"问题图片",
+ prop:'files',
+ width:240,
+ customFn: (row) => {
+ let arr = []
+ return (
{
+ row.files.map(item=>{
+ arr.push(item.url)
+ return (
+ )
+ })
+ }
+
)
+ }
+ },{
+ label:"计划完成日期",
+ prop:'plan_end_date',
+ width:180,
+ },{
+ label:"整改完成日期",
+ prop:'fix_end_date',
+ width:180,
+ },{
+ label:"整改图片",
+ prop:'fix_files',
+ width:240,
+ customFn: (row) => {
+ let arr = []
+ return (
{
+ row.fix_files.map(item=>{
+ arr.push(item.url)
+ return (
+ )
+ })
+ }
+
)
+ }
+ },{
+ label:"上报人",
+ prop:'admin.name',
+ width:180,
+ }],
lawcolumns: [{
field: "created_at",
title: "日期",
- type: "string",
- width: 200,
+ type: "date",
+ width: 170,
align: "center"
},
{
field: "menu",
title: "栏目",
type: "menu",
- width: 200,
+ width: 140,
align: "center"
},
{
@@ -168,14 +625,14 @@
{
field: "操作",
title: "操作",
- width: 220,
+ width: 120,
type: "opt",
}
],
dailycolumns: [{
field: "start_date",
title: "开始时间",
- type: "string",
+ type: "date",
align: "center",
width: 200,
},
@@ -183,7 +640,7 @@
field: "end_date",
title: "结束时间",
align: "center",
- type: "string",
+ type: "date",
width: 200,
},
{
@@ -207,6 +664,8 @@
created() {
this.uploadOther.token = getToken();
// this.initLoad();
+ this.getInspectionData()
+ this.getMissionData()
this.load();
},
@@ -219,31 +678,140 @@
var topHeight = 50; //页面 头部
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
+ },
+ checkUnits(id,type){
+ this.$refs.checkUnit.id = id
+ this.$refs.checkUnit.type = type
+ this.$refs.checkUnit.isShow = true
},
-
- load() {
- listarticle({
- page: this.paginations.page,
- page_size: this.paginations.page_size
- }).then(res => {
- this.tableData = res.data;
+ getInspectionData() {
+ let objs = this.randomMonth()
+ this.inspection_data = {
+ x: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
+ list: [{
+ name: "合计",
+ data: objs.data1,
+ type: 'bar',
+ unit: "件"
+ }, {
+ name: "已完成",
+ data: objs.data2,
+ type: 'bar',
+ unit: "件"
+ }, {
+ name: "未完成",
+ data: objs.data3,
+ type: 'bar',
+ unit: "件"
+ }]
+ }
+ },
+ getMissionData() {
+ let objs = this.randomMonth()
+ this.mission_data = {
+ x: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
+ list: [{
+ name: "开展中",
+ data: objs.data1,
+ type: 'line',
+ unit: "件"
+ }, {
+ name: "已完成",
+ data: objs.data2,
+ type: 'line',
+ unit: "件"
+ }, {
+ name: "未完成",
+ data: objs.data3,
+ type: 'line',
+ unit: "件"
+ }]
+ }
+ },
+ randomMonth() {
+ let months = 12
+ let obj = {
+ data1: [],
+ data2: [],
+ data3: [],
+ }
+ for (var i = 0; i < months; i++) {
+ obj.data1.push(Math.floor(Math.random() * 11) + 10)
+ obj.data2.push(Math.floor(Math.random() * 9) + 1)
+ obj.data3[i] = obj.data1[i] - obj.data2[i]
+ }
+ return obj
+ },
+ load() {
+ let that = this
+ listarticle(
+ that.paginations.page, '', '', that.paginations
+ .page_size, 2
+ ).then(res => {
+ this.lawData = res.data;
}).catch(error => {
- });
- listtask({
- page: this.paginations.page,
- page_size: this.paginations.page_size,
- show_self: 1
- }).then(response => {
- this.dailytableData = response.data;
+ });
+ listarticle(
+ that.paginations.page, '', '', that.paginations
+ .page_size, 1
+ ).then(res => {
+ this.tableData = res.data;
+
+ }).catch(error => {
+
+ });
+ this.getAuditList()
+ this.getMyselfList()
+ this.getPatrolList()
+ // listtask({
+ // page: this.paginations.page,
+ // page_size: this.paginations.page_size,
+ // show_self: 1
+ // }).then(response => {
+ // this.dailytableData = response.data;
- }).catch(error => {
- console.log(error)
- reject(error)
- })
+ // }).catch(error => {
+ // console.log(error)
+ // reject(error)
+ // })
+ },
+ getAuditList(){
+ // 我的审批
+ listunit({
+ page:1,
+ page_size:5,
+ myself_audit:1,
+ audit_status:0
+ }).then(res=>{
+ this.auditList = res.data
+ this.auditTotal = res.total
+ })
+ },
+ getMyselfList(){
+ // 我的任务
+ listunit({
+ page:1,
+ page_size:5,
+ myself:1,
+ audit_status:1
+ }).then(res=>{
+ this.myselfList = res.data
+ this.myselfTotal = res.total
+ })
+ },
+ // 检查整改
+ getPatrolList(){
+ listpatrol({
+ page:1,
+ page_size:5,
+ myself:1
+ }).then(res=>{
+ this.patrolList = res.data
+ this.patrolTotal = res.total
+ })
},
-
show(obj) {
this.$refs.viewInfo.dialogViewVisible = true;
this.$refs.viewInfo.getinfo(obj.id);
@@ -294,7 +862,23 @@
}
-
+
diff --git a/src/views/task/list/components/addUnit.vue b/src/views/task/list/components/addUnit.vue
index 9ddfd7e..6d37036 100644
--- a/src/views/task/list/components/addUnit.vue
+++ b/src/views/task/list/components/addUnit.vue
@@ -104,23 +104,29 @@
- 任务完成要求:
-
+
{{mission_type==2?'学习方式':'任务完成要求'}}:
+
+
-
-
+
+
-
+
+
+
+
+
+