diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 8ed9119..a4a82d8 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -3,11 +3,45 @@
+ + +
+ 年度任务计划执行情况 + +
+
+
+
50 +
+
计划任务/活动数
+
+
+
30 +
+
当前执行数量
+
+
+
20 +
+
剩余数量
+
+
+
+ 60% +
+
进展率
+
+
+ +
+
- 最新动态 + 动态信息

浏览最近上传的文件

@@ -34,7 +68,7 @@
- 安全之窗 + 规章制度

@@ -47,9 +81,9 @@
{{scope.row.menu?scope.row.menu.name:"无"}} -
-
- {{scope.row[column.field]?scope.row[column.field].substring(0,16):""}} +
+
+ {{scope.row[column.field]?scope.row[column.field].substring(0,16):""}}
{{scope.row[column.field]}}
@@ -60,7 +94,7 @@
- 待办事项 + 我的任务
@@ -69,72 +103,73 @@ 我的审批 -
- - - - - - - - - +
+ + + + + + + + +
@@ -144,71 +179,72 @@
- - - - - - - - - + + + + + + + + +
@@ -218,19 +254,19 @@
- - - + + +
--> @@ -277,9 +313,9 @@
- + - + @@ -342,15 +378,15 @@ import { getdaily, listtask - } 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' + } 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', @@ -364,9 +400,9 @@ LxHeader, Tinymce, viewInfo, - myecharts, - checkUnit, - addPatrol, + myecharts, + checkUnit, + addPatrol, showPatrol }, data() { @@ -379,15 +415,15 @@ dialogDailyViewVisible: false, tableHeight: 0, clientHeight: 0, - tableData: [], - - daliyName: 'first', - auditList:[], - myselfList:[], - patrolList:[], - auditTotal:0, - myselfTotal:0, - patrolTotal:0, + tableData: [], + + daliyName: 'first', + auditList: [], + myselfList: [], + patrolList: [], + auditTotal: 0, + myselfTotal: 0, + patrolTotal: 0, dailytableData: [], lawData: [], dangerData: [], @@ -409,460 +445,476 @@ 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: "date", - width: 170, - align: "center" - }, - { - field: "menu", - title: "栏目", - type: "menu", - width: 140, - align: "center" - }, - { - field: "title", - title: "标题", - align: "left" - }, - { - field: "操作", - title: "操作", - width: 120, - type: "opt", + }, + 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 ? '待审核' : '')) } - ], - dailycolumns: [{ - field: "start_date", - title: "开始时间", - type: "date", - align: "center", - width: 200, - }, - { - field: "end_date", - title: "结束时间", - align: "center", - type: "date", - width: 200, - }, - { - field: "title", - title: "任务名称", - type: "string", - align: "left" - }, - { - field: "操作", - title: "操作", - width: 220, - type: "opt", + }, { + 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 ? '科室任务' : + ''))) } - ], - uploadOther: { - token: "" - }, - } - }, - created() { - this.uploadOther.token = getToken(); - // this.initLoad(); - this.getInspectionData() - this.getMissionData() - this.load(); - - }, - methods: { - initLoad() { - var that = this; - var clientHeight = document.documentElement.clientHeight - var lxHeader_height = 96.5; //查询 头部 - var paginationHeight = 37; //分页的高度 - 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 - }, - 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 => { - - }); - 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) - // }) - }, - 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); - - }, - showdaily(obj) { - this.clientHeight = document.documentElement.clientHeight - 84 - 110; - this.dialoglawViewVisible = false; - this.dialogDailyViewVisible = true; - this.infodaily(obj); - }, - info(obj) { - var that = this; - get(obj.id).then(res => { - let result = Object.assign(that.lawform, res); - that.lawform = result; - let _files = []; - for (var mod of result.files) { - let m = Object.assign({}, mod); - m.name = mod.original_name; - m.url = mod.url; - _files.push(m); + }, { + label: "任务类别", + prop: 'unit_type', + width: 180, + formatter: (cell, data, value, index) => { + return value == 1 ? '专项检查' : (value == 2 ? '资料收集' : (value == 3 ? '网络安全' : '')) } - that.lawform.files = _files; - }).catch(error => { - //reject(error) - }); - }, - infodaily(obj) { - var that = this; - getdaily(obj.id).then(res => { - let result = Object.assign(that.lawform, res); - that.dailyform = result; - let _files = []; - for (var mod of result.files) { - let m = Object.assign({}, mod); - m.name = mod.original_name; - m.url = mod.url; - _files.push(m); + }, { + label: "完成要求", + prop: 'end_type', + width: 180, + formatter: (cell, data, value, index) => { + return value == 1 ? '提交文字' : (value == 2 ? '提交附件' : (value == 3 ? '提交文字与附件' : '')) } - that.dailyform.files = _files; - }).catch(error => { - //reject(error) - }); - }, + }, { + 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 ( < div style = { + { + whiteSpace: 'normal' + } + } > { + row.files.map(item => { + arr.push(item.url) + return ( + ) + }) + } < + /div>) + } + }, { + 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 ( < div style = { + { + whiteSpace: 'normal' + } + } > { + row.fix_files.map(item => { + arr.push(item.url) + return ( + ) + }) + } < + /div>) + } + }, { + label: "上报人", + prop: 'admin.name', + width: 180, + }], + lawcolumns: [{ + field: "created_at", + title: "日期", + type: "date", + width: 170, + align: "center" + }, + { + field: "menu", + title: "栏目", + type: "menu", + width: 140, + align: "center" + }, + { + field: "title", + title: "标题", + align: "left" + }, + { + field: "操作", + title: "操作", + width: 120, + type: "opt", + } + ], + dailycolumns: [{ + field: "start_date", + title: "开始时间", + type: "date", + align: "center", + width: 200, + }, + { + field: "end_date", + title: "结束时间", + align: "center", + type: "date", + width: 200, + }, + { + field: "title", + title: "任务名称", + type: "string", + align: "left" + }, + { + field: "操作", + title: "操作", + width: 220, + type: "opt", + } + ], + uploadOther: { + token: "" + }, + } + }, + created() { + this.uploadOther.token = getToken(); + // this.initLoad(); + this.getInspectionData() + this.getMissionData() + this.load(); + + }, + methods: { + initLoad() { + var that = this; + var clientHeight = document.documentElement.clientHeight + var lxHeader_height = 96.5; //查询 头部 + var paginationHeight = 37; //分页的高度 + 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 + }, + 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 => { + + }); + 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) + // }) + }, + 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); + + }, + showdaily(obj) { + this.clientHeight = document.documentElement.clientHeight - 84 - 110; + this.dialoglawViewVisible = false; + this.dialogDailyViewVisible = true; + this.infodaily(obj); + }, + info(obj) { + var that = this; + get(obj.id).then(res => { + let result = Object.assign(that.lawform, res); + that.lawform = result; + let _files = []; + for (var mod of result.files) { + let m = Object.assign({}, mod); + m.name = mod.original_name; + m.url = mod.url; + _files.push(m); + } + that.lawform.files = _files; + }).catch(error => { + //reject(error) + }); + }, + infodaily(obj) { + var that = this; + getdaily(obj.id).then(res => { + let result = Object.assign(that.lawform, res); + that.dailyform = result; + let _files = []; + for (var mod of result.files) { + let m = Object.assign({}, mod); + m.name = mod.original_name; + m.url = mod.url; + _files.push(m); + } + that.dailyform.files = _files; + }).catch(error => { + //reject(error) + }); + }, + + } + } -