日常监督新

This commit is contained in:
shijing 2023-05-31 17:20:38 +08:00
parent 1269e40a6f
commit 4363abf39c
17 changed files with 5006 additions and 3 deletions

View File

@ -118,3 +118,374 @@ export function deleteTaskdept(id) {
method: 'delete'
})
}
// 集团目标
export function getPgoalList(query) {
return request({
url: '/supervision/pgoal/',
method: 'get',
params: query
})
}
export function createPgoal(data) {
return request({
url: '/supervision/pgoal/',
method: 'post',
data
})
}
export function getPgoal(id) {
return request({
url: `/supervision/pgoal/${id}/`,
method: 'get'
})
}
export function updatePgoal(id, data) {
return request({
url: `/supervision/pgoal/${id}/`,
method: 'put',
data
})
}
export function deletePgoal(id) {
return request({
url: `/supervision/pgoal/${id}/`,
method: 'delete'
})
}
//部门目标
export function getPgoalDeptList(query) {
return request({
url: '/supervision/pgoaldept/',
method: 'get',
params: query
})
}
export function createPgoalDept(data) {
return request({
url: '/supervision/pgoaldept/',
method: 'post',
data
})
}
export function getPgoalDept(id) {
return request({
url: `/supervision/pgoaldept/${id}/`,
method: 'get'
})
}
export function updatePgoalDept(id, data) {
return request({
url: `/supervision/pgoaldept/${id}/`,
method: 'put',
data
})
}
export function deletePgoalDept(id) {
return request({
url: `/supervision/pgoaldept/${id}/`,
method: 'delete'
})
}
//任务
export function getTask2List(query) {
return request({
url: '/supervision/task2/',
method: 'get',
params: query
})
}
export function getTask2(id) {
return request({
url: `/supervision/task2/${id}/`,
method: 'get'
})
}
export function createTask2(data) {
return request({
url: '/supervision/task2/',
method: 'post',
data
})
}
export function addDeptsTask2(id,data) {
return request({
url: `/supervision/task2/${id}/add_depts/`,
method: 'post',
data
})
}
export function updateTask2(id, data) {
return request({
url: `/supervision/task2/${id}/`,
method: 'put',
data
})
}
export function startTask2(id) {
return request({
url: `/supervision/task2/${id}/start/`,
method: 'put'
})
}
export function closeTask2(id) {
return request({
url: `/supervision/task2/${id}/close/`,
method: 'put'
})
}
export function deleteTask2(id, data) {
return request({
url: `/supervision/task2/${id}/`,
method: 'delete',
data
})
}
//获取该任务下的执行组织
export function getTask2Do(query) {
return request({
url: '/supervision/task2do/',
method: 'get',
params: query
})
}
//我的任务
export function getMyTask2Do(query) {
return request({
url: '/supervision/task2do/my/',
method: 'get',
params: query
})
}
//pt
export function getPtList(query) {
return request({
url: '/supervision/pt/',
method: 'get',
params: query
})
}
export function createPt(data) {
return request({
url: '/supervision/pt/',
method: 'post',
data
})
}
export function getPt(id) {
return request({
url: `/supervision/pt/${id}/`,
method: 'get'
})
}
export function updatePt(id, data) {
return request({
url: `/supervision/pt/${id}/`,
method: 'put',
data
})
}
export function deletePt(id) {
return request({
url: `/supervision/pt/${id}/`,
method: 'delete'
})
}
export function impPt(data) {
return request({
url: '/supervision/pt/imp/',
method: 'post',
data
})
}
//rc
export function getRcList(query) {
return request({
url: '/supervision/rc/',
method: 'get',
params: query
})
}
export function createRc(data) {
return request({
url: '/supervision/rc/',
method: 'post',
data
})
}
export function getRc(id) {
return request({
url: `/supervision/rc/${id}/`,
method: 'get'
})
}
export function updateRc(id, data) {
return request({
url: `/supervision/rc/${id}/`,
method: 'put',
data
})
}
export function deleteRc(id) {
return request({
url: `/supervision/rc/${id}/`,
method: 'delete'
})
}
export function impRc(data) {
return request({
url: '/supervision/rc/imp_error/',
method: 'post',
data
})
}
export function impOverdue(data) {
return request({
url: '/supervision/rc/imp_overdue/',
method: 'post',
data
})
}
///Risk
export function getRiskList(query) {
return request({
url: '/supervision/risk/',
method: 'get',
params: query
})
}
export function createRisk(data) {
return request({
url: '/supervision/risk/',
method: 'post',
data
})
}
export function getRisk(id) {
return request({
url: `/supervision/risk/${id}/`,
method: 'get'
})
}
export function updateRisk(id, data) {
return request({
url: `/supervision/risk/${id}/`,
method: 'put',
data
})
}
export function deleteRisk(id) {
return request({
url: `/supervision/risk/${id}/`,
method: 'delete'
})
}
export function impRisk(data) {
return request({
url: '/supervision/risk/imp/',
method: 'post',
data
})
}
///Complaint
export function getComplaintList(query) {
return request({
url: '/supervision/complaint/',
method: 'get',
params: query
})
}
export function createComplaint(data) {
return request({
url: '/supervision/complaint/',
method: 'post',
data
})
}
export function getComplaint(id) {
return request({
url: `/supervision/complaint/${id}/`,
method: 'get'
})
}
export function updateComplaint(id, data) {
return request({
url: `/supervision/complaint/${id}/`,
method: 'put',
data
})
}
export function deleteComplaint(id) {
return request({
url: `/supervision/complaint/${id}/`,
method: 'delete'
})
}
export function impComplaint(data) {
return request({
url: '/supervision/complaint/imp/',
method: 'post',
data
})
}
//Oinspect
export function getOinspectList(query) {
return request({
url: '/supervision/oinspect/',
method: 'get',
params: query
})
}
export function createOinspect(data) {
return request({
url: '/supervision/oinspect/',
method: 'post',
data
})
}
export function getOinspect(id) {
return request({
url: `/supervision/oinspect/${id}/`,
method: 'get'
})
}
export function updateOinspect(id, data) {
return request({
url: `/supervision/oinspect/${id}/`,
method: 'put',
data
})
}
export function deleteOinspect(id) {
return request({
url: `/supervision/oinspect/${id}/`,
method: 'delete'
})
}
export function impOinspect(data) {
return request({
url: '/supervision/oinspect/imp/',
method: 'post',
data
})
}
//supervision/task2do/save_num/
export function saveNum(id,data) {
return request({
url: `/supervision/task2do/${id}/save_num/`,
method: 'put',
data
})
}
export function noNum(id,data) {
return request({
url: `/supervision/task2do/${id}/no_record/`,
method: 'put',
data
})
}

View File

