Compare commits
2 Commits
981bb9e51e
...
118ad97a8d
Author | SHA1 | Date | |
---|---|---|---|
118ad97a8d | |||
4d805279c9 |
@ -135,6 +135,9 @@ public class DataQueryService implements IDataQueryService{
|
||||
String tableName = "gateway_fanuc_data";
|
||||
String columnName = "power_time,process_num,total_process,work_time";
|
||||
Map<String, Object> resultMap = getAllData2ChartData(equipId,tableName,columnName, startTime, endTime);
|
||||
if(resultMap == null){
|
||||
return null;
|
||||
}
|
||||
List<Double> workTimeList = (List<Double>) resultMap.get("work_time");
|
||||
List<Double> powerTimeList = (List<Double>) resultMap.get("power_time");
|
||||
resultMap.put("work_time", workTimeList.stream().map(w -> w / 60.0).collect(Collectors.toList()));
|
||||
|
@ -23,6 +23,9 @@ public class GatewayCardInfoPageReqVO extends PageParam {
|
||||
@Schema(description = "采集卡名称")
|
||||
private String cardName;
|
||||
|
||||
@Schema(description = "采集卡别名")
|
||||
private String cardAlias;
|
||||
|
||||
@Schema(description = "采集卡与influxdb映射表名")
|
||||
private String cardTableMapping;
|
||||
|
||||
|
@ -24,6 +24,9 @@ public class GatewayCardInfoSaveReqVO {
|
||||
@Schema(description = "采集卡名称")
|
||||
private String cardName;
|
||||
|
||||
@Schema(description = "采集卡别名")
|
||||
private String cardAlias;
|
||||
|
||||
@Schema(description = "采集卡与influxdb映射表名")
|
||||
private String cardTableMapping;
|
||||
|
||||
|
@ -30,6 +30,10 @@ public class GatewayCardParamsRespVO {
|
||||
@ExcelProperty("通道名称")
|
||||
private String channelName;
|
||||
|
||||
@Schema(description = "通道别名")
|
||||
@ExcelProperty("通道别名")
|
||||
private String channelAlias;
|
||||
|
||||
@Schema(description = "参数映射名称")
|
||||
@ExcelProperty("参数映射名称")
|
||||
private String paramMappingName;
|
||||
|
@ -24,6 +24,9 @@ public class GatewayCardParamsSaveReqVO {
|
||||
@Schema(description = "通道名称")
|
||||
private String channelName;
|
||||
|
||||
@Schema(description = "通道别名")
|
||||
private String channelAlias;
|
||||
|
||||
@Schema(description = "参数映射名称")
|
||||
private String paramMappingName;
|
||||
|
||||
|
@ -23,6 +23,11 @@ public class EquipInfoDetailsVO {
|
||||
*/
|
||||
private String equipNo;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String equipName;
|
||||
|
||||
/**
|
||||
* 客户信息id
|
||||
*/
|
||||
@ -48,6 +53,11 @@ public class EquipInfoDetailsVO {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 机床运行状态
|
||||
*/
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 技术参数
|
||||
*/
|
||||
|
@ -22,4 +22,6 @@ public class EquipInfoPageReqVO extends PageParam {
|
||||
@Schema(description = "机床状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "机床运行状态")
|
||||
private Integer runStatus;
|
||||
}
|
@ -37,6 +37,10 @@ public class EquipInfoRespVO {
|
||||
@ExcelProperty("机床设备编号")
|
||||
private String equipNo;
|
||||
|
||||
@Schema(description = "机床设备名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("机床设备名称")
|
||||
private String equipName;
|
||||
|
||||
@Schema(description = "生产日期")
|
||||
@ExcelProperty("生产日期")
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
|
@ -31,6 +31,10 @@ public class EquipInfoSaveReqVO {
|
||||
@Size(message = "机床设备编号最大不允许超过30个字符", max = 30)
|
||||
private String equipNo;
|
||||
|
||||
@Schema(description = "机床设备名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Size(message = "机床设备名称不允许超过50个字符", max = 30)
|
||||
private String equipName;
|
||||
|
||||
@Schema(description = "生产日期")
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private Date productDate;
|
||||
|
@ -38,6 +38,12 @@ public class EquipInfoDO extends BaseDO {
|
||||
* 客户信息id
|
||||
*/
|
||||
private String customerId;
|
||||
|
||||
/**
|
||||
* 机床设备名称
|
||||
*/
|
||||
private String equipName;
|
||||
|
||||
/**
|
||||
* 机床设备编号
|
||||
*/
|
||||
@ -59,6 +65,12 @@ public class EquipInfoDO extends BaseDO {
|
||||
*
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 机床运行状态
|
||||
*/
|
||||
private Integer runStatus;
|
||||
|
||||
/**
|
||||
* 二维码图片路径
|
||||
*/
|
||||
|
@ -41,6 +41,12 @@ public class GatewayCardInfoDO extends BaseDO {
|
||||
* 采集卡名称
|
||||
*/
|
||||
private String cardName;
|
||||
|
||||
/**
|
||||
* 采集卡别名
|
||||
*/
|
||||
private String cardAlias;
|
||||
|
||||
/**
|
||||
* 采集卡与influxdb映射表名
|
||||
*/
|
||||
|
@ -41,6 +41,12 @@ public class GatewayCardParamsDO extends BaseDO {
|
||||
* 通道名称
|
||||
*/
|
||||
private String channelName;
|
||||
|
||||
/**
|
||||
* 通道别名
|
||||
*/
|
||||
private String channelAlias;
|
||||
|
||||
/**
|
||||
* 参数映射名称
|
||||
*/
|
||||
|
@ -45,6 +45,7 @@ public class EquipInfoServiceImpl implements EquipInfoService {
|
||||
public String createEquipInfo(EquipInfoSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
EquipInfoDO equipInfo = BeanUtils.toBean(createReqVO, EquipInfoDO.class);
|
||||
equipInfo.setRunStatus(0);//新增设备默认正常
|
||||
equipInfoMapper.insert(equipInfo);
|
||||
// 返回
|
||||
return equipInfo.getEquipId();
|
||||
|
@ -1,68 +1,163 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="150px">
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:visible.sync="dialogVisible"
|
||||
width="45%"
|
||||
v-dialogDrag
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
v-loading="formLoading"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机床型号" prop="modelId">
|
||||
<el-select v-model="formData.modelId" placeholder="请选择机床型号" style="width: 100%">
|
||||
<el-option v-for="item in modelSelection"
|
||||
:key="item.modelId" :label="item.modelName" :value="item.modelId"/>
|
||||
<el-form-item
|
||||
label="机床型号"
|
||||
prop="modelId"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.modelId"
|
||||
placeholder="请选择机床型号"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in modelSelection"
|
||||
:key="item.modelId"
|
||||
:label="item.modelName"
|
||||
:value="item.modelId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户信息" prop="customerId">
|
||||
<el-select v-model="formData.customerId" placeholder="请选择客户信息" style="width: 100%">
|
||||
<el-option v-for="item in customerSelection"
|
||||
:key="item.customerId" :label="item.customerName" :value="item.customerId"/>
|
||||
<el-form-item
|
||||
label="客户信息"
|
||||
prop="customerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.customerId"
|
||||
placeholder="请选择客户信息"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerSelection"
|
||||
:key="item.customerId"
|
||||
:label="item.customerName"
|
||||
:value="item.customerId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机床设备编号" prop="equipNo">
|
||||
<el-input v-model="formData.equipNo" placeholder="请输入机床设备编号"/>
|
||||
<el-form-item
|
||||
label="机床设备名称"
|
||||
prop="equipName"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.equipName"
|
||||
placeholder="请输入机床设备名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产日期" prop="productDate">
|
||||
<el-date-picker clearable v-model="formData.productDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择生产日期" style="width: 100%"/>
|
||||
<el-form-item
|
||||
label="机床设备编号"
|
||||
prop="equipNo"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.equipNo"
|
||||
placeholder="请输入机床设备编号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出厂日期/购买日期" prop="purchaseDate">
|
||||
<el-date-picker clearable v-model="formData.purchaseDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择出厂日期/购买日期" style="width: 100%"/>
|
||||
<el-form-item
|
||||
label="生产日期"
|
||||
prop="productDate"
|
||||
>
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="formData.productDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择生产日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="保修到期日期" prop="expireDate">
|
||||
<el-date-picker clearable v-model="formData.expireDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择保修到期日期" style="width: 100%"/>
|
||||
<el-form-item
|
||||
label="出厂日期/购买日期"
|
||||
prop="purchaseDate"
|
||||
>
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="formData.purchaseDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择出厂日期/购买日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item label="机床状态" prop="status">-->
|
||||
<!-- <el-select v-model="formData.status" placeholder="请选择机床状态" style="width: 100%">-->
|
||||
<!-- <el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQUIP_STATUS)"-->
|
||||
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" :rows="4" placeholder="请输入备注"/>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="保修到期日期"
|
||||
prop="expireDate"
|
||||
>
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="formData.expireDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择保修到期日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item label="机床状态" prop="status">-->
|
||||
<!-- <el-select v-model="formData.status" placeholder="请选择机床状态" style="width: 100%">-->
|
||||
<!-- <el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQUIP_STATUS)"-->
|
||||
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item
|
||||
label="备注"
|
||||
prop="remark"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入备注"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="二维码图片">
|
||||
<ImageUpload v-model="formData.qrcodePicPath"/>
|
||||
<ImageUpload v-model="formData.qrcodePicPath" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
:disabled="formLoading"
|
||||
>确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -70,10 +165,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as EquipInfoApi from '@/api/system/equip/equipInfo';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
import {getCustomerSelection} from '@/api/system/baseData/customerInfo';
|
||||
import {getModelSelection} from '@/api/system/baseData/modelinfo';
|
||||
import * as EquipInfoApi from "@/api/system/equip/equipInfo";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
import { getCustomerSelection } from "@/api/system/baseData/customerInfo";
|
||||
import { getModelSelection } from "@/api/system/baseData/modelinfo";
|
||||
|
||||
export default {
|
||||
name: "EquipInfoForm",
|
||||
@ -82,8 +177,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customerSelection:[],
|
||||
modelSelection:[],
|
||||
customerSelection: [],
|
||||
modelSelection: [],
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
@ -96,6 +191,7 @@ export default {
|
||||
modelId: undefined,
|
||||
customerId: undefined,
|
||||
equipNo: undefined,
|
||||
equipName: undefined,
|
||||
productDate: undefined,
|
||||
purchaseDate: undefined,
|
||||
expireDate: undefined,
|
||||
@ -105,20 +201,36 @@ export default {
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
modelId: [{required: true, message: '机床型号不能为空', trigger: 'change'}],
|
||||
customerId: [{required: true, message: '客户信息不能为空', trigger: 'change'}],
|
||||
equipNo: [{required: true, message: '机床设备编号不能为空', trigger: 'blur'}],
|
||||
status: [{ required: true, message: '机床状态不能为空', trigger: 'change' }],
|
||||
modelId: [
|
||||
{ required: true, message: "机床型号不能为空", trigger: "change" },
|
||||
],
|
||||
customerId: [
|
||||
{ required: true, message: "客户信息不能为空", trigger: "change" },
|
||||
],
|
||||
equipNo: [
|
||||
{ required: true, message: "机床设备编号不能为空", trigger: "blur" },
|
||||
],
|
||||
equipName: [
|
||||
{ required: true, message: "机床设备名称不能为空", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
message: "机床设备名称长度在50个字符以内",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "机床状态不能为空", trigger: "change" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getCustomerSelection().then(res=>{
|
||||
getCustomerSelection().then((res) => {
|
||||
this.customerSelection = res;
|
||||
})
|
||||
getModelSelection().then(res=>{
|
||||
});
|
||||
getModelSelection().then((res) => {
|
||||
this.modelSelection = res;
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
@ -150,14 +262,14 @@ export default {
|
||||
await EquipInfoApi.updateEquipInfo(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
this.$emit("success");
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await EquipInfoApi.createEquipInfo(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
this.$emit("success");
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
@ -177,7 +289,7 @@ export default {
|
||||
remark: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,104 +1,250 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="机床型号" prop="modelId">
|
||||
<el-select v-model="queryParams.modelId" placeholder="请选择机床型号" clearable size="small">
|
||||
<el-option v-for="item in modelSelection"
|
||||
:key="item.modelId" :label="item.modelName" :value="item.modelId"/>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item
|
||||
label="机床型号"
|
||||
prop="modelId"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.modelId"
|
||||
placeholder="请选择机床型号"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in modelSelection"
|
||||
:key="item.modelId"
|
||||
:label="item.modelName"
|
||||
:value="item.modelId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户信息" prop="customerId">
|
||||
<el-select v-model="queryParams.customerId" placeholder="请选择客户信息" clearable size="small">
|
||||
<el-option v-for="item in customerSelection"
|
||||
:key="item.customerId" :label="item.customerName" :value="item.customerId"/>
|
||||
<el-form-item
|
||||
label="客户信息"
|
||||
prop="customerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.customerId"
|
||||
placeholder="请选择客户信息"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerSelection"
|
||||
:key="item.customerId"
|
||||
:label="item.customerName"
|
||||
:value="item.customerId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机床设备编号" prop="equipNo">
|
||||
<el-input v-model="queryParams.equipNo" placeholder="请输入机床设备编号" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
<el-form-item
|
||||
label="机床设备编号"
|
||||
prop="equipNo"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.equipNo"
|
||||
placeholder="请输入机床设备编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机床状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择机床状态" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQUIP_STATUS)"
|
||||
:key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
<el-form-item
|
||||
label="机床状态"
|
||||
prop="status"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择机床状态"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.EQUIP_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row
|
||||
:gutter="10"
|
||||
class="mb8"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['imt:equip-info:create']">新增
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="openForm(undefined)"
|
||||
v-hasPermi="['imt:equip-info:create']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['imt:equip-info:export']">导出
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['imt:equip-info:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="机床设备编号" align="center" prop="equipNo"/>
|
||||
<el-table-column label="机床型号" align="center" prop="modelName"/>
|
||||
<el-table-column label="客户信息" align="center" prop="customerName"/>
|
||||
<el-table-column label="生产日期" align="center" prop="productDate" width="180"/>
|
||||
<el-table-column label="出厂日期/购买日期" align="center" prop="purchaseDate" width="180"/>
|
||||
<el-table-column label="保修到期日期" align="center" prop="expireDate" width="180"/>
|
||||
<el-table-column label="机床状态" align="center" prop="status">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
:stripe="true"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column
|
||||
label="机床设备编号"
|
||||
align="center"
|
||||
prop="equipNo"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机床设备名称"
|
||||
align="center"
|
||||
prop="equipName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机床型号"
|
||||
align="center"
|
||||
prop="modelName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="客户信息"
|
||||
align="center"
|
||||
prop="customerName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产日期"
|
||||
align="center"
|
||||
prop="productDate"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出厂日期/购买日期"
|
||||
align="center"
|
||||
prop="purchaseDate"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="保修到期日期"
|
||||
align="center"
|
||||
prop="expireDate"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机床状态"
|
||||
align="center"
|
||||
prop="status"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.EQUIP_STATUS" :value="scope.row.status"/>
|
||||
<dict-tag
|
||||
:type="DICT_TYPE.EQUIP_STATUS"
|
||||
:value="scope.row.status"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="二维码" align="center" prop="qrcodePicPath">
|
||||
<!-- <el-table-column label="二维码" align="center" prop="qrcodePicPath">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.qrcodePicPath == null || scope.row.qrcodePicPath === ''">-</span>
|
||||
<!-- <img-->
|
||||
<!-- :src="scope.row.qrcodePicPath"-->
|
||||
<!-- style="display: block; width: 100px; height: 100px; margin: 0 auto"-->
|
||||
<!-- />-->
|
||||
<el-image v-else
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.qrcodePicPath"
|
||||
:preview-src-list="[scope.row.qrcodePicPath]"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.equipId)"
|
||||
v-hasPermi="['imt:equip-info:update']">修改
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="openForm(scope.row.equipId)"
|
||||
v-hasPermi="['imt:equip-info:update']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['imt:equip-info:delete']">删除
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['imt:equip-info:delete']"
|
||||
>删除
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDetails(scope.row.equipId)"
|
||||
v-hasPermi="['imt:equip-info:query']">设备详情
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDetails(scope.row.equipId)"
|
||||
v-hasPermi="['imt:equip-info:query']"
|
||||
>设备详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<EquipInfoForm ref="formRef" @success="getList"/>
|
||||
<EquipInfoForm
|
||||
ref="formRef"
|
||||
@success="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as EquipInfoApi from '@/api/system/equip/equipInfo';
|
||||
import {getCustomerSelection} from '@/api/system/baseData/customerInfo';
|
||||
import {getModelSelection} from '@/api/system/baseData/modelinfo';
|
||||
import EquipInfoForm from './EquipInfoForm.vue';
|
||||
import * as EquipInfoApi from "@/api/system/equip/equipInfo";
|
||||
import { getCustomerSelection } from "@/api/system/baseData/customerInfo";
|
||||
import { getModelSelection } from "@/api/system/baseData/modelinfo";
|
||||
import EquipInfoForm from "./EquipInfoForm.vue";
|
||||
|
||||
export default {
|
||||
name: "EquipInfo",
|
||||
@ -107,8 +253,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customerSelection:[],
|
||||
modelSelection:[],
|
||||
customerSelection: [],
|
||||
modelSelection: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
@ -138,16 +284,19 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
getCustomerSelection().then(res=>{
|
||||
getCustomerSelection().then((res) => {
|
||||
this.customerSelection = res;
|
||||
})
|
||||
getModelSelection().then(res=>{
|
||||
});
|
||||
getModelSelection().then((res) => {
|
||||
this.modelSelection = res;
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleDetails(equipId){
|
||||
this.$router.push({ path: "/equip/equipdetails", query: { equipId: equipId}});
|
||||
handleDetails(equipId) {
|
||||
this.$router.push({
|
||||
path: "/equip/equipdetails",
|
||||
query: { equipId: equipId },
|
||||
});
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
@ -177,26 +326,27 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const equipId = row.equipId;
|
||||
await this.$modal.confirm('是否确认删除设备编号编号为"' + row.equipNo + '"的数据项?')
|
||||
await this.$modal.confirm(
|
||||
'是否确认删除设备编号编号为"' + row.equipNo + '"的数据项?'
|
||||
);
|
||||
try {
|
||||
await EquipInfoApi.deleteEquipInfo(equipId);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch {
|
||||
}
|
||||
} catch {}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有机床信息数据项?');
|
||||
await this.$modal.confirm("是否确认导出所有机床信息数据项?");
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await EquipInfoApi.exportEquipInfoExcel(this.queryParams);
|
||||
this.$download.excel(data, '机床信息.xls');
|
||||
this.$download.excel(data, "机床信息.xls");
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -68,6 +68,24 @@
|
||||
<span class="con-prop">{{ item.workTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="item.status == 0"
|
||||
class="content"
|
||||
style="margin-top:5%"
|
||||
>
|
||||
<div class="equ-content">
|
||||
<span class="con-name">今日工作时间</span>
|
||||
<span class="con-prop">{{ item.dailyWorkTime + "小时" }} </span>
|
||||
</div>
|
||||
<div class="equ-content">
|
||||
<span class="con-name">今日加工件数</span>
|
||||
<span class="con-prop">{{ item.dailyProcessNum + "件" }} </span>
|
||||
</div>
|
||||
<div class="equ-content">
|
||||
<span class="con-name">今日效率</span>
|
||||
<span class="con-prop">{{ item.dailyEffect +"件/每小时" }} </span>
|
||||
</div>
|
||||
</div>
|
||||
<el-card
|
||||
v-if="item.status == 2"
|
||||
style="margin-top:15px"
|
||||
@ -120,6 +138,9 @@ export default {
|
||||
processNum: 100,
|
||||
workTime: "08:30:21",
|
||||
maintananceStatus: 1,
|
||||
dailyWorkTime: 7.6,
|
||||
dailyProcessNum: 238,
|
||||
dailyEffect: 31.3,
|
||||
},
|
||||
{
|
||||
modelName: "QB18043",
|
||||
@ -131,6 +152,9 @@ export default {
|
||||
processNum: 100,
|
||||
workTime: "03:24:11",
|
||||
maintananceStatus: 2,
|
||||
dailyWorkTime: 7.6,
|
||||
dailyProcessNum: 238,
|
||||
dailyEffect: 31.3,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user