projects/mesxc-zhp #161
2
.env.dev
2
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2023-12-15 15:24:52
|
||||
# @LastEditTime: 2023-12-15 16:28:20
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
|
@ -15,7 +15,7 @@ VUE_APP_TITLE = MES系统
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
|
||||
|
||||
|
||||
# 根据服务器或域名修改
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 15:56:14
|
||||
* @LastEditTime: 2023-12-14 10:57:24
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -65,4 +65,31 @@ export function getHotMaterialList(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 创建原料质量检测条目
|
||||
export function createHotMaterialCheck(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material-check/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新原料质量检测条目
|
||||
export function updateHotMaterialCheck(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material-check/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得质量检测条目列表
|
||||
export function getHotCheckList(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material-check/listByMaterial',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
61
src/api/report/glass.js
Normal file
61
src/api/report/glass.js
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-12-08 10:26:48
|
||||
* @LastEditTime: 2023-12-13 17:16:00
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建原片自动报
|
||||
export function createGlass(data) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量更新原片自动报
|
||||
export function updateGlass(data) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/updatePlus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 更新原片自动报
|
||||
export function updateGlassRemark(data) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原片自动报
|
||||
export function getGlass(id) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原片分页
|
||||
export function getGlassPage(query) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/listPlus',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出原片自动报 Excel
|
||||
export function exportGlasscExcel(query) {
|
||||
return request({
|
||||
url: '/base/report-auto-original-glass/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -15,6 +15,7 @@
|
||||
:headers="headers"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:disabled="disabled"
|
||||
:class="{hide: this.fileList.length >= this.limit}"
|
||||
>
|
||||
<i class="el-icon-plus"></i>
|
||||
@ -44,6 +45,7 @@
|
||||
|
||||
<script>
|
||||
import { getAccessToken } from "@/utils/auth";
|
||||
import { flatten } from 'min-dash';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -67,6 +69,10 @@ export default {
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -122,14 +128,16 @@ export default {
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res) {
|
||||
// edit by 芋道源码
|
||||
this.uploadList.push({ name: res.data, url: res.data });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
this.$modal.closeLoading();
|
||||
if (res.code !== 500) {
|
||||
this.uploadList.push({ name: res.data, url: res.data });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
}
|
||||
}
|
||||
this.$modal.closeLoading();
|
||||
},
|
||||
// 上传前loading加载
|
||||
handleBeforeUpload(file) {
|
||||
|
@ -102,6 +102,7 @@ export const DICT_TYPE = {
|
||||
ORDER_ORIGIN: 'order_Origin',
|
||||
ORDER_PRIORITY: 'order_priority',
|
||||
PACK_SPEC: 'pack_spec',
|
||||
WORK_ORDER_STATUS: 'work_order_status',
|
||||
|
||||
// ============== EQUIPMENT - 设备模块 =============
|
||||
MAINTAIN_TYPE: 'maintain_type',
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-22 10:27:50
|
||||
* @LastEditTime: 2023-12-12 16:04:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -15,25 +15,26 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编号" prop="code">
|
||||
<el-input v-model="dataForm.code" clearable placeholder="请输入客户编号" />
|
||||
<el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入客户编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="name">
|
||||
<el-input v-model="dataForm.name" clearable placeholder="请输入客户名称" />
|
||||
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contact">
|
||||
<el-input v-model="dataForm.contact" clearable placeholder="请输入联系人" />
|
||||
<el-input v-model="dataForm.contact" :disabled="isdetail" clearable placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="telephone">
|
||||
<el-input
|
||||
v-model="dataForm.telephone"
|
||||
:disabled="isdetail"
|
||||
maxlength="11"
|
||||
placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
@ -42,22 +43,34 @@
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
v-model="dataForm.address"
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="dataForm.remark"
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特殊要求" prop="specialRequirements">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="dataForm.specialRequirements"
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入备注" />
|
||||
<imageUpload v-model="files" :disabled="isdetail" :limit="5"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer";
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
components: { ImageUpload },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@ -67,6 +80,8 @@ export default {
|
||||
updateURL: updateCustomer,
|
||||
infoURL: getCustomer
|
||||
},
|
||||
files: [],
|
||||
isdetail: false,
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
@ -74,7 +89,9 @@ export default {
|
||||
telephone: undefined,
|
||||
contact: undefined,
|
||||
address: undefined,
|
||||
remark: undefined
|
||||
remark: undefined,
|
||||
specialRequirements: undefined,
|
||||
files: []
|
||||
},
|
||||
dataRule: {
|
||||
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
|
||||
@ -100,6 +117,66 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
methods: {
|
||||
init(id, isdetail) {
|
||||
this.dataForm.id = id || "";
|
||||
this.isdetail = isdetail || false;
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
if (this.setData) {
|
||||
this.setDataForm()
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
console.log('122', this.files)
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.dataForm.files = []
|
||||
if (this.files.length > 0) {
|
||||
this.files.forEach(item => {
|
||||
const temp = {
|
||||
fileType: 1,
|
||||
fileUrl: item
|
||||
}
|
||||
this.dataForm.files.push(temp)
|
||||
})
|
||||
}
|
||||
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -88,13 +88,19 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:core-customer:detail`)
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-customer:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-customer:delete`)
|
||||
this.$auth.hasPermi(`base:core-customer:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -171,6 +177,13 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "详情";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
65
src/views/base/coreHotMaterial/SmallTitle.vue
Normal file
65
src/views/base/coreHotMaterial/SmallTitle.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 15:27:31
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-08-01 16:25:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div :class="[className, { 'p-0': noPadding }]">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
size: {
|
||||
// 取值范围: xl lg md sm
|
||||
type: String,
|
||||
default: 'de',
|
||||
validator: function (val) {
|
||||
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||
},
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
className: function () {
|
||||
return `${this.size}-title`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||
$mgr: 8px;
|
||||
@each $size, $height in $pxls {
|
||||
.#{$size}-title {
|
||||
font-size: 18px;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: $height + 2px;
|
||||
border-radius: 1px;
|
||||
margin-right: $mgr;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-27 20:12:00
|
||||
* @LastEditTime: 2023-12-14 13:52:42
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -15,19 +15,19 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原料名称" prop="name">
|
||||
<el-input v-model="dataForm.name" clearable placeholder="请输入原料名称" />
|
||||
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入原料名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原料编号" prop="code">
|
||||
<el-input v-model="dataForm.code" clearable placeholder="请输入原料编号" />
|
||||
<el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入原料编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="每日消耗量" prop="dailyCost">
|
||||
<el-input-number v-model="dataForm.dailyCost" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
|
||||
<el-input-number v-model="dataForm.dailyCost" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -35,6 +35,7 @@
|
||||
<el-select
|
||||
v-model="dataForm.unit"
|
||||
filterable
|
||||
:disabled="isdetail"
|
||||
style="width: 100%"
|
||||
placeholder="请选择单位">
|
||||
<el-option
|
||||
@ -47,17 +48,58 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
|
||||
<small-title
|
||||
:size="'sm'"
|
||||
style="margin: 16px 0; padding-left: 8px; font-size: 14px"
|
||||
:no-padding="true">
|
||||
质量信息
|
||||
</small-title>
|
||||
<div v-if="!isdetail" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;">
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row :gutter="20" v-for="(item, index) in test" :key="index">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="成分" label-width="50px" prop="name1">
|
||||
<el-input v-model="item.name" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入成分" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-form-item label="标准含量" prop="unit1">
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="1">
|
||||
<el-tooltip content="如果标准含量不是一个范围,而是一个值,在最大值、最小值中填入相同数字即可。" placement="top">
|
||||
<span style="margin-left: -15px"><i class="el-icon-question"></i></span>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input-number v-model="item.minValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最小值" style="width: 100%" />
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input-number v-model="item.maxValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最大值" style="width: 100%" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode } from "@/api/base/coreHotMaterial";
|
||||
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode, createHotMaterialCheck, updateHotMaterialCheck, getHotCheckList } from "@/api/base/coreHotMaterial";
|
||||
import { getDictDatas} from "@/utils/dict";
|
||||
import SmallTitle from './SmallTitle';
|
||||
|
||||
export default {
|
||||
components: { SmallTitle },
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
@ -76,8 +118,10 @@ export default {
|
||||
dailyCost: undefined,
|
||||
remark: undefined
|
||||
},
|
||||
test: [],
|
||||
departmentlList: [],
|
||||
menuOptions: [],
|
||||
isdetail: false,
|
||||
dataRule: {
|
||||
code: [{ required: true, message: "原料编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "原料名称不能为空", trigger: "blur" }]
|
||||
@ -85,6 +129,100 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
methods: {
|
||||
init(id, isdetail) {
|
||||
this.test = []
|
||||
this.dataForm.id = id || "";
|
||||
this.isdetail = isdetail || false;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
getHotCheckList({
|
||||
materialId: this.dataForm.id
|
||||
}).then(res => {
|
||||
this.test = res.data
|
||||
})
|
||||
} else {
|
||||
this.test = [
|
||||
{
|
||||
name: null,
|
||||
minValue: undefined,
|
||||
maxValue: undefined
|
||||
}
|
||||
]
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
if (this.test.length > 1 || this.test[0].name) {
|
||||
this.test.forEach(check => {
|
||||
check.hotMaterialId = this.dataForm.id
|
||||
if (check.id) {
|
||||
updateHotMaterialCheck(check).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
} else {
|
||||
createHotMaterialCheck(check).then(res1 => {
|
||||
console.log(res1)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
if (this.test.length > 1 || this.test[0].name) {
|
||||
this.test.forEach(check => {
|
||||
check.hotMaterialId = response.data
|
||||
createHotMaterialCheck(check).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
},
|
||||
addNew() {
|
||||
this.test.push({
|
||||
name: null,
|
||||
minValue: undefined,
|
||||
maxValue: undefined
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.action_btn {
|
||||
float: right;
|
||||
margin: -40px 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.add {
|
||||
color: #0b58ff;
|
||||
}
|
||||
</style>
|
||||
|
@ -83,13 +83,19 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:core-hot-material:update`)
|
||||
this.$auth.hasPermi(`base:core-hot-material-check:detail`)
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-hot-material-check:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-hot-material:delete`)
|
||||
this.$auth.hasPermi(`base:core-hot-material-check:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
@ -120,7 +126,7 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-hot-material:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@ -143,6 +149,14 @@ export default {
|
||||
// this.dataListLoading = false;
|
||||
// });
|
||||
// },
|
||||
otherMethods(val) {
|
||||
// 详情
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "详情";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-27 20:07:09
|
||||
* @LastEditTime: 2023-12-06 10:36:56
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -91,27 +91,30 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位平方数" prop="area">
|
||||
<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="specifications">
|
||||
<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" />
|
||||
<el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线生产单位用时(S)" prop="processTime">
|
||||
<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
|
||||
<el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||
<el-form-item label="重量" prop="weight">
|
||||
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@ -240,7 +243,8 @@ export default {
|
||||
specifications: undefined,
|
||||
processTime: 0,
|
||||
remark: undefined,
|
||||
unit: undefined
|
||||
unit: undefined,
|
||||
weight: undefined
|
||||
},
|
||||
productAttrList: [],
|
||||
visible: false,
|
||||
@ -257,6 +261,24 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
clearArea() {
|
||||
this.$set(this.dataForm, 'area', 0)
|
||||
this.$set(this.dataForm, 'weight', 0)
|
||||
},
|
||||
setArea() {
|
||||
if (this.dataForm.specifications) {
|
||||
const height = Number(this.dataForm.specifications.slice(2,4))
|
||||
const length = Number(this.dataForm.specifications.slice(4,8))
|
||||
const width = Number(this.dataForm.specifications.slice(8))
|
||||
// this.dataForm.area = length * width
|
||||
// this.dataForm.weight = 2.5 * height * length * width
|
||||
this.$set(this.dataForm, 'area', length * width)
|
||||
this.$set(this.dataForm, 'weight', 2.5 * height * length * width)
|
||||
} else {
|
||||
this.dataForm.area = 0
|
||||
this.dataForm.weight = 0
|
||||
}
|
||||
},
|
||||
initData() {
|
||||
this.productAttrList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
@ -317,6 +339,10 @@ export default {
|
||||
// 获取产品详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
// this.dataForm.area = response.data.area || 0
|
||||
// this.dataForm.weight = response.data.weight || 0
|
||||
// this.dataForm.specifications = response.data.specifications || undefined
|
||||
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
|
||||
if (this.dataForm.unit !== undefined) {
|
||||
this.dataForm.unit = String(this.dataForm.unit)
|
||||
}
|
||||
@ -339,7 +365,7 @@ export default {
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
// this.initData();
|
||||
this.initData();
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false;
|
||||
@ -370,6 +396,7 @@ export default {
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true
|
||||
this.dataForm.id = response.data
|
||||
// this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
|
@ -140,12 +140,13 @@ export default {
|
||||
allocationVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:core-work-order:material`)
|
||||
? {
|
||||
type: 'material',
|
||||
btnName: '原料信息',
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi(`base:core-work-order:material`)
|
||||
// ? {
|
||||
// type: 'material',
|
||||
// btnName: '原料信息',
|
||||
// showTip: '预使用原料信息'
|
||||
// }
|
||||
// : undefined,
|
||||
{
|
||||
type: 'active',
|
||||
btnName: '激活',
|
||||
|
@ -268,7 +268,7 @@ export default {
|
||||
// })
|
||||
// } else {
|
||||
$('.hiprintEpContainer').empty()
|
||||
console.log(this.modelData);
|
||||
console.log(this.modelData || {});
|
||||
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
|
||||
$('.hiprint-printTemplate').empty()
|
||||
// const templates = this.$ls.get('KEY_TEMPLATES', {})
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-27 15:26:12
|
||||
* @LastEditTime: 2023-12-04 15:10:11
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -377,6 +377,7 @@ export default {
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true
|
||||
this.dataForm.id = response.data
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
|
@ -106,7 +106,7 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间',
|
||||
label: '抄表日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: "timestamp",
|
||||
|
@ -118,8 +118,8 @@ export default {
|
||||
type: '',
|
||||
plcParamId: '',
|
||||
limitType: '',
|
||||
minValue: null,
|
||||
maxValue: null
|
||||
minValue: 0,
|
||||
maxValue: 0
|
||||
},
|
||||
objIds: [],// 回显数组
|
||||
isEdit: false, //是否是编辑
|
||||
@ -239,7 +239,8 @@ export default {
|
||||
return false
|
||||
}
|
||||
}
|
||||
// this.form.limitType = Number(this.form.limitType)
|
||||
this.form.minValue = this.form.minValue || 0
|
||||
this.form.maxValue = this.form.maxValue || 0
|
||||
if (this.isEdit) {
|
||||
// 编辑
|
||||
updateEnergyLimit({...this.form}).then((res) => {
|
||||
|
@ -125,7 +125,7 @@
|
||||
<script>
|
||||
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
|
||||
import { createCheckLog, updateCheckLog, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
|
||||
import { getEquipmentAll } from '@/api/base/equipment'
|
||||
import { getEquipmentPage } from '@/api/base/equipment'
|
||||
import Editor from "@/components/Editor";
|
||||
import { getCheckDetPage } from "@/api/equipment/base/inspection/settings";
|
||||
// import FileUpload from "@/components/FileUpload";
|
||||
@ -203,7 +203,7 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
@ -211,8 +211,12 @@ export default {
|
||||
this.fileName = val
|
||||
},
|
||||
async getDict() {
|
||||
const res = await getEquipmentAll()
|
||||
this.eqList = res.data
|
||||
const res = await getEquipmentPage({
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
special: false
|
||||
})
|
||||
this.eqList = res.data.list
|
||||
const configres = await getcheckConfigByEqList()
|
||||
this.configList = configres.data
|
||||
},
|
||||
|
@ -215,6 +215,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
special: false,
|
||||
maintenanceStatus: null,
|
||||
createTime: null,
|
||||
equipmentId: null,
|
||||
@ -231,11 +232,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||
this.http('/base/core-equipment/page', 'get', {
|
||||
special: false,
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[0],
|
||||
'selectOptions',
|
||||
data.map((item) => ({
|
||||
(data?.list || []).map((item) => ({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
}))
|
||||
|
@ -186,6 +186,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
special: false,
|
||||
equipmentName: null,
|
||||
createTime: null,
|
||||
},
|
||||
@ -217,11 +218,15 @@ export default {
|
||||
.catch(() => { });
|
||||
},
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||
this.http('/base/core-equipment/page', 'get', {
|
||||
special: false,
|
||||
pageNo: 1,
|
||||
pageSize: 99
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[1],
|
||||
'selectOptions',
|
||||
data.map((item) => ({
|
||||
(data?.list || []).map((item) => ({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
}))
|
||||
|
@ -186,7 +186,8 @@ export default {
|
||||
select: true,
|
||||
label: '设备名称',
|
||||
prop: 'equipmentId',
|
||||
url: '/base/core-equipment/listAll',
|
||||
// url: '/base/core-equipment/listAll?special=false',
|
||||
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
|
||||
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
@ -244,6 +245,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
special: false,
|
||||
equipmentName: null,
|
||||
createTime: null,
|
||||
},
|
||||
|
@ -195,7 +195,8 @@ export default {
|
||||
select: true,
|
||||
label: '保养设备',
|
||||
prop: 'equipmentId',
|
||||
url: '/base/core-equipment/listAll',
|
||||
// url: '/base/core-equipment/listAll',
|
||||
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
|
||||
bind: {
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
@ -301,6 +302,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
special: false,
|
||||
maintainPlanId: null,
|
||||
maintainPlanId: null,
|
||||
startTime: null,
|
||||
@ -338,11 +340,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||
this.http('/base/core-equipment/page', 'get', {
|
||||
special: false,
|
||||
pageNo: 1,
|
||||
pageSize: 99
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[0],
|
||||
'selectOptions',
|
||||
data.map((item) => ({
|
||||
(data?.list || []).map((item) => ({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
}))
|
||||
|
@ -193,7 +193,8 @@ export default {
|
||||
select: true,
|
||||
label: '设备名称',
|
||||
prop: 'equipmentId',
|
||||
url: '/base/core-equipment/listAll',
|
||||
// url: '/base/core-equipment/listAll',
|
||||
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
|
||||
bind: {
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
@ -251,6 +252,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
special: false,
|
||||
maintenanceStatus: null,
|
||||
createTime: null,
|
||||
equipmentId: null,
|
||||
@ -267,11 +269,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initSearchBar() {
|
||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||
this.http('/base/core-equipment/page', 'get', {
|
||||
special: false,
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
}).then(({ data }) => {
|
||||
this.$set(
|
||||
this.searchBarFormConfig[0],
|
||||
'selectOptions',
|
||||
data.map((item) => ({
|
||||
(data?.list || []).map((item) => ({
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
}))
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-12-08 13:59:10
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-12-14 14:03:27
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
|
@ -116,7 +116,16 @@ export default {
|
||||
getGroupClasses(id).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
this.form.disableTime = res.data.disableTime || ''
|
||||
this.form.name = res.data.name
|
||||
this.form.code = res.data.code
|
||||
this.form.enableTime = res.data.enableTime
|
||||
// this.form.disableTime = res.data.disableTime || null
|
||||
this.$set(this.form, 'disableTime', res.data.disableTime || null)
|
||||
this.form.startTime = res.data.startTime
|
||||
this.form.endTime = res.data.endTime
|
||||
this.form.daySpan = res.data.daySpan
|
||||
this.form.remark = res.data.remark
|
||||
console.log(this.form)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -165,7 +165,7 @@ const tableProps1 = [
|
||||
{
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
filter: publicFormatter('order_status')
|
||||
filter: publicFormatter('work_order_status')
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
|
213
src/views/report/glass/inputTable.vue
Normal file
213
src/views/report/glass/inputTable.vue
Normal file
@ -0,0 +1,213 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-12-13 14:10:04
|
||||
* @LastEditTime: 2023-12-14 10:18:20
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="edit = true">编辑</el-button>
|
||||
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="data"
|
||||
border
|
||||
show-summary
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
v-for="(item, index) in cols"
|
||||
:key="index" :prop="item.prop"
|
||||
:label="item.label"
|
||||
:align="item.align ? item.align : 'left'">
|
||||
<el-table-column
|
||||
v-for="(it, index1) in item.children"
|
||||
:key="index1"
|
||||
:prop="it.prop"
|
||||
:label="it.label"
|
||||
:align="item.align ? item.align : 'left'">
|
||||
<el-table-column
|
||||
v-for="(y, index2) in it.children"
|
||||
:key="index2"
|
||||
:prop="y.prop"
|
||||
:label="y.label">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
||||
<el-input v-else v-model.number="scope.row[y.prop]"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-input type="textarea" v-model="sum.remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}"></el-input>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
|
||||
|
||||
const cols = [
|
||||
{
|
||||
prop: 'xc',
|
||||
label: '许昌安彩周原片生产汇总',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '生产线',
|
||||
},
|
||||
{
|
||||
prop: 'm',
|
||||
label: '拉引量㎡',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'dailyOutputNow',
|
||||
label: '本周',
|
||||
},
|
||||
{
|
||||
prop: 'dailyOutputHis',
|
||||
label: '上周',
|
||||
},
|
||||
{
|
||||
prop: 'dailyOutputTrend',
|
||||
label: '增减',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'y',
|
||||
label: '原片合计(片/周)',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'originalGlassStatisticsNow',
|
||||
label: '本周',
|
||||
},
|
||||
{
|
||||
prop: 'originalGlassStatisticsHis',
|
||||
label: '上周',
|
||||
},
|
||||
{
|
||||
prop: 'originalGlassStatisticsTrend',
|
||||
label: '增减',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 's',
|
||||
label: '实际原片产量㎡',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'actualProductNow',
|
||||
label: '本周',
|
||||
},
|
||||
{
|
||||
prop: 'actualProductHis',
|
||||
label: '上周',
|
||||
},
|
||||
{
|
||||
prop: 'actualProductTrend',
|
||||
label: '增减',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'yield',
|
||||
label: '原片良品率',
|
||||
children: [
|
||||
{
|
||||
prop: 'originalGlassPassNow',
|
||||
label: '本周',
|
||||
},
|
||||
{
|
||||
prop: 'originalGlassPassHis ',
|
||||
label: '上周',
|
||||
},
|
||||
{
|
||||
prop: 'originalGlassPassTrend',
|
||||
label: '增减',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
time: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
sum: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 3,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols,
|
||||
edit: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
time: {
|
||||
immediate: true,
|
||||
handler(newv, oldv) {
|
||||
if (newv[0] !== '') {
|
||||
this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
|
||||
} else {
|
||||
this.cols[0].label = '许昌安彩周原片生产汇总'
|
||||
}
|
||||
}
|
||||
},
|
||||
type: {
|
||||
immediate: true,
|
||||
handler(newv, oldv) {
|
||||
let text1 = '', text2 = '', text3 = ''
|
||||
if (newv === 3) {
|
||||
text1 = '本周'
|
||||
text2 = '上周'
|
||||
text3 = '原片合计(片/周)'
|
||||
} else if (newv === 4) {
|
||||
text1 = '本月'
|
||||
text2 = '上月'
|
||||
text3 = '原片合计(片/月)'
|
||||
} else {
|
||||
text1 = '本年'
|
||||
text2 = '上年'
|
||||
text3 = '原片合计(片/年)'
|
||||
}
|
||||
this.cols[0].children[1].children[0].label = text1
|
||||
this.cols[0].children[1].children[1].label = text2
|
||||
this.cols[0].children[2].children[0].label = text1
|
||||
this.cols[0].children[2].children[1].label = text2
|
||||
this.cols[0].children[3].children[0].label = text1
|
||||
this.cols[0].children[3].children[1].label = text2
|
||||
this.cols[0].children[2].label = text3
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateData() {
|
||||
updateGlass(this.data).then(response => {
|
||||
updateGlassRemark(this.sum).then(res => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.edit = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
177
src/views/report/glass/month.vue
Normal file
177
src/views/report/glass/month.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="月" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="month"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
placeholder="选择月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
<!-- <pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getGlassPage,
|
||||
exportURL: exportGlasscExcel
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
reportType: 4,
|
||||
reportTime: []
|
||||
},
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
tableData: [],
|
||||
proLineList: [],
|
||||
all: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
const res = await getCorePLList();
|
||||
this.proLineList = res.data;
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
this.dataListLoading = true;
|
||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.filter(item => {
|
||||
this.proLineList.forEach(it => {
|
||||
if (item.lineId === it.id) {
|
||||
item.lineName = it.name
|
||||
}
|
||||
})
|
||||
if (item.det === false) {
|
||||
this.all = {
|
||||
id: item.id,
|
||||
remark: item.remark
|
||||
}
|
||||
}
|
||||
return item.det === true
|
||||
});
|
||||
this.listQuery.total = response.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
changeTime(val) {
|
||||
if(val) {
|
||||
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
||||
const fullyear = val.getFullYear()
|
||||
let days = 0
|
||||
switch (timeStamp) {
|
||||
case 0, 2, 4, 6, 7, 9, 11:
|
||||
days = 31
|
||||
break
|
||||
case 3, 4, 8, 10:
|
||||
days = 30
|
||||
break
|
||||
case 1:
|
||||
if ((fullyear % 400 === 0) || (fullyear() % 4 === 0 && fullyear() % 100 !== 0)) {
|
||||
days = 29
|
||||
} else {
|
||||
days = 28
|
||||
}
|
||||
}
|
||||
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1).getTime()); //开始时间
|
||||
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()); //结束时间
|
||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||
this.listQuery.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
} else {
|
||||
this.listQuery.reportTime = []
|
||||
}
|
||||
},
|
||||
|
||||
//时间戳转为yy-mm-dd hh:mm:ss
|
||||
timeFun(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '原片生产周报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .blueTip { */
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
.blueTip::before{
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8PX;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
198
src/views/report/glass/weekly.vue
Normal file
198
src/views/report/glass/weekly.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" /> -->
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="周" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="week"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}"
|
||||
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||
style="width: 350px"
|
||||
placeholder="选择周">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getGlassPage,
|
||||
exportURL: exportGlasscExcel
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
reportType: 3,
|
||||
reportTime: []
|
||||
},
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
tableData: [],
|
||||
proLineList: [],
|
||||
all: {},
|
||||
formConfig: [
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '周',
|
||||
dateType: 'week',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
width: 350,
|
||||
param: 'reportTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('report:glass-weekly:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// const day = new Date().getDay()
|
||||
// console.log('周四', day)
|
||||
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
await getCorePLList().then(res => {
|
||||
this.proLineList = res.data;
|
||||
// this.getDataList()
|
||||
});
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
this.dataListLoading = true;
|
||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.filter(item => {
|
||||
this.proLineList.forEach(it => {
|
||||
if (item.lineId === it.id) {
|
||||
item.lineName = it.name
|
||||
}
|
||||
})
|
||||
if (item.det === false) {
|
||||
this.all = {
|
||||
id: item.id,
|
||||
remark: item.remark
|
||||
}
|
||||
}
|
||||
return item.det === true
|
||||
});
|
||||
this.listQuery.total = response.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
changeTime(val) {
|
||||
if(val) {
|
||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 00:00:00').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 23:59:59').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
} else {
|
||||
this.listQuery.reportTime = []
|
||||
}
|
||||
},
|
||||
|
||||
//时间戳转为yy-mm-dd hh:mm:ss
|
||||
timeFun(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '原片生产周报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .blueTip { */
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
.blueTip::before{
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8PX;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
158
src/views/report/glass/year.vue
Normal file
158
src/views/report/glass/year.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="年" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="year"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}"
|
||||
:format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||
style="width: 350px"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getGlassPage,
|
||||
exportURL: exportGlasscExcel
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
reportType: 5,
|
||||
reportTime: []
|
||||
},
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
tableData: [],
|
||||
proLineList: [],
|
||||
all: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
const res = await getCorePLList();
|
||||
this.proLineList = res.data;
|
||||
},
|
||||
// 获取数据列表
|
||||
async getDataList() {
|
||||
this.dataListLoading = true;
|
||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data.filter(item => {
|
||||
this.proLineList.forEach(it => {
|
||||
if (item.lineId === it.id) {
|
||||
item.lineName = it.name
|
||||
}
|
||||
})
|
||||
if (item.det === false) {
|
||||
this.all = {
|
||||
id: item.id,
|
||||
remark: item.remark
|
||||
}
|
||||
}
|
||||
return item.det === true
|
||||
});
|
||||
this.listQuery.total = response.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
changeTime(val) {
|
||||
if(val) {
|
||||
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1).getTime()); //开始时间
|
||||
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
|
||||
this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||
} else {
|
||||
this.listQuery.reportTime = []
|
||||
}
|
||||
},
|
||||
|
||||
//时间戳转为yy-mm-dd hh:mm:ss
|
||||
timeFun(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '原片生产周报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .blueTip { */
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
.blueTip::before{
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8PX;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
@ -68,7 +68,6 @@ export default {
|
||||
}
|
||||
obj.name = item
|
||||
obj.type = 'line'
|
||||
obj.stack = 'Total'
|
||||
obj.symbol = 'none'
|
||||
obj.data = data
|
||||
seriesData.push(obj)
|
||||
@ -118,7 +117,7 @@ export default {
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
left: '4%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
|
@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
@ -35,13 +35,14 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'Voc',
|
||||
data(){
|
||||
return {
|
||||
realtimeList:[],
|
||||
queryParams:{
|
||||
checkType: 1,
|
||||
checkType: 3,
|
||||
timeDim: null,
|
||||
timeRange: []
|
||||
},
|
||||
@ -51,6 +52,9 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
@ -59,19 +63,21 @@ export default {
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
@ -35,6 +35,7 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'WasteGasManagement',
|
||||
data(){
|
||||
@ -51,6 +52,9 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
@ -59,19 +63,21 @@ export default {
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
<span>检测指标趋势图</span>
|
||||
</div>
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="getTrend"/>
|
||||
<search-area @submit="submitClick"/>
|
||||
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/>
|
||||
<!-- 没有数据 -->
|
||||
<div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div>
|
||||
@ -33,6 +33,7 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'WasteWaterManagement',
|
||||
data(){
|
||||
@ -49,27 +50,31 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
environmentalCheckRealtime({checkType: 1}).then(res => {
|
||||
console.log(res)
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user