质量管理(差center1)

This commit is contained in:
熊丽君
2021-12-16 14:24:30 +08:00
parent ac19eed4dc
commit 091ad71e09
9 changed files with 1236 additions and 55 deletions

View File

@ -0,0 +1,172 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="SPC参数" align="center" prop="spcName" />
<el-table-column label="关键参数类别" align="center" prop="paramCategory" />
<el-table-column label="产品实物" align="center" prop="product" />
<el-table-column label="控制上限" align="center" prop="upperLimit" />
<el-table-column label="控制下限" align="center" prop="lowerLimit" />
<el-table-column label="中心线" align="center" prop="centerLine" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
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" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
> -->
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { centerTwoList, centerTwoImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/spcInfo/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
centerTwoList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
centerTwoImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -2,37 +2,45 @@
<div class="app-container">
<el-divider content-position="left"><span class="text-bold-18">质量计划</span></el-divider>
<left1 />
<!-- <el-divider content-position="left"><span class="text-bold-18">收入利润概况</span></el-divider>
<el-divider content-position="left"><span class="text-bold-18">质量体系要素</span></el-divider>
<left2 />
<el-divider content-position="left"><span class="text-bold-18">全年目标</span></el-divider>
<center1 />
<el-divider content-position="left"><span class="text-bold-18">今日动态</span></el-divider>
<el-divider content-position="left"><span class="text-bold-18">质量体系审查</span></el-divider>
<left3 />
<el-divider content-position="left"><span class="text-bold-18">视频检验系统实况</span></el-divider>
<left4 />
<!-- <el-divider content-position="left"><span class="text-bold-18">全年目标</span></el-divider>
<center1 /> -->
<el-divider content-position="left"><span class="text-bold-18">关键参数SPC分析</span></el-divider>
<center2 />
<el-divider content-position="left"><span class="text-bold-18">生产责任令完成概况</span></el-divider>
<el-divider content-position="left"><span class="text-bold-18">质量问题</span></el-divider>
<right1 />
<el-divider content-position="left"><span class="text-bold-18">交付产品完成概况</span></el-divider>
<el-divider content-position="left"><span class="text-bold-18">质量检查分析</span></el-divider>
<right2 />
<el-divider content-position="left"><span class="text-bold-18">装药量概况</span></el-divider>
<right3 /> -->
<el-divider content-position="left"><span class="text-bold-18">质量案例</span></el-divider>
<right3 />
</div>
</template>
<script>
import left1 from './left1.vue'
// import left2 from './left2.vue' // 包括 left2 和 left3 只有一个接口
import left2 from './left2.vue'
import left3 from './left3.vue'
import left4 from './left4.vue'
// import center1 from './center1.vue'
// import center2 from './center2.vue'
// import right1 from './right1.vue'
// import right2 from './right2.vue'
// import right3 from './right3.vue'
import center2 from './center2.vue'
import right1 from './right1.vue'
import right2 from './right2.vue'
import right3 from './right3.vue'
export default {
components: {
left1,
// left2,
left2,
left3,
left4,
// center1,
// center2,
// right1,
// right2,
// right3,
center2,
right1,
right2,
right3,
},
}
</script>

View File

@ -15,28 +15,54 @@ export function importTemplate() {
})
}
/** --------------- left2 --------------- */
// 收入和利润列表
// 质量体系要素列表
export function leftTwoList(params) {
return request({
url: '/hx/revenueProfit/list',
url: '/hx/qualitySystem/list',
params,
})
}
// 导出模板
export function leftTwoImportTemplate() {
return request({
url: '/hx/revenueProfit/importTemplate',
url: '/hx/qualitySystem/importTemplate',
})
}
/** --------------- left3 --------------- */
// 质量体系审查列表
export function leftThreeList(params) {
return request({
url: '/hx/qualitySystem/reviewList',
params,
})
}
// 导出模板
export function leftThreeImportTemplate() {
return request({
url: '/hx/qualitySystem/importReviewTemplate',
})
}
/** --------------- left4 --------------- */
// 质量体系审查列表
export function leftFourList(params) {
return request({
url: '/hx/videoSystem/list',
params,
})
}
// 导出模板
export function leftFourImportTemplate() {
return request({
url: '/hx/videoSystem/importTemplate',
})
}
/** --------------- center1 --------------- */
// 全年目标和大图列表
export function centerOneList(params) {
return request({
url: '/hx/annualTarget/list',
params,
})
}
// 修改全年目标和大图
export function updateAnnualTarget(data) {
return request({
url: '/hx/annualTarget',
@ -45,76 +71,58 @@ export function updateAnnualTarget(data) {
})
}
/** --------------- center2 --------------- */
// 今日动态列表
// 关键参数SPC分析
export function centerTwoList(params) {
return request({
url: '/hx/todayDynamic/list',
url: '/hx/spcInfo/list',
params,
})
}
// 导出模板
export function centerTwoImportTemplate() {
return request({
url: '/hx/todayDynamic/importTemplate',
url: '/hx/spcInfo/importTemplate',
})
}
/** --------------- right1 --------------- */
// 生产责任令
// 质量问题
export function rightOneList(params) {
return request({
url: '/hx/productionResponsibility/list',
url: '/hx/qualityProblem/list',
params,
})
}
// 导出模板
export function rightOneImportTemplate() {
return request({
url: '/hx/productionResponsibility/importTemplate',
url: '/hx/qualityProblem/importTemplate',
})
}
/** --------------- right2 --------------- */
// 交付产品完成概况
// 质量检查分析
export function rightTwoList(params) {
return request({
url: '/hx/productCompletion/list',
url: '/hx/qualityInspect/list',
params,
})
}
// 导出模板
export function rightTwoImportTemplate() {
return request({
url: '/hx/productCompletion/importTemplate',
})
}
// 删除交付产品完成概况
export function rightTwoDel(params) {
return request({
url: '/hx/productCompletion',
method: 'delete',
params,
url: '/hx/qualityInspect/importTemplate',
})
}
/** --------------- right3 --------------- */
// 装药量列表
// 质量案例
export function rightThreeList(params) {
return request({
url: '/hx/chargeQuantity/list',
url: '/hx/qualityCase/list',
params,
})
}
// 新增装药量
export function rightThreeAdd(data) {
// 导出模板
export function rightThreeImportTemplate() {
return request({
url: '/hx/chargeQuantity',
method: 'post',
data,
})
}
// 修改装药量
export function rightThreeUpdate(data) {
return request({
url: '/hx/chargeQuantity',
method: 'put',
data,
url: '/hx/qualityCase/importTemplate',
})
}

View File

@ -0,0 +1,170 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="月份" align="center" prop="todayDate" />
<el-table-column label="体系要素名称" align="center" prop="systemName" />
<el-table-column label="体系要素问题数" align="center" prop="systemNumber" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
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" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
> -->
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { leftTwoList, leftTwoImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualitySystem/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
leftTwoList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
leftTwoImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -0,0 +1,170 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="日期" align="center" prop="todayDate" />
<el-table-column label="内审数量" align="center" prop="internalReviewNumber" />
<el-table-column label="外审数量" align="center" prop="externalReviewNumber" />
<el-table-column label="第三方审数量" align="center" prop="otherReviewNumber" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
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" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
> -->
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { leftThreeList, leftThreeImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualitySystem/importReviewData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
leftThreeList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
leftThreeImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -0,0 +1,170 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="视频点名称" align="center" prop="videoName" />
<el-table-column label="视频点地址" align="center" prop="videoAddress" />
<el-table-column label="实况信息" align="center" prop="videoNowInfo" />
<el-table-column label="视频点备注" align="center" prop="videoRemark" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
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" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
> -->
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { leftFourList, leftFourImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/videoSystem/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
leftFourList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
leftFourImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -0,0 +1,162 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="月份" align="center" prop="month" />
<el-table-column label="完成总数" align="center" prop="completedTotal" />
<el-table-column label="问题总数" align="center" prop="problemTotal" />
<el-table-column label="完成率" align="center" prop="completeRate" />
<el-table-column label="维度" align="center" prop="dimension" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { rightOneList, rightOneImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualityProblem/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
rightOneList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有用户数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
rightOneImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -0,0 +1,161 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="月份" align="center" prop="month" />
<el-table-column label="完成数" align="center" prop="completedTotal" />
<el-table-column label="问题数" align="center" prop="problemTotal" />
<el-table-column label="完成率" align="center" prop="completedRate" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { rightTwoList, rightTwoImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualityInspect/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
rightTwoList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
rightTwoImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>

View File

@ -0,0 +1,160 @@
<template>
<el-row :gutter="20">
<!--用户数据-->
<el-col :span="24" :xs="24">
<el-row :gutter="10" class="mb8 fr">
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
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-column label="序号" align="center" prop="id" width="80" />
<el-table-column label="班组名" align="center" prop="className" />
<el-table-column label="日期" align="center" prop="todayDate" />
<el-table-column label="案例名称" align="center" prop="remark" />
<el-table-column label="故障启示" align="center" prop="faultRevelation" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:autoScroll="false"
:pageSizes="[2, 5, 10, 20]"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</el-row>
</template>
<script>
import { rightThreeList, rightThreeImportTemplate } from './indexApi'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: this.page_size,
},
// 用户信息
userList: [],
// 总条数
total: 0,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: '',
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: 'Bearer ' + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + '/hx/qualityCase/importData',
},
}
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true
rightThreeList(this.queryParams).then(res => {
this.userList = res.rows
this.total = res.total
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$modal
.confirm('是否确认导出所有数据项?')
.then(() => {
this.exportLoading = true
return exportUser(queryParams)
})
.then(response => {
this.$download.name(response.msg)
this.exportLoading = false
})
.catch(() => {})
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '数据导入'
this.upload.open = true
},
/** 下载模板操作 */
importTemplate() {
rightThreeImportTemplate().then(response => {
this.$download.name(response.msg)
})
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit()
},
},
created() {
this.getList()
},
}
</script>