@ -35,7 +35,7 @@ export default {
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50]
return [10, 20, 30, 50,100,200]
}
},
layout: {

View File

@ -10,7 +10,8 @@ import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import Print from '@/utils/print'
Vue.use(Print)
import '@/icons' // icon
import '@/permission' // permission control
/**

View File

@ -239,7 +239,55 @@ 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: '部门报告'},
hidden: true
},
{
path: 'mytaskDo',
name: 'mytaskDo',
component: () => import('@/views/supervisionNew/mytaskDo.vue'),
meta: { title: '我的任务执行'},
hidden: true
},
{
path: 'task2do/:id',
name: 'Task2do',
component: () => import('@/views/supervisionNew/taskdo.vue'),
meta: { title: '报送任务执行', perms: ['task2do'] },
hidden: true
},
]
},
{
path: '/qualityinspect',
component: Layout,

172
client/src/utils/print.js Normal file
View File

@ -0,0 +1,172 @@
// 打印类属性、方法定义
/* eslint-disable */
import Vue from 'vue'
const Print = function (dom, options) {
if (!(this instanceof Print)) return new Print(dom, options);
this.options = this.extend({
'noPrint': '.no-print'
}, options);
if ((typeof dom) === "string") {
this.dom = document.querySelector(dom);
} else {
this.isDOM(dom)
this.dom = this.isDOM(dom) ? dom : dom.$el;
}
this.init();
};
Print.prototype = {
init: function () {
var content = this.getStyle() + this.getHtml();
this.writeIframe(content);
},
extend: function (obj, obj2) {
for (var k in obj2) {
obj[k] = obj2[k];
}
return obj;
},
getStyle: function () {
var str = "",
styles = document.querySelectorAll('style,link');
for (var i = 0; i < styles.length; i++) {
str += styles[i].outerHTML;
}
str += "<style>" + (this.options.noPrint ? this.options.noPrint : '.no-print') + "{display:none;}</style>";
// 去除height100%样式,解决分页下,样式混乱问题
str += "<style>html,body,div{height: auto!important;}</style>";
return str;
},
getHtml: function () {
var inputs = document.querySelectorAll('input');
var textareas = document.querySelectorAll('textarea');
var selects = document.querySelectorAll('select');
var canvass = document.querySelectorAll('canvas');
for (var k = 0; k < inputs.length; k++) {
if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
if (inputs[k].checked == true) {
inputs[k].setAttribute('checked', "checked")
} else {
inputs[k].removeAttribute('checked')
}
} else if (inputs[k].type == "text") {
inputs[k].setAttribute('value', inputs[k].value)
} else {
inputs[k].setAttribute('value', inputs[k].value)
}
}
for (var k2 = 0; k2 < textareas.length; k2++) {
if (textareas[k2].type == 'textarea') {
textareas[k2].innerHTML = textareas[k2].value
}
}
for (var k3 = 0; k3 < selects.length; k3++) {
if (selects[k3].type == 'select-one') {
var child = selects[k3].children;
for (var i in child) {
if (child[i].tagName == 'OPTION') {
if (child[i].selected == true) {
child[i].setAttribute('selected', "selected")
} else {
child[i].removeAttribute('selected')
}
}
}
}
}
//canvass echars图表转为图片
for (var k4 = 0; k4 < canvass.length; k4++) {
var imageURL = canvass[k4].toDataURL("image/png");
var img = document.createElement("img");
img.src = imageURL;
img.setAttribute('style', 'max-width: 100%;');
img.className = 'isNeedRemove'
// canvass[k4].style.display = 'none'
// canvass[k4].parentNode.style.width = '100%'
// canvass[k4].parentNode.style.textAlign = 'center'
canvass[k4].parentNode.insertBefore(img,canvass[k4].nextElementSibling);
}
// 包裹要打印的元素
// fix: https://github.com/xyl66/vuePlugs_printjs/issues/36
// return this.wrapperRefDom(this.dom).outerHTML;
return this.dom.outerHTML;
},
// 向父级元素循环,包裹当前需要打印的元素
// 防止根级别开头的 css 选择器不生效
wrapperRefDom: function (refDom) {
let prevDom = null
let currDom = refDom
while (currDom && currDom.tagName.toLowerCase() !== 'body') {
if (prevDom) {
let element = currDom.cloneNode(false)
element.appendChild(prevDom)
prevDom = element
} else {
prevDom = currDom.cloneNode(true)
}
currDom = currDom.parentElement
}
return currDom.tagName.toLowerCase() === 'body' ? currDom : prevDom
},
writeIframe: function (content) {
var w, doc, iframe = document.createElement('iframe'),
f = document.body.appendChild(iframe);
iframe.id = "myIframe";
//iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');
w = f.contentWindow || f.contentDocument;
doc = f.contentDocument || f.contentWindow.document;
doc.open();
doc.write(content);
doc.close();
var _this = this
iframe.onload = function(){
_this.toPrint(w);
setTimeout(function () {
document.body.removeChild(iframe)
}, 100)
}
},
toPrint: function (frameWindow) {
try {
setTimeout(function () {
frameWindow.focus();
try {
if (!frameWindow.document.execCommand('print', false, null)) {
frameWindow.print();
}
} catch (e) {
frameWindow.print();
}
frameWindow.close();
}, 10);
} catch (err) {
console.log('err', err);
}
},
isDOM: (typeof HTMLElement === 'object') ?
function (obj) {
return obj instanceof HTMLElement;
} :
function (obj) {
return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';
}
};
export default (app) => {
Vue.prototype.$PRINT = Print;
}

View File

