总览数据管理
This commit is contained in:
271
src/views/chartList/page1/center1.vue
Normal file
271
src/views/chartList/page1/center1.vue
Normal file
@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</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="bigPic" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.bigPic" fit="cover"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年份" align="center" prop="year" width="100" />
|
||||
<el-table-column label="收入(万)" align="center" prop="completedIncome" width="100" />
|
||||
<el-table-column label="目标收入(万)" align="center" prop="targetIncome" />
|
||||
<el-table-column label="利润(万)" align="center" prop="completedProfit" />
|
||||
<el-table-column label="目标利润(万)" align="center" prop="targetProfit" />
|
||||
<el-table-column label="装药量(万件)" align="center" prop="completedChargeQuantity" />
|
||||
<el-table-column label="目标装药量(万件)" align="center" prop="targetChargeQuantity" />
|
||||
<el-table-column label="交付数量(万件)" align="center" prop="completedDeliveryQuantity" />
|
||||
<el-table-column label="目标交付数量(万件)" align="center" prop="targetDeliveryQuantity" />
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收入" prop="completedIncome">
|
||||
<el-input v-model="form.completedIncome" placeholder="请输入收入" maxlength="30">
|
||||
<template slot="append">万</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标收入" prop="targetIncome">
|
||||
<el-input v-model="form.targetIncome" placeholder="请输入目标收入">
|
||||
<template slot="append">万</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="利润" prop="completedProfit">
|
||||
<el-input v-model="form.completedProfit" placeholder="请输入利润">
|
||||
<template slot="append">万</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标利润" prop="targetProfit">
|
||||
<el-input v-model="form.targetProfit" placeholder="请输入目标利润">
|
||||
<template slot="append">万</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="装药量" prop="completedChargeQuantity">
|
||||
<el-input v-model="form.completedChargeQuantity" placeholder="请输入装药量">
|
||||
<template slot="append">万件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标装药量" prop="targetChargeQuantity">
|
||||
<el-input v-model="form.targetChargeQuantity" placeholder="请输入目标装药量">
|
||||
<template slot="append">万件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="交付数量" prop="completedDeliveryQuantity">
|
||||
<el-input v-model="form.completedDeliveryQuantity" placeholder="请输入交付数量">
|
||||
<template slot="append">万件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标交付数量" prop="targetDeliveryQuantity">
|
||||
<el-input v-model="form.targetDeliveryQuantity" placeholder="请输入目标交付数量">
|
||||
<template slot="append">万件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标年份" prop="year">
|
||||
<el-date-picker v-model="form.year" type="year" value-format="yyyy" placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图片" prop="bigPic">
|
||||
<ImageUpload v-model="form.bigPic" :isShowTip="false" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { centerOneList, updateAnnualTarget } from './index'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
completedIncome: [{ required: true, message: '收入不能为空', trigger: 'blur' }],
|
||||
targetIncome: [{ required: true, message: '目标收入不能为空', trigger: 'blur' }],
|
||||
completedProfit: [{ required: true, message: '利润不能为空', trigger: 'blur' }],
|
||||
targetProfit: [{ required: true, message: '目标利润不能为空', trigger: 'blur' }],
|
||||
completedChargeQuantity: [{ required: true, message: '装药量不能为空', trigger: 'blur' }],
|
||||
targetChargeQuantity: [{ required: true, message: '目标装药量不能为空', trigger: 'blur' }],
|
||||
completedDeliveryQuantity: [{ required: true, message: '交付数量不能为空', trigger: 'blur' }],
|
||||
targetDeliveryQuantity: [{ required: true, message: '目标交付数量不能为空', trigger: 'blur' }],
|
||||
year: [{ required: true, message: '请选择目标年份', trigger: 'change' }],
|
||||
bigPic: [{ required: true, message: '请上传', trigger: 'change' }],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
centerOneList(this.queryParams).then(response => {
|
||||
this.userList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
bigPic: undefined,
|
||||
completedIncome: undefined,
|
||||
targetIncome: undefined,
|
||||
completedProfit: undefined,
|
||||
targetProfit: undefined,
|
||||
completedChargeQuantity: undefined,
|
||||
targetChargeQuantity: undefined,
|
||||
completedDeliveryQuantity: undefined,
|
||||
targetDeliveryQuantity: undefined,
|
||||
year: undefined,
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.form = Object.assign({}, row)
|
||||
this.open = true
|
||||
this.title = '修改用户'
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateAnnualTarget(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const userIds = row.userId || this.ids
|
||||
this.$modal
|
||||
.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delUser(userIds)
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
177
src/views/chartList/page1/center2.vue
Normal file
177
src/views/chartList/page1/center2.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<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="income" />
|
||||
<el-table-column label="支出" align="center" prop="expenditure" />
|
||||
<el-table-column label="新签合同" align="center" prop="newContract" />
|
||||
<el-table-column label="安全问题" align="center" prop="safetyProblem" />
|
||||
<el-table-column label="质量问题" align="center" prop="qualityProblem" />
|
||||
<el-table-column label="设备数" align="center" prop="totalEquipment" />
|
||||
<el-table-column label="职工数" align="center" prop="totalWorker" />
|
||||
<el-table-column label="生产任务" align="center" prop="completeTask" />
|
||||
<el-table-column label="运行率" align="center" prop="equipmentRate" />
|
||||
<el-table-column label="出勤率" align="center" prop="workerRate" />
|
||||
<el-table-column label="完成率" align="center" prop="taskRate" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
: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 { centerTwoList, centerTwoImportTemplate } from './index'
|
||||
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/todayDynamic/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>
|
120
src/views/chartList/page1/index.js
Normal file
120
src/views/chartList/page1/index.js
Normal file
@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/** --------------- left1 --------------- */
|
||||
// 经营责任书列表
|
||||
export function leftOneList(params) {
|
||||
return request({
|
||||
url: '/hx/businessResponsibility/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function importTemplate() {
|
||||
return request({
|
||||
url: '/hx/businessResponsibility/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- left2 --------------- */
|
||||
// 收入和利润列表
|
||||
export function leftTwoList(params) {
|
||||
return request({
|
||||
url: '/hx/revenueProfit/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function leftTwoImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/revenueProfit/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,
|
||||
})
|
||||
}
|
||||
/** --------------- center2 --------------- */
|
||||
// 今日动态列表
|
||||
export function centerTwoList(params) {
|
||||
return request({
|
||||
url: '/hx/todayDynamic/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function centerTwoImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/todayDynamic/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- right1 --------------- */
|
||||
// 生产责任令
|
||||
export function rightOneList(params) {
|
||||
return request({
|
||||
url: '/hx/productionResponsibility/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function rightOneImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/productionResponsibility/importTemplate',
|
||||
})
|
||||
}
|
||||
/** --------------- right2 --------------- */
|
||||
// 交付产品完成概况
|
||||
export function rightTwoList(params) {
|
||||
return request({
|
||||
url: '/hx/productCompletion/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 导出模板
|
||||
export function rightTwoImportTemplate() {
|
||||
return request({
|
||||
url: '/hx/productCompletion/importTemplate',
|
||||
})
|
||||
}
|
||||
// 删除交付产品完成概况
|
||||
export function rightTwoDel(params) {
|
||||
return request({
|
||||
url: '/hx/productCompletion',
|
||||
method: 'delete',
|
||||
params,
|
||||
})
|
||||
}
|
||||
/** --------------- right3 --------------- */
|
||||
// 装药量列表
|
||||
export function rightThreeList(params) {
|
||||
return request({
|
||||
url: '/hx/chargeQuantity/list',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 新增装药量
|
||||
export function rightThreeAdd(data) {
|
||||
return request({
|
||||
url: '/hx/chargeQuantity',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 修改装药量
|
||||
export function rightThreeUpdate(data) {
|
||||
return request({
|
||||
url: '/hx/chargeQuantity',
|
||||
method: 'put',
|
||||
data,
|
||||
})
|
||||
}
|
49
src/views/chartList/page1/index.vue
Normal file
49
src/views/chartList/page1/index.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<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>
|
||||
<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>
|
||||
<center2 />
|
||||
<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 />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import left1 from './left1.vue'
|
||||
import left2 from './left2.vue' // 包括 left2 和 left3 只有一个接口
|
||||
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'
|
||||
export default {
|
||||
components: {
|
||||
left1,
|
||||
left2,
|
||||
center1,
|
||||
center2,
|
||||
right1,
|
||||
right2,
|
||||
right3,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
.el-divider:nth-child(n + 2) {
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
.text-bold-18 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
169
src/views/chartList/page1/left1.vue
Normal file
169
src/views/chartList/page1/left1.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<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="indicatorName" />
|
||||
<el-table-column label="月份" align="center" prop="month" />
|
||||
<el-table-column label="经营责任书目标数量" align="center" prop="targetTasks" />
|
||||
<el-table-column label="经营责任书已完成数量" align="center" prop="completedTasks" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
: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 { leftOneList, importTemplate } from './index'
|
||||
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/businessResponsibility/importData',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
leftOneList(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() {
|
||||
importTemplate().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>
|
175
src/views/chartList/page1/left2.vue
Normal file
175
src/views/chartList/page1/left2.vue
Normal file
@ -0,0 +1,175 @@
|
||||
<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="forecastRevenue" />
|
||||
<el-table-column label="目标收入(件)" align="center" prop="targetRevenue" />
|
||||
<el-table-column label="已完成收入(件)" align="center" prop="completedRevenue" />
|
||||
<el-table-column label="收入完成率" align="center" prop="revenueRate" />
|
||||
<el-table-column label="预测利润(万元)" align="center" prop="forecastProfit" />
|
||||
<el-table-column label="目标利润(万元)" align="center" prop="targetProfit" />
|
||||
<el-table-column label="已完成利润(万元)" align="center" prop="completedProfit" />
|
||||
<el-table-column label="利润完成率" align="center" prop="profitRate" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
:autoScroll="false"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
: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 { leftTwoList, leftTwoImportTemplate } from './index'
|
||||
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/revenueProfit/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>
|
160
src/views/chartList/page1/right1.vue
Normal file
160
src/views/chartList/page1/right1.vue
Normal 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="translateName" />
|
||||
<el-table-column label="月份" align="center" prop="month" />
|
||||
<el-table-column label="任务数" align="center" prop="completedTaskNumber" />
|
||||
<el-table-column label="目标完成数" align="center" prop="targetTaskNumber" />
|
||||
<el-table-column label="完成率" align="center" prop="completionRate" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
: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>仅允许导入xls、xlsx格式文件。</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 './index'
|
||||
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/productionResponsibility/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>
|
178
src/views/chartList/page1/right2.vue
Normal file
178
src/views/chartList/page1/right2.vue
Normal file
@ -0,0 +1,178 @@
|
||||
<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="productName" />
|
||||
<el-table-column label="月份" align="center" prop="month" />
|
||||
<el-table-column label="交付数量(件)" align="center" prop="actualDeliveryQuantity" />
|
||||
<el-table-column label="目标交付数量(件)" align="center" prop="targetDeliveryQuantity" />
|
||||
<el-table-column label="完成率" align="center" prop="completionRate" />
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
: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>仅允许导入xls、xlsx格式文件。</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, rightTwoDel } from './index'
|
||||
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/productCompletion/importData',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
rightTwoList(this.queryParams).then(res => {
|
||||
this.userList = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除用户编号为"' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return rightTwoDel({ id: row.id })
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
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>
|
218
src/views/chartList/page1/right3.vue
Normal file
218
src/views/chartList/page1/right3.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<div>
|
||||
<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="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</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="forecastQuantity" />
|
||||
<el-table-column label="实际装药量(件)" align="center" prop="actualQuantity" />
|
||||
<el-table-column label="目标装药量(件)" align="center" prop="targetQuantity" />
|
||||
<el-table-column label="目标完成率" align="center" prop="targetCompletionRate" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预测装药量" prop="forecastQuantity">
|
||||
<el-input v-model="form.forecastQuantity" placeholder="请输入预测装药量" maxlength="30">
|
||||
<template slot="append">件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际装药量" prop="actualQuantity">
|
||||
<el-input v-model="form.actualQuantity" placeholder="请输入实际装药量">
|
||||
<template slot="append">件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标装药量" prop="targetQuantity">
|
||||
<el-input v-model="form.targetQuantity" placeholder="请输入目标装药量">
|
||||
<template slot="append">件</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-date-picker v-model="form.month" type="month" value-format="yyyy-MM" placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="目标完成率" prop="targetCompletionRate">
|
||||
<el-input v-model="form.targetCompletionRate" placeholder="请输入目标利润">
|
||||
<template slot="append">件</template>
|
||||
</el-input>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年份" prop="month">
|
||||
<el-date-picker v-model="form.month" type="year" value-format="yyyy" placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12"> </el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { rightThreeList, rightThreeAdd, rightThreeUpdate } from './index'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
forecastQuantity: [{ required: true, message: '预测装药量不能为空', trigger: 'blur' }],
|
||||
actualQuantity: [{ required: true, message: '实际装药量不能为空', trigger: 'blur' }],
|
||||
targetQuantity: [{ required: true, message: '目标装药量不能为空', trigger: 'blur' }],
|
||||
// targetCompletionRate: [{ required: true, message: '目标完成率不能为空', trigger: 'blur' }],
|
||||
month: [{ required: true, message: '请选择年份', trigger: 'change' }],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
rightThreeList(this.queryParams).then(response => {
|
||||
this.userList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
bigPic: undefined,
|
||||
forecastQuantity: undefined,
|
||||
actualQuantity: undefined,
|
||||
targetQuantity: undefined,
|
||||
targetCompletionRate: undefined,
|
||||
completedChargeQuantity: undefined,
|
||||
targetChargeQuantity: undefined,
|
||||
completedDeliveryQuantity: undefined,
|
||||
targetDeliveryQuantity: undefined,
|
||||
month: undefined,
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.form = Object.assign({}, row)
|
||||
this.open = true
|
||||
this.title = '修改用户'
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
rightThreeUpdate(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
rightThreeAdd(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const userIds = row.userId || this.ids
|
||||
this.$modal
|
||||
.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delUser(userIds)
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
3
src/views/chartList/page2/index.vue
Normal file
3
src/views/chartList/page2/index.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>page2 index</div>
|
||||
</template>
|
Reference in New Issue
Block a user