新增缺陷检测
This commit is contained in:
parent
db3ca977d8
commit
af16b0b3d2
@ -66,7 +66,79 @@ public class MachineVisionDefectDetection extends BaseEntity
|
|||||||
@Excel(name = "接口")
|
@Excel(name = "接口")
|
||||||
private String interfaceType;
|
private String interfaceType;
|
||||||
|
|
||||||
public void setId(String id)
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colSeven;
|
||||||
|
|
||||||
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colEight;
|
||||||
|
|
||||||
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colNine;
|
||||||
|
|
||||||
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colTen;
|
||||||
|
|
||||||
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colEleven;
|
||||||
|
|
||||||
|
/** 字段 */
|
||||||
|
@Excel(name = "字段")
|
||||||
|
private String colTwelve;
|
||||||
|
|
||||||
|
public String getColSeven() {
|
||||||
|
return colSeven;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColSeven(String colSeven) {
|
||||||
|
this.colSeven = colSeven;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColEight() {
|
||||||
|
return colEight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColEight(String colEight) {
|
||||||
|
this.colEight = colEight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColNine() {
|
||||||
|
return colNine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColNine(String colNine) {
|
||||||
|
this.colNine = colNine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColTen() {
|
||||||
|
return colTen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColTen(String colTen) {
|
||||||
|
this.colTen = colTen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColEleven() {
|
||||||
|
return colEleven;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColEleven(String colEleven) {
|
||||||
|
this.colEleven = colEleven;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColTwelve() {
|
||||||
|
return colTwelve;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColTwelve(String colTwelve) {
|
||||||
|
this.colTwelve = colTwelve;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
@ -5,46 +5,56 @@
|
|||||||
<mapper namespace="com.god.machineVision.mapper.MachineVisionDefectDetectionMapper">
|
<mapper namespace="com.god.machineVision.mapper.MachineVisionDefectDetectionMapper">
|
||||||
|
|
||||||
<resultMap type="MachineVisionDefectDetection" id="MachineVisionDefectDetectionResult">
|
<resultMap type="MachineVisionDefectDetection" id="MachineVisionDefectDetectionResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id" />
|
||||||
<result property="imageId" column="image_id"/>
|
<result property="imageId" column="image_id" />
|
||||||
<result property="position" column="position"/>
|
<result property="position" column="position" />
|
||||||
<result property="grayScale" column="gray_scale"/>
|
<result property="grayScale" column="gray_scale" />
|
||||||
<result property="zoom" column="zoom"/>
|
<result property="zoom" column="zoom" />
|
||||||
<result property="roi" column="roi"/>
|
<result property="roi" column="roi" />
|
||||||
<result property="colOne" column="col_one"/>
|
<result property="colOne" column="col_one" />
|
||||||
<result property="colTwo" column="col_two"/>
|
<result property="colTwo" column="col_two" />
|
||||||
<result property="colThree" column="col_three"/>
|
<result property="colThree" column="col_three" />
|
||||||
<result property="colFour" column="col_four"/>
|
<result property="colFour" column="col_four" />
|
||||||
<result property="colFive" column="col_five"/>
|
<result property="colFive" column="col_five" />
|
||||||
<result property="colSix" column="col_six"/>
|
<result property="colSix" column="col_six" />
|
||||||
<result property="interfaceType" column="interface_type"/>
|
<result property="interfaceType" column="interface_type" />
|
||||||
|
<result property="colSeven" column="col_seven" />
|
||||||
|
<result property="colEight" column="col_eight" />
|
||||||
|
<result property="colNine" column="col_nine" />
|
||||||
|
<result property="colTen" column="col_ten" />
|
||||||
|
<result property="colEleven" column="col_eleven" />
|
||||||
|
<result property="colTwelve" column="col_twelve" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectMachineVisionDefectDetectionVo">
|
<sql id="selectMachineVisionDefectDetectionVo">
|
||||||
select id, image_id, position, gray_scale, zoom, roi, col_one, col_two, col_three, col_four, col_five, col_six, interface_type from machine_vision_defect_detection
|
select id, image_id, position, gray_scale, zoom, roi, col_one, col_two, col_three, col_four, col_five, col_six, interface_type, col_seven, col_eight, col_nine, col_ten, col_eleven, col_twelve from machine_vision_defect_detection
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectMachineVisionDefectDetectionList" parameterType="MachineVisionDefectDetection"
|
<select id="selectMachineVisionDefectDetectionList" parameterType="MachineVisionDefectDetection" resultMap="MachineVisionDefectDetectionResult">
|
||||||
resultMap="MachineVisionDefectDetectionResult">
|
|
||||||
<include refid="selectMachineVisionDefectDetectionVo"/>
|
<include refid="selectMachineVisionDefectDetectionVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="imageId != null and imageId != ''">and image_id = #{imageId}</if>
|
<if test="imageId != null and imageId != ''"> and image_id = #{imageId}</if>
|
||||||
<if test="position != null and position != ''">and position = #{position}</if>
|
<if test="position != null and position != ''"> and position = #{position}</if>
|
||||||
<if test="grayScale != null and grayScale != ''">and gray_scale = #{grayScale}</if>
|
<if test="grayScale != null and grayScale != ''"> and gray_scale = #{grayScale}</if>
|
||||||
<if test="zoom != null and zoom != ''">and zoom = #{zoom}</if>
|
<if test="zoom != null and zoom != ''"> and zoom = #{zoom}</if>
|
||||||
<if test="roi != null and roi != ''">and roi = #{roi}</if>
|
<if test="roi != null and roi != ''"> and roi = #{roi}</if>
|
||||||
<if test="colOne != null and colOne != ''">and col_one = #{colOne}</if>
|
<if test="colOne != null and colOne != ''"> and col_one = #{colOne}</if>
|
||||||
<if test="colTwo != null and colTwo != ''">and col_two = #{colTwo}</if>
|
<if test="colTwo != null and colTwo != ''"> and col_two = #{colTwo}</if>
|
||||||
<if test="colThree != null and colThree != ''">and col_three = #{colThree}</if>
|
<if test="colThree != null and colThree != ''"> and col_three = #{colThree}</if>
|
||||||
<if test="colFour != null and colFour != ''">and col_four = #{colFour}</if>
|
<if test="colFour != null and colFour != ''"> and col_four = #{colFour}</if>
|
||||||
<if test="colFive != null and colFive != ''">and col_five = #{colFive}</if>
|
<if test="colFive != null and colFive != ''"> and col_five = #{colFive}</if>
|
||||||
<if test="colSix != null and colSix != ''">and col_six = #{colSix}</if>
|
<if test="colSix != null and colSix != ''"> and col_six = #{colSix}</if>
|
||||||
<if test="interfaceType != null and interfaceType != ''">and interface_type = #{interfaceType}</if>
|
<if test="interfaceType != null and interfaceType != ''"> and interface_type = #{interfaceType}</if>
|
||||||
|
<if test="colSeven != null and colSeven != ''"> and col_seven = #{colSeven}</if>
|
||||||
|
<if test="colEight != null and colEight != ''"> and col_eight = #{colEight}</if>
|
||||||
|
<if test="colNine != null and colNine != ''"> and col_nine = #{colNine}</if>
|
||||||
|
<if test="colTen != null and colTen != ''"> and col_ten = #{colTen}</if>
|
||||||
|
<if test="colEleven != null and colEleven != ''"> and col_eleven = #{colEleven}</if>
|
||||||
|
<if test="colTwelve != null and colTwelve != ''"> and col_twelve = #{colTwelve}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMachineVisionDefectDetectionById" parameterType="String"
|
<select id="selectMachineVisionDefectDetectionById" parameterType="String" resultMap="MachineVisionDefectDetectionResult">
|
||||||
resultMap="MachineVisionDefectDetectionResult">
|
|
||||||
<include refid="selectMachineVisionDefectDetectionVo"/>
|
<include refid="selectMachineVisionDefectDetectionVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
@ -65,6 +75,12 @@
|
|||||||
<if test="colFive != null">col_five,</if>
|
<if test="colFive != null">col_five,</if>
|
||||||
<if test="colSix != null">col_six,</if>
|
<if test="colSix != null">col_six,</if>
|
||||||
<if test="interfaceType != null">interface_type,</if>
|
<if test="interfaceType != null">interface_type,</if>
|
||||||
|
<if test="colSeven != null">col_seven,</if>
|
||||||
|
<if test="colEight != null">col_eight,</if>
|
||||||
|
<if test="colNine != null">col_nine,</if>
|
||||||
|
<if test="colTen != null">col_ten,</if>
|
||||||
|
<if test="colEleven != null">col_eleven,</if>
|
||||||
|
<if test="colTwelve != null">col_twelve,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@ -80,6 +96,12 @@
|
|||||||
<if test="colFive != null">#{colFive},</if>
|
<if test="colFive != null">#{colFive},</if>
|
||||||
<if test="colSix != null">#{colSix},</if>
|
<if test="colSix != null">#{colSix},</if>
|
||||||
<if test="interfaceType != null">#{interfaceType},</if>
|
<if test="interfaceType != null">#{interfaceType},</if>
|
||||||
|
<if test="colSeven != null">#{colSeven},</if>
|
||||||
|
<if test="colEight != null">#{colEight},</if>
|
||||||
|
<if test="colNine != null">#{colNine},</if>
|
||||||
|
<if test="colTen != null">#{colTen},</if>
|
||||||
|
<if test="colEleven != null">#{colEleven},</if>
|
||||||
|
<if test="colTwelve != null">#{colTwelve},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -98,6 +120,12 @@
|
|||||||
<if test="colFive != null">col_five = #{colFive},</if>
|
<if test="colFive != null">col_five = #{colFive},</if>
|
||||||
<if test="colSix != null">col_six = #{colSix},</if>
|
<if test="colSix != null">col_six = #{colSix},</if>
|
||||||
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
|
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
|
||||||
|
<if test="colSeven != null">col_seven = #{colSeven},</if>
|
||||||
|
<if test="colEight != null">col_eight = #{colEight},</if>
|
||||||
|
<if test="colNine != null">col_nine = #{colNine},</if>
|
||||||
|
<if test="colTen != null">col_ten = #{colTen},</if>
|
||||||
|
<if test="colEleven != null">col_eleven = #{colEleven},</if>
|
||||||
|
<if test="colTwelve != null">col_twelve = #{colTwelve},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
360
god-ui/src/views/machineVision/blobAnalysis/index.vue
Normal file
360
god-ui/src/views/machineVision/blobAnalysis/index.vue
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
<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="grayScale">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.grayScale"
|
||||||
|
placeholder="请输入检测编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob重心" prop="zoom">
|
||||||
|
<el-select v-model="queryParams.zoom" placeholder="请选择Blob重心" style="width: 100%;" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.machinevision_detection_io"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob大小" prop="position">
|
||||||
|
<el-select v-model="queryParams.position" placeholder="请选择Blob大小" style="width: 100%;" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.machinevision_detection_interface_type"
|
||||||
|
: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" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<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-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="detectionList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="检测编号" align="center" prop="grayScale" width="150"/>
|
||||||
|
<el-table-column label="Blob重心" align="center" prop="zoom" width="100">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="Blob大小" align="center" prop="position" >
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="Blob方向" align="center" prop="colOne" />
|
||||||
|
<el-table-column label="Blob孔洞数" align="center" prop="roi" width="100"/>
|
||||||
|
<!--<el-table-column label="传输图像" align="center" prop="imageId" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<image-preview :src="scope.row.imageId" :width="50" :height="50"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="Blob孔洞填充" align="center" prop="colTwo" width="110"/>
|
||||||
|
<el-table-column label="Blob筛选" align="center" prop="colThree" />
|
||||||
|
<el-table-column label="有无判断" align="center" prop="colFour" />
|
||||||
|
<el-table-column label="划痕检测" align="center" prop="colFive" />
|
||||||
|
<el-table-column label="边缘检测" align="center" prop="colSix" />
|
||||||
|
<el-table-column label="轮廓序列处理" align="center" prop="colSeven" width="110"/>
|
||||||
|
<el-table-column label="变量模型" align="center" prop="colEight" />
|
||||||
|
<el-table-column label="轮廓度" align="center" prop="colNine" />
|
||||||
|
<el-table-column label="轮廓对比" align="center" prop="colTen" />
|
||||||
|
<el-table-column label="崩边检测" align="center" prop="colEleven" />
|
||||||
|
<el-table-column label="时间" align="center" prop="colTwelve" width="150"/>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||||
|
<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"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改缺陷监测表面检测Blob分析对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="检测编号" prop="grayScale">
|
||||||
|
<el-input v-model="form.grayScale" placeholder="请输入检测编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob重心" prop="zoom">
|
||||||
|
<el-input v-model="form.zoom" placeholder="请输入Blob重心" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob大小" prop="position">
|
||||||
|
<el-input v-model="form.position" placeholder="请输入Blob大小" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob方向" prop="colOne">
|
||||||
|
<el-input v-model="form.colOne" placeholder="请输入Blob方向" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob孔洞数" prop="roi">
|
||||||
|
<el-input v-model="form.roi" placeholder="请输入Blob孔洞数" />
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="传输图像" prop="imageId">
|
||||||
|
<image-upload v-model="form.imageId"/>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="Blob孔洞填充" prop="colTwo">
|
||||||
|
<el-input v-model="form.colTwo" placeholder="请输入Blob孔洞填充" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Blob筛选" prop="colThree">
|
||||||
|
<el-input v-model="form.colThree" placeholder="请输入Blob筛选" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有无判断" prop="colFour">
|
||||||
|
<el-input v-model="form.colFour" placeholder="请输入有无判断" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="划痕检测" prop="colFive">
|
||||||
|
<el-input v-model="form.colFive" placeholder="请输入划痕检测" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="边缘检测" prop="colSix">
|
||||||
|
<el-input v-model="form.colSix" placeholder="请输入边缘检测" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="轮廓序列处理" prop="colSeven">
|
||||||
|
<el-input v-model="form.colSeven" placeholder="请输入轮廓序列处理" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变量模型" prop="colEight">
|
||||||
|
<el-input v-model="form.colEight" placeholder="请输入变量模型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="轮廓度" prop="colNine">
|
||||||
|
<el-input v-model="form.colNine" placeholder="请输入轮廓度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="轮廓对比" prop="colTen">
|
||||||
|
<el-input v-model="form.colTen" placeholder="请输入轮廓对比" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="崩边检测" prop="colEleven">
|
||||||
|
<el-input v-model="form.colEleven" placeholder="请输入崩边检测" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时间" prop="colTwelve">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.colTwelve"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择时间"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</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 { listDetection, getDetection, delDetection, addDetection, updateDetection } from "@/api/machineVision/detection";
|
||||||
|
const interfaceType = "BlobAnalysis"
|
||||||
|
export default {
|
||||||
|
name: "Detection",
|
||||||
|
dicts: ['machinevision_detection_io', 'machinevision_detection_interface_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 缺陷监测表面检测Blob分析表格数据
|
||||||
|
detectionList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
imageId: null,
|
||||||
|
position: null,
|
||||||
|
grayScale: null,
|
||||||
|
zoom: null,
|
||||||
|
roi: null,
|
||||||
|
colOne: null,
|
||||||
|
colTwo: null,
|
||||||
|
colThree: null,
|
||||||
|
colFour: null,
|
||||||
|
colFive: null,
|
||||||
|
colSix: null,
|
||||||
|
interfaceType: interfaceType,
|
||||||
|
colSeven: null,
|
||||||
|
colEight: null,
|
||||||
|
colNine: null,
|
||||||
|
colTen: null,
|
||||||
|
colEleven: null,
|
||||||
|
colTwelve: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询缺陷监测表面检测Blob分析列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listDetection(this.queryParams).then(response => {
|
||||||
|
this.detectionList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
imageId: null,
|
||||||
|
position: null,
|
||||||
|
grayScale: null,
|
||||||
|
zoom: null,
|
||||||
|
roi: null,
|
||||||
|
colOne: null,
|
||||||
|
colTwo: null,
|
||||||
|
colThree: null,
|
||||||
|
colFour: null,
|
||||||
|
colFive: null,
|
||||||
|
colSix: null,
|
||||||
|
interfaceType: interfaceType,
|
||||||
|
colSeven: null,
|
||||||
|
colEight: null,
|
||||||
|
colNine: null,
|
||||||
|
colTen: null,
|
||||||
|
colEleven: null,
|
||||||
|
colTwelve: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加缺陷监测表面检测Blob分析";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getDetection(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改缺陷监测表面检测Blob分析";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateDetection(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addDetection(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除缺陷监测表面检测Blob分析编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delDetection(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('machineVision/detection/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `detection_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user