@ -0,0 +1,372 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>创建目标</el-button>
</div>
</el-card>
<el-card style="margin-top: 10px">
<el-table
v-loading="listLoading"
:data="dataList.results"
border
fit
stripe
highlight-current-row
max-height="600"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="year"></el-table-column>
<el-table-column label="重大质量事故(件)" prop="pgoal_1"></el-table-column>
<el-table-column label="报告/证书合格率(%)" prop="pgoal_2"></el-table-column>
<el-table-column label="报告/证书及时率(%)" prop="pgoal_3"></el-table-column>
<el-table-column label="能力验证满意率(%)" prop="pgoal_4"></el-table-column>
<el-table-column label="客户投诉处理满意率(%)" prop="pgoal_5"></el-table-column>
<el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['task2do'])"
@click="handleEdit(scope)"
>编辑</el-link>
<el-link
v-if="checkPermission(['task2do'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="dataList.count > 0"
:total="dataList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-card>
<el-dialog
:visible.sync="dialogVisible"
:title="dialogType === 'edit' ? '编辑目标' : '新增目标'"
>
<el-form
ref="Form"
:model="form"
label-width="160px"
label-position="right"
:rules="rule1"
>
<el-form-item label="年份" prop="year">
<el-date-picker
v-model="form.year"
type="year"
placeholder="选择年"
value-format="yyyy"
style="width:90%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="重大质量事故" prop="pgoal_1">
<el-input v-model="form.pgoal_1" type="number" style="width:90%"/>
<span></span>
</el-form-item>
<el-form-item label="模板文件" prop="template" v-if="dialogVisible">
<el-upload
ref="upload1"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess1"
:on-remove="handleRemove1"
:headers="upHeaders"
:file-list="fileList1"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</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="template" v-if="dialogVisible">
<el-upload
ref="upload1"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess2"
:on-remove="handleRemove2"
:headers="upHeaders"
:file-list="fileList2"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</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-upload
ref="upload1"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess3"
:on-remove="handleRemove3"
:headers="upHeaders"
:file-list="fileList3"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</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-upload
ref="upload1"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess4"
:on-remove="handleRemove4"
:headers="upHeaders"
:file-list="fileList4"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</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-upload
ref="upload1"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess5"
:on-remove="handleRemove5"
:headers="upHeaders"
:file-list="fileList5"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getPgoalList,createPgoal,updatePgoal,deletePgoal } from "@/api/task";
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination";
import { upUrl, upHeaders } from "@/api/file";
const defaultForm = {
year: "",
pgoal_1: null,
pgoal_2: null,
pgoal_3: null,
pgoal_4: null,
pgoal_5: null,
pgoal_1_file: null,
pgoal_2_file: null,
pgoal_3_file: null,
pgoal_4_file: null,
pgoal_4_file: null,
};
export default {
components:{Pagination},
data(){
return{
upHeaders: upHeaders(),
upUrl: upUrl(),
fileList1:[],
fileList2:[],
fileList3:[],
fileList4:[],
fileList5:[],
dialogType:"new",
form: defaultForm,
listLoading:false,
dialogVisible:false,
dataList:{
results:[],
count:0,
},
listQuery:{
page: 1,
search:'',
page_size: 20,
},
rule1: {
year: [{ required: true, message: "请选择", trigger: "blur" }],
pgoal_1: [{ required: true, message: "请填写", trigger: "blur" }],
pgoal_2: [{ required: true, message: "请填写", trigger: "blur" }],
pgoal_3: [{ required: true, message: "请填写", trigger: "blur" }],
pgoal_4: [{ required: true, message: "请填写", trigger: "blur" }],
pgoal_5: [{ required: true, message: "请填写", trigger: "blur" }],
},
};
},
mounted(){
this.getList();
},
methods:{
handlePreview(file) {
if ("url" in file) {
window.open(file.url);
} else {
window.open(file.response.data.path);
}
},
handleUpSuccess1(res, file, filelist) {
this.form.pgoal_1_file = res.data.id;
debugger;
console.log(this.form)
},
handleUpSuccess2(res, file, filelist) {
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){
this.form.pgoal_1_file = null;
},
handleRemove2(file, filelist){
this.form.pgoal_2_file = null;
},
handleRemove3(file, filelist){
this.form.pgoal_3_file = null;
},
handleRemove4(file, filelist){
this.form.pgoal_4_file = null;
},
handleRemove5(file, filelist){
this.form.pgoal_5_file = null;
},
checkPermission,
getList(){
this.listLoading = true;
getPgoalList(this.listQuery).then((response) => {
if (response.data) {
this.dataList = response.data;
}
this.listLoading = false;
});
},
handleCreate() {
this.form = Object.assign({}, defaultForm);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.form = Object.assign({}, scope.row); // copy obj
this.form.year = ''+this.form.year;
this.fileList1=[{
name:this.form.pgoal_1_file_.name,
url: this.form.pgoal_1_file_.path,
}];
this.fileList2=[{
name:this.form.pgoal_2_file_.name,
url: this.form.pgoal_2_file_.path,
}];
this.fileList3=[{
name:this.form.pgoal_3_file_.name,
url: this.form.pgoal_3_file_.path,
}];
this.fileList4=[{
name:this.form.pgoal_4_file_.name,
url: this.form.pgoal_4_file_.path,
}];
this.fileList5=[{
name:this.form.pgoal_5_file_.name,
url: this.form.pgoal_5_file_.path,
}];
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?该操作将删除该任务所有报送记录!", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
}).then(async () => {
await deletePgoal(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
confirm(form) {
debugger;
console.log(this.form)
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updatePgoal(this.task.id, this.form).then((res) => {
if (res.code >= 200) {
debugger;
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
createPgoal(this.form).then((res) => {
if (res.code >= 200) {
debugger;
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
} else {
return false;
}
});
},
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,136 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-date-picker
v-model="listQuery.search"
type="year"
placeholder="选择年"
value-format="yyyy"
style="width:300px"
>
</el-date-picker>
<!-- <el-select
v-model="listQuery.cycle"
placeholder="类型"
clearable
style="width: 300px"
@change="handleFilter"
>
<el-option label="目标定制" value="10"/>
<el-option label="日常监督" value="20"/>
</el-select> -->
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button>
</div>
</el-card>
<el-card style="margin-top: 10px">
<el-table
v-loading="listLoading"
:data="dataList.results"
border
fit
stripe
highlight-current-row
max-height="600"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="year"></el-table-column>
<el-table-column label="重大质量事故(件)" prop="pgoal_1">
<template slot-scope="scope">
基础:{{ scope.row.goal_value_a }}目标:{{ scope.row.goal_value_b }}
</template>
</el-table-column>
<el-table-column label="报告/证书合格率(%)" prop="pgoal_2"></el-table-column>
<el-table-column label="报告/证书及时率(%)" prop="pgoal_3"></el-table-column>
<el-table-column label="能力验证满意率(%)" prop="pgoal_4"></el-table-column>
<el-table-column label="客户投诉处理满意率(%)" prop="pgoal_5"></el-table-column>
<!-- <el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['task2do'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
</template>
</el-table-column> -->
</el-table>
<pagination
v-show="dataList.count > 0"
:total="dataList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-card>
</div>
</template>
<script>
import { getPgoalDeptList } from "@/api/task";
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination";
import { upUrl, upHeaders } from "@/api/file";
export default {
components:{Pagination},
data(){
return{
dataList:{
results:[],
count:0,
},
listQuery:{
page: 1,
search:'',
cycle:10,
page_size: 20,
},
};
},
mounted(){
this.getList();
},
methods:{
checkPermission,
getList(){
let that = this;
that.listLoading = true;
getPgoalDeptList(that.listQuery).then((response) => {
if (response.data) {
that.dataList = response.data;
}
that.listLoading = false;
});
},
resetFilter(){
this.listQuery.search = '';
this.getList();
},
handleFilter(){
this.getList();
},
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,148 @@
<template>
<div class="">
<el-dialog
:title="titleOption[type]"
:visible.sync="dialogVisible"
@closed="$emit('closed')"
>
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rules"
>
<el-form-item label="投诉人" >
<el-input v-model="form.complainant"></el-input>
</el-form-item>
<el-form-item label="投诉内容" >
<el-input v-model="form.content"></el-input>
</el-form-item>
<el-form-item label="投诉日期">
<el-date-picker
v-model="form.date_occurrence"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="反馈日期" >
<el-date-picker
v-model="form.date_feedback"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="是否满意" >
<el-switch
v-model="form.is_satisfied"
active-text="满意"
inactive-text="不满意">
</el-switch>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="isSaveing" @click="onSubmit('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createComplaint,updateComplaint} from "@/api/task";
export default {
emits: ["onSubmit", "onCancel"],
data() {
return {
form:{
complainant: "",
content: "",
date_occurrence:"",
date_feedback: "",
is_satisfied: true,
task2do: 0
},
titleOption: {
add: "新增客户投诉",
edit: "客户投诉编辑",
},
isSaveing:false,
dialogVisible:false,
rules: {
number: [{ required: true, message: "请填入" }],
vchannel: [{ required: true, message: "请选择视频" }],
},
}
},
methods: {
//显示
open(type = "add",task2do) {
this.type = type;
if(task2do){
this.form.task2do = task2do;
}
this.dialogVisible = true;
return this;
},
//表单注入数据
setData(data) {
Object.assign(this.form, data);
debugger;
console.log(this.form);
},
onSubmit() {
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
try {
var res;
if (this.type == "add") {
createComplaint(this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
} else if (this.type == "edit") {
createComplaint(this.form.id,this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
}
return res;
} catch (err) {
//可以处理校验错误
this.isSaveing = false;
return err;
}
}
});
},
onCancel() {
this.$emit("closed");
}
}
}
</script>
<style scoped>
.line{
text-align: center;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,158 @@
<template>
<div class="app-container">
<el-card>
日常监督填报
</el-card>
<el-row :gutter="10">
<el-col :span="12">
<el-card style="margin-top:6px">
已发放报告
<el-input></el-input>
</el-card>
</el-col>
<el-col :span="12">
<el-card style="margin-top:6px">
应发放报告
<el-input></el-input>
</el-card>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-card class="task task-item" shadow="hover" style="padding:10px;box-sizing: border-box;">
<div slot="header" style="display:flex">
<span class="cardTitle">不准确报告</span>
<el-button type="primary" icon="el-icon-plus" @click="addFiles()">添加</el-button>
</div>
<div slot="header" style="display: flex;justify-content: space-between;">
<!-- <div>
<span>总数</span>
<el-input style="width:100px;"> </el-input>
</div> -->
</div>
<el-table></el-table>
</el-card>
</el-col>
<el-col :span="8">
<el-card title="超期报告">
<div slot="header" class="clearfix">
<span>超期报告</span>
<el-input></el-input>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card title="能力验证结果">
<div slot="header" class="clearfix">
<span>能力验证结果</span>
<el-input></el-input>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card title="客户投诉">
<div slot="header" class="clearfix">
<span>客户投诉</span>
<el-input></el-input>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card title="风险识别">
<div slot="header" class="clearfix">
<span>风险识别</span>
<el-input></el-input>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card title="外部监督检查">
<div slot="header" class="clearfix">
<span>外部监督检查</span>
<el-input></el-input>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {
getmytasklist,
} from "@/api/task";
import { getOrgList, getSubOrgList } from "@/api/org";
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import mytaskrecord from "@/views/supervision/mytaskrecord";
export default {
components: { Pagination, mytaskrecord },
data() {
return {
taskList: [],
listQuery: {
page: 1,
page_size: 20,
},
form:{
},
listLoading: true,
query:null,
orgData: [],
};
},
computed: {},
watch: {},
created() {
this.getList();
this.getOrgList();
},
methods: {
checkPermission,
getList() {
this.listLoading = true;
getmytasklist(this.listQuery).then((response) => {
if (response.data) {
this.taskList = response.data;
}
this.listLoading = false;
});
},
getOrgList() {
if (this.checkPermission(["record_confirm"])) {
getOrgList({ can_supervision: true }).then((res) => {
this.orgData = res.data;
});
} else {
getSubOrgList().then((res) => {
this.orgData = res.data;
});
}
},
clickRow(obj){
this.query = {
dept:obj.dept,
task:obj.task
}
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
handleDo(val){
this.getList()
}
},
};
</script>
<style scoped>
.cardTitle{
display: inline-block;
font-size: 18px;
font-weight: 600;
}
</style>

View File

@ -0,0 +1,149 @@
<template>
<div class="">
<el-dialog
:title="titleOption[type]"
:visible.sync="dialogVisible"
@closed="$emit('closed')"
>
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rules"
>
<el-form-item label="检查分类" >
<el-select
v-model="form.cate"
placeholder="检查分类"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.key"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="检查方" >
<el-input v-model="form.checker"></el-input>
</el-form-item>
<el-form-item label="检查日期" >
<el-date-picker
v-model="form.date_inspect"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="检查结果" >
<el-input v-model="form.result"></el-input>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="isSaveing" @click="onSubmit('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createOinspect,updateOinspect} from "@/api/task";
export default {
emits: ["onSubmit", "onCancel"],
data() {
return {
form:{
checker: "",
result: "",
date_inspect: "",
cate: 10,
task2do: 0
},
titleOption: {
add: "新增外部监督检查",
edit: "外部监督检查编辑",
},
isSaveing:false,
dialogVisible:false,
rules: {
number: [{ required: true, message: "请填入" }],
vchannel: [{ required: true, message: "请选择视频" }],
},
options:[
{key:'市场监管部门检查',value:10},
{key:'行业主管部门检查',value:20},
{key:'其他检查',value:30}
],
}
},
methods: {
//显示
open(type = "add",task2do) {
this.type = type;
if(task2do){
this.form.task2do = task2do;
}
this.dialogVisible = true;
return this;
},
//表单注入数据
setData(data) {
Object.assign(this.form, data);
debugger;
console.log(this.form);
},
onSubmit() {
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
try {
var res;
if (this.type == "add") {
createOinspect(this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
} else if (this.type == "edit") {
updateOinspect(this.form.id,this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
}
return res;
} catch (err) {
//可以处理校验错误
this.isSaveing = false;
return err;
}
}
});
},
onCancel() {
this.$emit("closed");
}
}
}
</script>
<style scoped>
.line{
text-align: center;
}
</style>

View File

@ -0,0 +1,171 @@
<template>
<div class="">
<el-dialog
:title="titleOption[type]"
:visible.sync="dialogVisible"
@closed="$emit('closed')"
>
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rules"
>
<el-form-item label="名称" >
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="编号" >
<el-input v-model="form.number"></el-input>
</el-form-item>
<el-form-item label="组织方" >
<el-input v-model="form.organizer"></el-input>
</el-form-item>
<el-form-item label="参加参数名称" >
<el-input v-model="form.params"></el-input>
</el-form-item>
<el-form-item label="结果" >
<el-select
v-model="form.result"
placeholder="结果"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.key"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="处理结果" >
<el-select
v-model="form.result"
placeholder="处理结果"
>
<el-option
v-for="item in handleOptions"
:key="item.value"
:label="item.key"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="isSaveing" @click="onSubmit('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createPt,updatePt} from "@/api/task";
import { options } from "runjs";
export default {
emits: ["onSubmit", "onCancel"],
data() {
return {
form:{
name: "",
number: "",
organizer: "",
params: "",
result: 10,
handle_result:10,
task2do: 0
},
titleOption: {
add: "新增能力验证结果",
edit: "能力验证结果编辑",
},
options:[
{key:'满意',value:10},
{key:'有问题',value:20},
{key:'不满意',value:30}
],
handleOptions:[
{key:'/',value:0},
{key:'已整改',value:10},
{key:'被暂停',value:20},
{key:'已被撤销认可资格',value:30}
],
isSaveing:false,
dialogVisible:false,
rules: {
number: [{ required: true, message: "请填入" }],
vchannel: [{ required: true, message: "请选择视频" }],
},
}
},
methods: {
//显示
open(type = "add",task2do) {
// debugger;
this.type = type;
if(task2do){
this.form.task2do = task2do;
}
this.dialogVisible = true;
return this;
},
//表单注入数据
setData(data) {
Object.assign(this.form, data);
debugger;
console.log(this.form);
},
onSubmit() {
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
try {
var res;
if (this.type == "add") {
createPt(this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
debugger;
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
} else if (this.type == "edit") {
updatePt(this.form.id,this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
debugger;
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
}
return res;
} catch (err) {
//可以处理校验错误
this.isSaveing = false;
return err;
}
}
});
},
onCancel() {
this.$emit("closed");
}
}
}
</script>
<style scoped>
.line{
text-align: center;
}
</style>

View File

@ -0,0 +1,198 @@
<template>
<div class="">
<el-dialog
:title="titleOption[type]"
:visible.sync="dialogVisible"
@closed="$emit('closed')"
>
<el-form
ref="dialogForm"
:model="form"
label-width="120px"
label-position="right"
:rules="rules"
>
<el-form-item label="报告证书编号" >
<el-input v-model="form.number"></el-input>
</el-form-item>
<el-form-item label="业务受理日期" v-if="type=='add2'||type=='edit2'">
<el-date-picker
v-model="form.date_accept"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更改后证书编号" v-else>
<el-input v-model="form.number_correct"></el-input>
</el-form-item>
<el-form-item label="预计发放日期" v-if="type=='add2'||type=='edit2'">
<el-date-picker
v-model="form.date_expect"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="出错原因" v-else>
<el-input v-model="form.reason_error"></el-input>
</el-form-item>
<el-form-item label="实际发放日期" v-if="type=='add2'||type=='edit2'">
<el-date-picker
v-model="form.date_issue"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="发放日期" v-else>
<el-date-picker
v-model="form.date_issue"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:50%"
>
</el-date-picker>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="isSaveing" @click="onSubmit('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createRc,updateRc} from "@/api/task";
export default {
emits: ["onSubmit", "onCancel"],
data() {
return {
form:{
number: "",
date_issue: null,
reason_error: "",
date_expect: null,
date_accept: null,
number_correct: "",
etype: 10,
task2do: 0
},
titleOption: {
add: "新增不准确报告",
edit: "不准确报告编辑",
add2: "新增超期报告",
edit2: "超期报告编辑",
},
type:10,
isSaveing:false,
dialogVisible:false,
rules: {
number: [{ required: true, message: "请填入" }],
vchannel: [{ required: true, message: "请选择视频" }],
},
}
},
methods: {
//显示
open(type = "add",task2do) {
this.type = type;
if(task2do){
this.form.task2do = task2do;
}
this.dialogVisible = true;
return this;
},
//表单注入数据
setData(data) {
Object.assign(this.form, data);
debugger;
console.log(this.form);
},
onSubmit() {
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
try {
var res;
if (this.type == "add") {
this.form.etype=10;
createRc(this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
debugger;
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
} else if (this.type == "edit") {
this.form.etype=10;
updateRc(this.form.id,this.form).then(res=>{
debugger;
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
}else if (this.type == "add2") {
this.form.etype=20;
createRc(this.form).then(res=>{
debugger;
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
}else if (this.type == "edit2") {
this.form.etype=20;
updateRc(this.form.id,this.form).then(res=>{
debugger;
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success");
}else{
this.$message.warning(res.data.msg);
}
})
}
//return res;
} catch (err) {
//可以处理校验错误
this.isSaveing = false;
return err;
}
}
});
},
onCancel() {
this.$emit("closed");
}
}
}
</script>
<style scoped>
.line{
text-align: center;
}
</style>

View File

@ -0,0 +1,158 @@
<template>
<div class="">
<el-dialog
:title="titleOption[type]"
:visible.sync="dialogVisible"
@closed="$emit('closed')"
>
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rules"
>
<el-form-item label="内容" >
<el-input v-model="form.content"></el-input>
</el-form-item>
<el-form-item label="风险等级" >
<el-select
v-model="form.level"
placeholder="风险等级"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.key"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="风险代码" >
<el-input v-model="form.code"></el-input>
</el-form-item>
<el-form-item label="整改状态" >
<el-select
v-model="form.state"
placeholder="整改状态"
>
<el-option
v-for="item in stateOptions"
:key="item.value"
:label="item.key"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :loading="isSaveing" @click="onSubmit('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createRisk,updateRisk} from "@/api/task";
export default {
emits: ["onSubmit", "onCancel"],
data() {
return {
form:{
content: "",
code: "",
level: 10,
state: 10,
task2do: 0
},
titleOption: {
add: "新增风险",
edit: "风险编辑",
},
isSaveing:false,
dialogVisible:false,
rules: {
number: [{ required: true, message: "请填入" }],
vchannel: [{ required: true, message: "请选择视频" }],
},
options:[
{key:'主要风险',value:10},
{key:'严重风险',value:20},
{key:'重大风险',value:30}
],
stateOptions:[
{key:'未整改',value:10},
{key:'整改中',value:20},
{key:'整改完成',value:30}
],
}
},
methods: {
//显示
open(type = "add",task2do) {
this.type = type;
if(task2do){
this.form.task2do = task2do;
}
this.dialogVisible = true;
return this;
},
//表单注入数据
setData(data) {
Object.assign(this.form, data);
debugger;
console.log(this.form);
},
onSubmit() {
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
try {
var res;
if (this.type == "add") {
createRisk(this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
} else if (this.type == "edit") {
updateRisk(this.form.id,this.form).then(res=>{
this.isSaveing = false;
if(res.code>=200){
this.dialogVisible = false;
this.$emit("success",this.type);
}else{
this.$message.warning(res.data.msg);
}
})
}
return res;
} catch (err) {
//可以处理校验错误
this.isSaveing = false;
return err;
}
}
});
},
onCancel() {
this.$emit("closed");
}
}
}
</script>
<style scoped>
.line{
text-align: center;
}
</style>

View File

@ -0,0 +1,718 @@
<template>
<div class="app-container">
<el-card>
<el-row :gutter="6">
<el-select
v-model="listQuery.dept"
placeholder="报送部门"
clearable
@change="handleFilter"
>
<el-option
v-for="item in orgData"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="listQuery.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">
<el-table
ref="tableRef"
:data="tableData"
class="tableStyle"
:header-cell-style="handerMethod"
:span-method="objectSpanMethod"
border
>
<el-table-column label="统计周期" width="180" prop="type"></el-table-column>
<el-table-column label="统计周期" width="180" prop="title"></el-table-column>
<el-table-column prop="first" label="1-2月"></el-table-column>
<el-table-column prop="seconde" label="3-4月"></el-table-column>
<el-table-column prop="third" label="5-6月"></el-table-column>
<el-table-column prop="fouth" label="7-8月"></el-table-column>
<el-table-column prop="fifth" label="9-10月"></el-table-column>
<el-table-column prop="sixth" label="11-12月"></el-table-column>
<el-table-column prop="all" label="年度"></el-table-column>
</el-table>
<!-- <table border="1" width="1000" cellspacing="0">
<thead >
<tr>
<th colspan="2">统计周期</th>
<th>1-2</th>
<th>3-4</th>
<th>5-6</th>
<th>7-8</th>
<th>9-10</th>
<th>11-12</th>
<th>年度</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">重大质量事故</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td rowspan="3">报告/证书合格率</td>
<td>已发放报告/证书数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>不准确报告/证书数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>报告/证书合格率</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td rowspan="3">报告/证书及时率</td>
<td>应发报告/证书数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>实际按时完成报告/证书数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>报告/证书及时率</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td rowspan="3">能力验证满意率</td>
<td>全部获结果参数数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>满意结果参数数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>能力验证满意率</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td rowspan="3">客户投诉处理满意率</td>
<td>全部已处理投诉数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>获满意结果的投诉数量</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>客户投诉处理满意率</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</tbody>
</table> -->
<el-row>
<el-col :span="12">
<div id="bar1" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
<el-col :span="12">
<div id="bar2" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
<el-col :span="12">
<div id="lin1" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
<el-col :span="12">
<div id="lin2" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
<el-col :span="12">
<div id="lin3" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
<el-col :span="12">
<div id="lin4" style="width:500px;height:400px;margin-top: 50px;"></div>
</el-col>
</el-row>
</div>
</el-card>
</div>
</template>
<script>
import { getOrgList, getSubOrgList } from "@/api/org";
import checkPermission from "@/utils/permission";
import * as echarts from 'echarts'
export default {
data() {
return {
listQuery:{
dept:'',
year:''
},
tableData: [{
type:'重大质量事故',
title:'重大质量事故',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'报告/证书合格率',
title:'已发放报告/证书数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'报告/证书合格率',
title:'不准确报告/证书数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
}, {
type:'报告/证书合格率',
title:'报告/证书合格率',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
}, {
type:'报告/证书及时率',
title:'应发报告/证书数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'报告/证书及时率',
title:'实际按时完成报告/证书数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
}, {
type:'报告/证书及时率',
title:'报告/证书及时率',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},
{
type:'能力验证满意率',
title:'全部获结果参数数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'能力验证满意率',
title:'满意结果参数数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
}, {
type:'能力验证满意率',
title:'能力验证满意率',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'客户投诉处理满意率',
title:'全部已处理投诉数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},{
type:'客户投诉处理满意率',
title:'获满意结果的投诉数量',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
}, {
type:'客户投诉处理满意率',
title:'客户投诉处理满意率',
first:'1',
seconde:'2',
third:'3',
fouth:'4',
fifth:'5',
sixth:'6',
all:'21'
},
],
orgData:[],
barChart1:null,
barchart2:null,
lineChart1:null,
lineChart2:null,
lineChart3:null,
lineChart4:null,
xAxisData:["1-2月","3-4月","5-6月","7-8月","9-10月","11-12月"],
};
},
mounted() {
this.getGroup();
this.getBarChart1();
this.getBarChart2();
this.getLineChart1();
this.getLineChart2();
this.getLineChart3();
this.getLineChart4();
},
methods: {
handlePrint() {
this.$PRINT('#myReport');
},
getBarChart1(){
let chartDom = document.getElementById('bar1');
this.barChart1 = echarts.init(chartDom);
let option = {
title:{
text:"已发放报告/证书数量"
},
xAxis:{
axisTick: {
show: false
},
data:this.xAxisData
},
yAxis:{},
series:[
{
name:"已发放报告/证书数量",
type:"bar",
data:[8,10,4,5,4,8]
}
]
}
this.barChart1.setOption(option);
},
getBarChart2(){
let chartDom = document.getElementById('bar2');
this.barChart2 = echarts.init(chartDom);
let option = {
title:{
text:"已发放报告/证书数量"
},
xAxis:{
axisTick: {
show: false
},
data:this.xAxisData
},
yAxis:{},
series:[
{
name:"已发放报告/证书数量",
type:"bar",
data:[8,10,4,5,4,8]
}
]
}
this.barChart2.setOption(option);
},
getLineChart1(){
let chartDom = document.getElementById('lin1');
this.lineChart1 = echarts.init(chartDom);
let option = {
title: {
text: '报告/证书合格率'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['报告/证书合格率']
},
grid: {
left: '3%',
right: '4%',
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: [80, 99, 80, 96, 95, 97, 99]
}
]
};
this.lineChart1.setOption(option);
},
getLineChart2(){
let chartDom = document.getElementById('lin2');
this.lineChart2 = echarts.init(chartDom);
let option = {
title: {
text: '报告/证书合格率'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['报告/证书合格率']
},
grid: {
left: '3%',
right: '4%',
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: [100, 99, 80, 96, 95, 97, 99]
}
]
};
this.lineChart2.setOption(option);
},
getLineChart3(){
let chartDom = document.getElementById('lin3');
this.lineChart3 = echarts.init(chartDom);
let option = {
title: {
text: '报告/证书合格率'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['报告/证书合格率']
},
grid: {
left: '3%',
right: '4%',
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: [97, 99, 98.8, 98.9, 99, 99.9, 96]
}
]
};
this.lineChart3.setOption(option);
},
getLineChart4(){
let chartDom = document.getElementById('lin4');
this.lineChart4 = echarts.init(chartDom);
let option = {
title: {
text: '报告/证书合格率'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['报告/证书合格率']
},
grid: {
left: '3%',
right: '4%',
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:[89, 99, 92, 96, 95, 97, 99]
}
]
};
this.lineChart4.setOption(option);
},
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;
});
}
},
//合并单位表头
handerMethod ({ row, column, rowIndex, columnIndex }) {
if (row[0].level == 1) {
//这里有个非常坑的bug 必须是row[0]=0 row[1]=2才会生效
row[0].colSpan = 0
row[1].colSpan = 2
if (columnIndex === 0) {
return { display: 'none' }
}
}
},
handleFilter(){},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(row, column, rowIndex, columnIndex)
if (rowIndex==0) {
if(columnIndex==1){
return {
rowspan: 1,
colspan: 0,// 如果相等则将colspan设置为0
};
}else if(columnIndex==0){
return {
rowspan: 1,
colspan: 2,
};
}else{
return {
rowspan: 1,
colspan: 1,
};
}
}else{
if(columnIndex==0){
if(rowIndex==1||rowIndex==4||rowIndex==7||rowIndex==10){
return {
rowspan: 3,
colspan: 1,
}
}else{
return {
rowspan:0,
colspan:1,
}
}
}else{
return {
rowspan:1,
colspan:1,
}
}
}
},
}
};
</script>
<style>
.printContainer{
width: 1075px;
}
</style>

