This commit is contained in:
熊丽君
2022-01-25 13:19:53 +08:00
parent 99a3e5e38c
commit 18afbbe5fb
3 changed files with 222 additions and 173 deletions

View File

@ -10,14 +10,14 @@
<div <div
style=" style="
height: 100%; height: 100%;
width: 16%; max-width: 16%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-evenly; justify-content: space-evenly;
" "
> >
<div class="tag"> <div class="_tag">
<div class="title">收入</div> <div class="_title">收入</div>
<i style="font-size: 24px; font-weight: bold; color: #91d5fe" <i style="font-size: 24px; font-weight: bold; color: #91d5fe"
>{{ handleMillion(total.realIncome) }}/<i >{{ handleMillion(total.realIncome) }}/<i
style="font-size: 18px" style="font-size: 18px"
@ -26,8 +26,8 @@
> >
亿元 亿元
</div> </div>
<div class="tag"> <div class="_tag">
<div class="title">利润</div> <div class="_title">利润</div>
<i style="font-size: 24px; font-weight: bold; color: #91d5fe" <i style="font-size: 24px; font-weight: bold; color: #91d5fe"
>{{ handleMillion(total.realProfit) }}/<i >{{ handleMillion(total.realProfit) }}/<i
style="font-size: 18px" style="font-size: 18px"
@ -36,8 +36,8 @@
> >
亿元 亿元
</div> </div>
<div class="tag"> <div class="_tag">
<div class="title">新签合同额</div> <div class="_title">新签合同额</div>
<i style="font-size: 24px; font-weight: bold; color: #91d5fe" <i style="font-size: 24px; font-weight: bold; color: #91d5fe"
>{{ handleMillion(total.newContractAmount) >{{ handleMillion(total.newContractAmount)
}}<i style="font-size: 18px"></i }}<i style="font-size: 18px"></i
@ -865,9 +865,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tag { ._tag {
.title { ._title {
width: 96px; // width: 96px;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
text-align: center; text-align: center;

View File

@ -51,7 +51,7 @@
<div><span style="font-weight: bold">产品错漏检率</span></div> <div><span style="font-weight: bold">产品错漏检率</span></div>
<div class="box"> <div class="box">
<span> <span>
{{ dataInfo.realErrorCheckRate }}% {{ dataInfo.realErrorCheckRate.toFixed(2) }}%
<!-- /{{dataInfo.targetErrorCheckRate}}% --> <!-- /{{dataInfo.targetErrorCheckRate}}% -->
</span> </span>
</div> </div>

View File

@ -1,177 +1,226 @@
<template> <template>
<el-row :gutter="20"> <el-row :gutter="20">
<!--用户数据--> <!--用户数据-->
<el-col :span="24" :xs="24"> <el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr"> <el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button> <el-button
</el-col> type="info"
<el-col :span="1.5"> plain
<el-button icon="el-icon-upload2"
type="warning" size="mini"
plain @click="handleImport"
icon="el-icon-download" >导入</el-button
size="mini" >
:loading="exportLoading" </el-col>
@click="importTemplate" <el-col :span="1.5">
>导出模板</el-button <el-button
> type="warning"
</el-col> plain
</el-row> icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="importTemplate"
>导出模板</el-button
>
</el-col>
</el-row>
<el-table v-loading="loading" :data="userList"> <el-table v-loading="loading" :data="userList">
<el-table-column label="序号" align="center" prop="id" width="80" /> <el-table-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="月份" align="center" prop="month" /> <el-table-column label="月份" align="center" prop="month" />
<el-table-column label="全厂质量体系问题总数" align="center" prop="factoryProblemTotal" /> <el-table-column
<el-table-column label="全厂质量体系问题整改数" align="center" prop="factoryProblemRectificationTotal" /> label="全厂质量体系问题数"
<el-table-column label="一般性质量问题数" align="center" prop="commonlyProblemTotal" /> align="center"
<el-table-column label="低层次质量问题数" align="center" prop="lowProblemTotal" /> prop="factoryProblemTotal"
<el-table-column label="产品错检率" align="center" prop="errorCheckTotal" /> />
<el-table-column label="产品漏检率" align="center" prop="leakCheckTotal" /> <el-table-column
<el-table-column label="质量计划总数" align="center" prop="qualityPlanTotal" /> label="全厂质量体系问题整改数"
<el-table-column label="质量计划完成数" align="center" prop="qualityPlanCompleteTotal" /> align="center"
<el-table-column label="质量通报总数" align="center" prop="qualityNotificationTotal" /> prop="factoryProblemRectificationTotal"
<el-table-column label="质量通报完成数" align="center" prop="qualityNotificationCompleteTotal" /> />
</el-table> <el-table-column
label="一般性质量问题数"
align="center"
prop="commonlyProblemTotal"
/>
<el-table-column
label="低层次质量问题数"
align="center"
prop="lowProblemTotal"
/>
<!-- <el-table-column label="产品错检率" align="center" prop="errorCheckTotal" /> -->
<!-- <el-table-column label="产品漏检率" align="center" prop="leakCheckTotal" /> -->
<el-table-column
label="产品实际错漏检率"
align="center"
prop="realErrorCheck"
/>
<el-table-column
label="质量计划总数"
align="center"
prop="qualityPlanTotal"
/>
<el-table-column
label="质量计划完成数"
align="center"
prop="qualityPlanCompleteTotal"
/>
<el-table-column
label="质量通报总数"
align="center"
prop="qualityNotificationTotal"
/>
<el-table-column
label="质量通报完成数"
align="center"
prop="qualityNotificationCompleteTotal"
/>
</el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:autoScroll="false" :autoScroll="false"
:pageSizes="[2, 5, 10, 20]" :pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</el-col> </el-col>
<!-- 用户导入对话框 --> <!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> <el-dialog
<el-upload :title="upload.title"
ref="upload" :visible.sync="upload.open"
:limit="1" width="400px"
accept=".xlsx, .xls" append-to-body
:headers="upload.headers" >
:action="upload.url" <el-upload
:disabled="upload.isUploading" ref="upload"
:on-progress="handleFileUploadProgress" :limit="1"
:on-success="handleFileSuccess" accept=".xlsx, .xls"
:auto-upload="false" :headers="upload.headers"
drag :action="upload.url"
> :disabled="upload.isUploading"
<i class="el-icon-upload"></i> :on-progress="handleFileUploadProgress"
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> :on-success="handleFileSuccess"
<div class="el-upload__tip" slot="tip"> :auto-upload="false"
<!-- <div class="el-upload__tip" slot="tip"> drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据 <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div> --> </div> -->
<span>仅允许导入xlsxlsx格式文件</span> <span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link <!-- <el-link
type="primary" type="primary"
:underline="false" :underline="false"
style="font-size: 12px; vertical-align: baseline" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate" @click="importTemplate"
>下载模板</el-link >下载模板</el-link
> --> > -->
</div> </div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="upload.open = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</el-row> </el-row>
</template> </template>
<script> <script>
import { centerOneList, centerOneImportTemplate } from './indexApi' import { centerOneList, centerOneImportTemplate } from "./indexApi";
import { getToken } from '@/utils/auth' import { getToken } from "@/utils/auth";
export default { export default {
data() { data() {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: this.page_size, pageSize: this.page_size,
}, },
// 用户信息 // 用户信息
userList: [], userList: [],
// 总条数 // 总条数
total: 0, total: 0,
// 用户导入参数 // 用户导入参数
upload: { upload: {
// 是否显示弹出层(用户导入) // 是否显示弹出层(用户导入)
open: false, open: false,
// 弹出层标题(用户导入) // 弹出层标题(用户导入)
title: '', title: "",
// 是否禁用上传 // 是否禁用上传
isUploading: false, isUploading: false,
// 是否更新已经存在的用户数据 // 是否更新已经存在的用户数据
updateSupport: 0, updateSupport: 0,
// 设置上传的请求头部 // 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// 上传的地址 // 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualityManage/importData', url: process.env.VUE_APP_BASE_API + "/hx/qualityManage/importData",
}, },
} };
}, },
methods: { methods: {
/** 查询用户列表 */ /** 查询用户列表 */
getList() { getList() {
this.loading = true this.loading = true;
centerOneList(this.queryParams).then(res => { centerOneList(this.queryParams).then((res) => {
this.userList = res.rows this.userList = res.rows;
this.total = res.total this.total = res.total;
this.loading = false this.loading = false;
}) });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams const queryParams = this.queryParams;
this.$modal this.$modal
.confirm('是否确认导出所有数据项?') .confirm("是否确认导出所有数据项?")
.then(() => { .then(() => {
this.exportLoading = true this.exportLoading = true;
return exportUser(queryParams) return exportUser(queryParams);
}) })
.then(response => { .then((response) => {
this.$download.name(response.msg) this.$download.name(response.msg);
this.exportLoading = false this.exportLoading = false;
}) })
.catch(() => {}) .catch(() => {});
}, },
/** 导入按钮操作 */ /** 导入按钮操作 */
handleImport() { handleImport() {
this.upload.title = '数据导入' this.upload.title = "数据导入";
this.upload.open = true this.upload.open = true;
}, },
/** 下载模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate() {
centerOneImportTemplate().then(response => { centerOneImportTemplate().then((response) => {
this.$download.name(response.msg) this.$download.name(response.msg);
}) });
}, },
// 文件上传中处理 // 文件上传中处理
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true this.upload.isUploading = true;
}, },
// 文件上传成功处理 // 文件上传成功处理
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
this.upload.open = false this.upload.open = false;
this.upload.isUploading = false this.upload.isUploading = false;
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles();
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true }) this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getList() this.getList();
}, },
// 提交上传文件 // 提交上传文件
submitFileForm() { submitFileForm() {
this.$refs.upload.submit() this.$refs.upload.submit();
}, },
}, },
created() { created() {
this.getList() this.getList();
}, },
} };
</script> </script>