生产管理
This commit is contained in:
176
src/views/chartList/page2/two/center.vue
Normal file
176
src/views/chartList/page2/two/center.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<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="realMilitaryIncome" />
|
||||
<el-table-column label="目标军品收入数" align="center" prop="targetMilitaryIncome" />
|
||||
<el-table-column label="实际装药量累计数" align="center" prop="realCharge" />
|
||||
<el-table-column label="装药量目标数" align="center" prop="targetCharge" />
|
||||
<el-table-column label="大型产品实际累计数" align="center" prop="realBigProduct" />
|
||||
<el-table-column label="大型产品年目标数" align="center" prop="targetBigProduct" />
|
||||
<el-table-column label="中型产品实际累计数" align="center" prop="realMediumProduct" />
|
||||
<el-table-column label="中型产品年目标数" align="center" prop="targetMediumProduct" />
|
||||
<el-table-column label="小型产品实际累计数" align="center" prop="realSmallProduct" />
|
||||
<el-table-column label="小型产品年目标数" align="center" prop="targetSmallProduct" />
|
||||
</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>仅允许导入xls、xlsx格式文件。</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 { centerOneLeftList, centerOneLeftImportTemplate } 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/productionIndex/importData',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
centerOneLeftList(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() {
|
||||
centerOneLeftImportTemplate().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>
|
173
src/views/chartList/page2/two/center1.vue
Normal file
173
src/views/chartList/page2/two/center1.vue
Normal file
@ -0,0 +1,173 @@
|
||||
<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="month" />
|
||||
<el-table-column label="大型装药量数量" align="center" prop="bigCharge" />
|
||||
<el-table-column label="中型装药量数量" align="center" prop="mediumCharge" />
|
||||
<el-table-column label="小型装药量数量" align="center" prop="smallCharge" />
|
||||
<el-table-column label="目标装药量" align="center" prop="targetCharge" />
|
||||
<el-table-column label="交付数量" align="center" prop="realDeliver" />
|
||||
<el-table-column label="目标交付数量" align="center" prop="targetDeliver" />
|
||||
</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>仅允许导入xls、xlsx格式文件。</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 { centerOneList, centerOneImportTemplate } 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/chargeDeliver/importData',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
centerOneList(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() {
|
||||
centerOneImportTemplate().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>
|
@ -1,33 +1,36 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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>
|
||||
<left1 />
|
||||
<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>
|
||||
<left3 />
|
||||
<!-- <el-divider content-position="left"><span class="text-bold-18">生产指标</span></el-divider>
|
||||
<center1 /> -->
|
||||
<left3 /> -->
|
||||
<el-divider content-position="left"><span class="text-bold-18">生产指标数据</span></el-divider>
|
||||
<center />
|
||||
<!-- <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>
|
||||
<center2 />
|
||||
<el-divider content-position="left"><span class="text-bold-18">物资计划</span></el-divider>
|
||||
<center3 />
|
||||
<!-- <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>
|
||||
<right1 />
|
||||
<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 />
|
||||
<right3 /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import left1 from './left1.vue'
|
||||
import left2 from './left2.vue'
|
||||
import left3 from './left3.vue'
|
||||
// import center1 from './center1.vue'
|
||||
import center from './center.vue'
|
||||
import center1 from './center1.vue'
|
||||
import center2 from './center2.vue'
|
||||
import center3 from './center3.vue'
|
||||
// import right1 from './right1.vue'
|
||||
import right1 from './right1.vue'
|
||||
import right2 from './right2.vue'
|
||||
import right3 from './right3.vue'
|
||||
export default {
|
||||
@ -35,10 +38,11 @@ export default {
|
||||
left1,
|
||||
left2,
|
||||
left3,
|
||||
// center1,
|
||||
center,
|
||||
center1,
|
||||
center2,
|
||||
center3,
|
||||
// right1,
|
||||
right1,
|
||||
right2,
|
||||
right3,
|
||||
},
|
||||
|
@ -42,22 +42,34 @@ export function leftThreeImportTemplate() {
|
||||
url: '/hx/milepostAndBottleneck/importTemplate',
|
||||
})
|
||||
}
|
||||
// /** --------------- center1 --------------- */
|
||||
// //
|
||||
// export function centerOneList(params) {
|
||||
// return request({
|
||||
// url: '/hx/annualTarget/list',
|
||||
// params,
|
||||
// })
|
||||
// }
|
||||
// //
|
||||
// export function updateAnnualTarget(data) {
|
||||
// return request({
|
||||
// url: '/hx/annualTarget',
|
||||
// method: 'put',
|
||||
// data,
|
||||
// })
|
||||
// }
|
||||
/** --------------- center1-l --------------- */
|
||||
// 年指标累计和目标列表
|
||||
export function centerOneLeftList(params) {
|
||||
return request({
|
||||
url: '/hx/productionIndex/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function centerOneLeftImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/productionIndex/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- center1-r --------------- */
|
||||
// 生产指标列表
|
||||
export function centerOneList(params) {
|
||||
return request({
|
||||
url: '/hx/chargeDeliver/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function centerOneImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/chargeDeliver/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- center2 --------------- */
|
||||
// 本月计划执行情况列表
|
||||
export function centerTwoList(params) {
|
||||
@ -86,20 +98,20 @@ export function centerThreeImportTemplate() {
|
||||
url: '/hx/materialPlan/importTemplate',
|
||||
})
|
||||
}
|
||||
// /** --------------- right1 --------------- */
|
||||
// //
|
||||
// export function rightOneList(params) {
|
||||
// return request({
|
||||
// url: '/hx/productionResponsibility/list',
|
||||
// params,
|
||||
// })
|
||||
// }
|
||||
// //
|
||||
// export function rightOneImportTemplate() {
|
||||
// return request({
|
||||
// url: '/hx/productionResponsibility/importTemplate',
|
||||
// })
|
||||
// }
|
||||
/** --------------- right1 --------------- */
|
||||
// 生产情况列表
|
||||
export function rightOneList(params) {
|
||||
return request({
|
||||
url: '/hx/productionSituation/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function rightOneImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/productionSituation/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- right2 --------------- */
|
||||
// 调度会列表
|
||||
export function rightTwoList(params) {
|
||||
|
172
src/views/chartList/page2/two/right1.vue
Normal file
172
src/views/chartList/page2/two/right1.vue
Normal 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="月份" align="center" prop="month" />
|
||||
<el-table-column label="绝热完成数量(个)" align="center" prop="realAdiabat" />
|
||||
<el-table-column label="装药完成数(个)" align="center" prop="realCharge" />
|
||||
<el-table-column label="总装完成数(个)" align="center" prop="realAssemble" />
|
||||
<el-table-column label="实际交付数(个)" align="center" prop="realDeliver" />
|
||||
<el-table-column label="酯实际产量(个)" align="center" prop="realEster" />
|
||||
</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>仅允许导入xls、xlsx格式文件。</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 { 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/productionSituation/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>
|
Reference in New Issue
Block a user