View File

@ -0,0 +1,304 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-input
v-model="listQuery.search"
placeholder="请输入年份"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button>
</div>
<div style="margin-top: 10px">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>创建任务</el-button>
</div>
</el-card>
<el-card style="margin-top: 10px">
<el-table
v-loading="listLoading"
:data="taskList.results"
border
fit
stripe
highlight-current-row
max-height="600"
>
<el-table-column type="index" width="50" />
<el-table-column label="类型">
<template slot-scope="scope">{{ typeOptions[scope.row.type] }}</template>
</el-table-column>
<el-table-column label="年份" prop="year"></el-table-column>
<el-table-column label="周期">
<template slot-scope="scope" v-if="scope.row.state==20">{{ cycleList[scope.row.cycle] }}</template>
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.state=='10'" type="warning">创建中</el-tag>
<el-tag v-else-if="scope.row.state=='20'" type="primary">进行中</el-tag>
<el-tag v-else type="success">已关闭</el-tag>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link
type="primary"
v-if="checkPermission(['task2do'])"
@click="handleDo(scope)"
>执行</el-link>
<el-link
v-if="checkPermission(['task2do'])"
@click="handleEdit(scope)"
>编辑</el-link>
<el-link
v-if="checkPermission(['task2do'])"
@click="handleClose(scope)"
>关闭</el-link>
<el-link
v-if="checkPermission(['task2do'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="taskList.count > 0"
:total="taskList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-card>
<el-dialog
:visible.sync="dialogVisible"
:title="dialogType === 'edit' ? '编辑任务' : '新增任务'"
>
<el-form
ref="Form"
:model="task"
label-width="80px"
label-position="right"
:rules="rule1"
>
<el-form-item label="年份" prop="year">
<el-date-picker
v-model="task.year"
type="year"
placeholder="选择年"
value-format="yyyy"
style="width:50%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="类型">
<el-radio-group v-model="task.type">
<el-radio :label="10">目标制定</el-radio>
<el-radio :label="20">日常监督</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="周期" prop="cycle" v-if="task.type==20">
<el-select
v-model="task.cycle"
placeholder="周期"
clearable
style="width: 50%"
@change="handleFilter"
>
<el-option
v-for="item in cycleOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTask2List,createTask2,updateTask2,startTask2,closeTask2,deleteTask2 } from "@/api/task";
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination";
const defaulttask = {
year: "",
cycle: "",
type: 10,
};
export default {
components:{Pagination},
data(){
return{
dialogType:"new",
task: defaulttask,
listLoading:false,
dialogVisible:false,
taskList:{
results:[],
count:0,
},
listQuery:{
page: 1,
search:'',
page_size: 20,
},
typeOptions:{
10:"目标制定",
20:"日常监督"
},
cycleList:["","1-2月","3-4月","5-6月","7-8月","9-10月","11-12月"],
cycleOptions:[
// {id:0,name:""},
{id:1,name:"1-2月"},
{id:2,name:"3-4月"},
{id:3,name:"5-6月"},
{id:4,name:"7-8月"},
{id:5,name:"9-10月"},
{id:6,name:"11-12月"},
],
rule1: {
year: [{ required: true, message: "请选择", trigger: "blur" }],
cycle: [{ required: true, message: "请选择", trigger: "blur" }],
},
};
},
mounted(){
this.getList();
},
methods:{
checkPermission,
getList(){
this.listLoading = true;
getTask2List(this.listQuery).then((response) => {
if (response.data) {
this.taskList = response.data;
}
this.listLoading = false;
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
search:'',
page_size: 20,
}
this.getList();
},
handleCreate() {
this.task = Object.assign({}, defaulttask);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDo(scope) {
this.$router.push({name: "Task2do", params: { id: scope.row.id }, })
},
handleEdit(scope) {
this.task = Object.assign({}, scope.row); // copy obj
this.task.year = ''+this.task.year;
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleClose(scope) {
this.$confirm("确认关闭该任务吗?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}).then(async () => {
await closeTask2(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
handleDelete(scope) {
this.$confirm("确认删除?该操作将删除该任务所有报送记录!", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteTask2(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
confirm(form) {
debugger;
console.log(this.task)
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateTask2(this.task.id, this.task).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
if(this.task.type==10){
this.task.cycle = 0;
}
createTask2(this.task).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$router.push({name: "Task2do", params: { id: res.data.id }, })
this.$message.success("成功");
}
});
}
} else {
return false;
}
});
},
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,734 @@
<template>
<div class="app-container">
<!-- 任务详情 -->
<el-card>
<div slot="header" class="clearfix">
<span>任务详情</span>
</div>
<div style="margin-left: 10px; margin-right: 10px">
<el-row :gutter="20">
<el-col :span="8">
<div style="margin-bottom: 6px">
<span class="term">任务类型</span>
<span class="desc" v-if="task.type==10">目标制定</span>
<span class="desc" v-else>日常监督</span>
</div>
</el-col>
<el-col :span="8">
<div style="margin-bottom: 6px">
<span class="term">年份</span>
<span class="desc"> {{ task.year }}</span>
</div>
</el-col>
<el-col :span="8">
<div style="margin-bottom: 6px">
<span class="term">周期</span>
<span class="desc"> {{ cycleOptions[task.cycle] }}</span>
</div>
</el-col>
<el-col :span="8">
<div style="margin-bottom: 6px">
<span class="term">任务状态</span>
<span class="desc">
<el-tag
effect="plain"
v-if="task.state == 10"
type="warning"
>创建中
</el-tag>
<el-tag
effect="plain"
v-else-if="task.state == 20"
type="primary"
>执行中
</el-tag>
<el-tag effect="plain" v-else type="success">已关闭</el-tag>
</span>
</div>
</el-col>
<el-col :span="8">
<div style="margin-bottom: 6px">
<span class="term">创建人</span>
<span class="desc">{{ task.create_by_name }}</span>
</div>
</el-col>
<el-col :span="8">
<!-- 功能按钮 -->
<div style="margin-top: 4px">
<el-button
type="primary"
@click="startTask()"
v-if="task.state != 30"
size="small"
>发布任务</el-button>
<el-button
type="primary"
@click="append()"
v-if="task.state ==10 || task.state == 20"
size="small"
>添加执行部门</el-button>
</div>
</el-col>
</el-row>
</div>
</el-card>
<!-- 执行组织 -->
<el-card style="margin-top: 2px">
<div slot="header" class="clearfix">
<span>执行组织</span>
</div>
<el-table
v-loading="listLoading"
:data="taskdeptall"
border
fit
stripe
highlight-current-row
max-height="300px"
@row-click="clickRow"
>
<el-table-column label="序号" type="index" align="center" width="55" />
<el-table-column label="公司名称">
<template slot-scope="scope" v-if="scope.row.belong_dept_">
<span style="color:darkblue">{{scope.row.belong_dept_.type_name}}</span>-
{{scope.row.belong_dept_.name}}
</template>
</el-table-column>
<el-table-column label="是否完成">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="240px"
fixed="right"
>
<template slot-scope="scope">
<!-- <el-link
v-if="
scope.row.confirm_rate != 100 &&
checkPermission(['record_confirm'])
"
type="warning"
size="small"
@click="handleConfirmDept(scope)"
>确认</el-link
>
<el-link
v-if="
scope.row.confirm_rate == 100 &&
checkPermission(['task_update'])
"
type="primary"
size="small"
@click="handleConfirmFK(scope)"
>反馈</el-link
> -->
<el-link
v-if="
checkPermission(['task_update'])
"
type="danger"
size="small"
@click="handleDeleteDept(scope)"
>删除</el-link
>
</template>
</el-table-column>
</el-table>
<el-dialog
:visible.sync="dialogVisibles"
>
<el-form
ref="Forms"
:model="Taskdept"
label-width="80px"
label-position="right"
>
<el-form-item label="反馈文件" prop="template" v-if="dialogVisibles">
<el-upload
ref="upload"
:action="upUrl"
:on-preview="handlePreview"
:on-success="handleUpSuccess"
:on-remove="handleRemove"
:headers="upHeaders"
:file-list="fileList"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
<el-button type="primary" @click="confirmfk('Forms')">确认</el-button>
</div>
</el-dialog>
</el-card>
<!-- 执行详情 -->
<el-card style="margin-top: 2px" v-if="task.type==10">
<div slot="header" class="clearfix">
<span>执行详情</span>
</div>
<el-table
v-loading="listLoading2"
:data="recordList"
border
fit
stripe
highlight-current-row
max-height="400px"
style="margin-top:2px"
@selection-change="handleSelectRecords"
>
<el-table-column type="selection" align="center" width="55" />
<el-table-column label="序号" type="index" align="center" width="55" />
<el-table-column label="名称">
<template slot-scope="scope">{{ scope.row.goal_name }}</template>
</el-table-column>
<el-table-column label="基础值">
<template slot-scope="scope">{{ scope.row.goal_value_a }}</template>
</el-table-column>
<el-table-column label="目标值">
<template slot-scope="scope">{{ scope.row.goal_value_b }}</template>
</el-table-column>
<el-table-column label="文件">
<template slot-scope="scope" v-if="scope.row.goal_file_">
<el-link :href="scope.row.goal_file_.path" target="_blank" type="primary">
{{scope.row.goal_file_.name}}</el-link>
</template>
</el-table-column>
</el-table>
</el-card>
<div style="margin-top: 2px" v-else>
<el-card>
<div>
<span>执行详情</span>
</div>
<p><span style="margin-right: 50px;">应发报告{{ task2doItem.num_expect }} </span>已发报告{{ task2doItem.num_issue }}</p>
</el-card>
<el-row :gutter="5">
<el-col :span="12" style="margin-top: 5px;">
<el-card >
<div class="cardHead">
<span class="cardTitle">不准确报告</span>
</div>
<el-table
:data="rcList"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="50" />
<el-table-column label="报告证书编号" prop="number"></el-table-column>
<el-table-column label="更改后编号" prop="number_correct"></el-table-column>
<el-table-column label="出错原因" prop="reason_error"></el-table-column>
<el-table-column label="更改发放日期" prop="date_issue"></el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12" style="margin-top: 5px;">
<el-card>
<div class="cardHead">
<span class="cardTitle">超期报告</span>
</div>
<el-table
:data="rc2List"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="40" />
<el-table-column label="报告证书编号" prop="number"></el-table-column>
<el-table-column label="业务受理日期" prop="date_accept"></el-table-column>
<el-table-column label="预计发放日期" prop="date_expect"></el-table-column>
<el-table-column label="实际发放日期" prop="date_issue"></el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12" style="margin-top: 5px;">
<el-card>
<div class="cardHead">
<span class="cardTitle">能力验证结果</span>
</div>
<el-table
:data="ptList"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="40" />
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="编号" prop="number"></el-table-column>
<el-table-column label="组织方" prop="organizer"></el-table-column>
<el-table-column label="参加参数名称" prop="params"></el-table-column>
<el-table-column label="结果">
<template slot-scope="scope">
<span>{{ resultsOptions[scope.row.result] }}</span>
</template>
</el-table-column>
<el-table-column label="处理结果">
<template slot-scope="scope">
<span>{{ handleOptions[scope.row.handle_result] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12" style="margin-top: 5px;">
<el-card>
<div class="cardHead">
<span class="cardTitle">客户投诉</span>
</div>
<el-table
:data="complaintList"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="40" />
<el-table-column label="投诉人" prop="complainant"></el-table-column>
<el-table-column label="投诉内容" prop="content"></el-table-column>
<el-table-column label="投诉日期" prop="date_occurrence"></el-table-column>
<el-table-column label="反馈日期" prop="date_feedback"></el-table-column>
<el-table-column label="是否满意">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_satisfied" type="primary">满意</el-tag>
<el-tag v-else type="warning">不满意</el-tag>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12" style="margin-top: 5px;">
<el-card>
<div class="cardHead">
<span class="cardTitle">风险识别</span>
</div>
<el-table
:data="riskList"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="40" />
<el-table-column label="内容" prop="content"></el-table-column>
<el-table-column label="风险等级">
<template slot-scope="scope">
<span>{{ levelOptions[scope.row.level] }}</span>
</template>
</el-table-column>
<el-table-column label="风险代码" prop="code"></el-table-column>
<el-table-column label="整改状态">
<template slot-scope="scope">
<span>{{ codeOptions[scope.row.state] }}</span>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12" style="margin-top: 5px;">
<el-card>
<div class="cardHead">
<span class="cardTitle">外部监督检查</span>
</div>
<el-table
:data="oinspectList"
fit
stripe
highlight-current-row
max-height="300px"
>
<el-table-column type="index" width="40" />
<el-table-column label="检查分类">
<template slot-scope="scope">
<span>{{ cateOptions[scope.row.cate] }}</span>
</template>
</el-table-column>
<el-table-column label="检查方" prop="checker"></el-table-column>
<el-table-column label="检查日期" prop="date_inspect"></el-table-column>
<el-table-column label="检查结果" prop="result"></el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</div>
<!-- 添加执行组织 -->
<el-dialog
:visible.sync="dialogVisible"
:title="dgaction.name"
:close-on-click-modal="false"
width="1100px"
>
<el-transfer
v-model="depts"
:data="deptOptions"
:titles="['单位列表', '选择的单位']"
:props="{ key : 'id' , label: 'name' }"
>
<span slot-scope="{ option }">{{ option.sort }} - {{ option.name }}</span>
</el-transfer>
<div style="text-align: right">
<el-button type="primary" @click="confirm()">确认</el-button>
</div>
</el-dialog>
<!-- 记录 -->
<el-drawer
title="记录"
:visible.sync="drawer"
:with-header="false"
size="40%"
>
<recorddo
ref="recorddo"
:data="data"
@handleDo="handleDo"
v-if="drawer"
></recorddo>
</el-drawer>
</div>
</template>
<style >
.term {
color: rgba(0, 0, 0, 0.85);
font-weight: bold;
font-size: 16px;
}
.desc {
color: rgba(0, 0, 0, 0.65);
font-weight: bold;
font-size: 16px;
}
.litem {
margin-bottom: 4px;
margin-left: 2px;
cursor: pointer;
color: #409eff;
}
</style>
<script>
import { getOrgList } from "@/api/org";
import { getTask2, addDeptsTask2, getTask2Do, startTask2, confirmTaskdept ,
getPgoalDeptList,getRcList,getPtList,getRiskList,getComplaintList,getOinspectList} from "@/api/task";
import Pagination from "@/components/Pagination";
import checkPermission from "@/utils/permission";
import recorddo from "@/views/supervision/recorddo";
import { upUrl, upHeaders } from "@/api/file";
export default {
components: { Pagination, recorddo },
data() {
return {
task: { id: 0 },
dialogVisible: false,
dialogVisibles: false,
dialogType: "new",
activeName: "contenttab",
contents: [],
depts: [],
listLoading: false,
listLoading2: false,
recordList: [],
nowcontent: {},
nowdept: {},
drawer: false,
data: {},
taskdeptall: [],
listQuery:{},
selectRecords:[],
dgaction:{
action:'start',
name:'开始任务'
}
,
upHeaders: upHeaders(),
upUrl: upUrl(),
fileList:[],
Taskdept:{is_yes:true},
statusOptios:{
10:'创建中',
20:'进行中',
30:'已关闭',
},
cycleOptions:{
0:'',
1:'1-2月',
2:'3-4月',
3:'5-6月',
4:'7-8月',
5:'9-10月',
6:'11-12月',
},
task2do:'',
depts: [],
deptOptions: [],
task2doItem:{},
rcList:[],//报告证书{应发/超期}
rc2List:[],
ptList:[],//能力验证
riskList:[],//风险
complaintList:[],//投诉
oinspectList:[],//外部监查
};
},
created() {
this.task.id = this.$route.params.id;
this.gettask();
},
mounted(){
this.gettaskdeptall();
},
methods: {
checkPermission,
gettask() {
getTask2(this.task.id).then((res) => {
this.task = res.data;
if (this.task.state == "创建中") {
this.dialogVisible = true;
}
});
},
getOrgList() {
getOrgList({can_supervision:true}).then((res) => {
this.deptOptions = res.data;
});
},
gettaskdeptall() {
this.listLoading = true;
getTask2Do({task2:this.task.id})
.then((res) => {
// debugger;
this.listLoading = false;
this.taskdeptall = res.data.results;
})
.catch((e) => {
this.listLoading = false;
});
},
append() {
this.dgaction ={
action:'append',
name:'追加执行组织'
}
this.getOrgList();
this.dialogVisible = true;
},
startTask() {
this.$confirm("确认发布任务吗?", "提示")
.then(async () => {
await startTask2(this.task.id);
location.reload();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
handleRecord(data) {
this.data = data;
this.drawer = true;
},
handleDo(data) {
this.drawer = false;
this.gettask();
this.gettaskdeptall();
this.getRecordList();
},
getRecordList() {
getPgoalDeptList(this.listQuery)
.then((res) => {
// debugger;
this.listLoading2 = false;
this.recordList = res.data.results;
})
.catch((e) => {
this.listLoading2 = false;
});
},
clickRow(row) {
this.listLoading2 = true;
this.listQuery = { task2do: row.id };
if(this.task.type==10){
this.getRecordList();
}else if(this.task.type==20){
this.task2doItem = row;
this.task2do = row.id;
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;
}
});
},
handleSelectRecords(val){
let selects = [];
for (var i = 0; i < val.length; i++) {
selects.push(val[i].id);
}
this.selectRecords = selects;
},
handleConfirmDept(scope){
confirmTaskdept(scope.row.id).then(res=>{
this.getRecordList()
this.gettaskdeptall()
})
},
//反馈意见
handlePreview(file) {
if ("url" in file) {
window.open(file.url);
} else {
window.open(file.response.data.path);
}
},
handleUpSuccess(res, file, filelist) {
this.Taskdept.file = res.data.path;
this.filename = res.data.name;
},
handleRemove(file, filelist){
this.Taskdept.file = null;
},
handleConfirmFK(scope){
this.Taskdept = Object.assign({}, scope.row); // copy obj
this.dialogVisibles = true;
if (this.Taskdept.file) {
this.fileList = [
{
name:"反馈文件",
url: this.Taskdept.file,
},
];
}
this.$nextTick(() => {
this.$refs["Forms"].clearValidate();
});
},
async confirmfk(form) {
this.$refs[form].validate((valid) => {
console.log(this.Taskdept)
this.Taskdept.is_yes=true;
updateTaskdept(this.Taskdept.id,this.Taskdept).then((res) => {
if (res.code >= 200) {
this.gettaskdeptall()
this.dialogVisibles = false;
this.$message.success("成功");
}
});
});
},
handleDeleteDept(scope){
deleteTaskdept(scope.row.id).then(res=>{
this.gettaskdeptall()
})
},
handleUp2(){
if (this.selectRecords.length) {
this.$prompt('请输入备注内容', '提示').then(({ value }) => {
updateRecords({note:value, ids:this.selectRecords}).then(res=>{
this.$message.success('成功')
this.getRecordList();
})
}).catch(() => {
});
} else {
this.$message({
message: "请先选择",
type: "warning",
});
}
},
confirm(){
if(this.depts.length>0){
let data = {ids:this.depts}
// this.task.depts = this.depts;
this.chooseComplete(data)
}else{
this.$message.error('请选择清单和单位!')
}
},
chooseComplete(data) {
this.dialogVisible = false;
const rLoading = this.openLoading("正在添加执行组织,请稍等...");
addDeptsTask2(this.task.id, data).then((res) => {
rLoading.close();
this.$message.success("成功");
this.$router.go(0);
}).catch(e=>{rLoading.close();});
},
},
};
</script>