Merge branch 'main' of http://117.73.11.115:3000/Tony/god-ytr into zhoumingxiu

This commit is contained in:
zhoumingxiu 2024-01-12 08:43:18 +08:00
commit 18fc1e962c
11 changed files with 1459 additions and 4 deletions

View File

@ -0,0 +1,98 @@
package com.god.web.controller.qcfgjManage;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.god.common.annotation.Log;
import com.god.common.core.controller.BaseController;
import com.god.common.core.domain.AjaxResult;
import com.god.common.enums.BusinessType;
import com.god.qcfgjManage.domain.QcfgjProductAllDock;
import com.god.qcfgjManage.service.IQcfgjProductAllDockService;
import com.god.common.utils.poi.ExcelUtil;
import com.god.common.core.page.TableDataInfo;
/**
* 产品数据信息对接Controller
*
* @author wangyan
* @date 2024-01-11
*/
@RestController
@RequestMapping("/qcfgjManage/dock")
public class QcfgjProductAllDockController extends BaseController {
@Autowired
private IQcfgjProductAllDockService qcfgjProductAllDockService;
/**
* 查询产品数据信息对接列表
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:list')")
@GetMapping("/list")
public TableDataInfo list(QcfgjProductAllDock qcfgjProductAllDock) {
startPage();
List<QcfgjProductAllDock> list = qcfgjProductAllDockService.selectQcfgjProductAllDockList(qcfgjProductAllDock);
return getDataTable(list);
}
/**
* 导出产品数据信息对接列表
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:export')")
@Log(title = "产品数据信息对接", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcfgjProductAllDock qcfgjProductAllDock) {
List<QcfgjProductAllDock> list = qcfgjProductAllDockService.selectQcfgjProductAllDockList(qcfgjProductAllDock);
ExcelUtil<QcfgjProductAllDock> util = new ExcelUtil<QcfgjProductAllDock>(QcfgjProductAllDock.class);
util.exportExcel(response, list, "产品数据信息对接数据");
}
/**
* 获取产品数据信息对接详细信息
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(qcfgjProductAllDockService.selectQcfgjProductAllDockById(id));
}
/**
* 新增产品数据信息对接
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:add')")
@Log(title = "产品数据信息对接", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcfgjProductAllDock qcfgjProductAllDock) {
return toAjax(qcfgjProductAllDockService.insertQcfgjProductAllDock(qcfgjProductAllDock));
}
/**
* 修改产品数据信息对接
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:edit')")
@Log(title = "产品数据信息对接", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QcfgjProductAllDock qcfgjProductAllDock) {
return toAjax(qcfgjProductAllDockService.updateQcfgjProductAllDock(qcfgjProductAllDock));
}
/**
* 删除产品数据信息对接
*/
@PreAuthorize("@ss.hasPermi('qcfgjManage:dock:remove')")
@Log(title = "产品数据信息对接", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcfgjProductAllDockService.deleteQcfgjProductAllDockByIds(ids));
}
}

View File

@ -0,0 +1,192 @@
package com.god.qcfgjManage.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.god.common.annotation.Excel;
import com.god.common.core.domain.BaseEntity;
/**
* 产品数据信息对接对象 qcfgj_product_all_dock
*
* @author wangyan
* @date 2024-01-11
*/
public class QcfgjProductAllDock extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 覆盖件名称 */
@Excel(name = "覆盖件名称")
private String productName;
/** 型号 */
@Excel(name = "型号")
private String batchInfo;
/** 长度 */
@Excel(name = "长度")
private String lengthInfo;
/** 宽度 */
@Excel(name = "宽度")
private String wideInfo;
/** 高度 */
@Excel(name = "高度")
private String heightInfo;
/** 角度 */
@Excel(name = "角度")
private String angle;
/** 标准要求 */
@Excel(name = "标准要求")
private String standards;
/** 图片信息 */
@Excel(name = "图片信息")
private String imageInfo;
/** 检测时间 */
@Excel(name = "检测时间")
private String detectTime;
/** 结果 */
@Excel(name = "结果")
private String detectResult;
/** 数据类型 */
@Excel(name = "数据类型")
private String dataType;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setBatchInfo(String batchInfo)
{
this.batchInfo = batchInfo;
}
public String getBatchInfo()
{
return batchInfo;
}
public void setLengthInfo(String lengthInfo)
{
this.lengthInfo = lengthInfo;
}
public String getLengthInfo()
{
return lengthInfo;
}
public void setWideInfo(String wideInfo)
{
this.wideInfo = wideInfo;
}
public String getWideInfo()
{
return wideInfo;
}
public void setHeightInfo(String heightInfo)
{
this.heightInfo = heightInfo;
}
public String getHeightInfo()
{
return heightInfo;
}
public void setAngle(String angle)
{
this.angle = angle;
}
public String getAngle()
{
return angle;
}
public void setStandards(String standards)
{
this.standards = standards;
}
public String getStandards()
{
return standards;
}
public void setImageInfo(String imageInfo)
{
this.imageInfo = imageInfo;
}
public String getImageInfo()
{
return imageInfo;
}
public void setDetectTime(String detectTime)
{
this.detectTime = detectTime;
}
public String getDetectTime()
{
return detectTime;
}
public void setDetectResult(String detectResult)
{
this.detectResult = detectResult;
}
public String getDetectResult()
{
return detectResult;
}
public void setDataType(String dataType)
{
this.dataType = dataType;
}
public String getDataType()
{
return dataType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("productName", getProductName())
.append("batchInfo", getBatchInfo())
.append("lengthInfo", getLengthInfo())
.append("wideInfo", getWideInfo())
.append("heightInfo", getHeightInfo())
.append("angle", getAngle())
.append("standards", getStandards())
.append("imageInfo", getImageInfo())
.append("detectTime", getDetectTime())
.append("detectResult", getDetectResult())
.append("remark", getRemark())
.append("dataType", getDataType())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.god.qcfgjManage.mapper;
import java.util.List;
import com.god.qcfgjManage.domain.QcfgjProductAllDock;
/**
* 产品数据信息对接Mapper接口
*
* @author wangyan
* @date 2024-01-11
*/
public interface QcfgjProductAllDockMapper
{
/**
* 查询产品数据信息对接
*
* @param id 产品数据信息对接主键
* @return 产品数据信息对接
*/
public QcfgjProductAllDock selectQcfgjProductAllDockById(String id);
/**
* 查询产品数据信息对接列表
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 产品数据信息对接集合
*/
public List<QcfgjProductAllDock> selectQcfgjProductAllDockList(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 新增产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
public int insertQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 修改产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
public int updateQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 删除产品数据信息对接
*
* @param id 产品数据信息对接主键
* @return 结果
*/
public int deleteQcfgjProductAllDockById(String id);
/**
* 批量删除产品数据信息对接
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteQcfgjProductAllDockByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.god.qcfgjManage.service;
import java.util.List;
import com.god.qcfgjManage.domain.QcfgjProductAllDock;
/**
* 产品数据信息对接Service接口
*
* @author wangyan
* @date 2024-01-11
*/
public interface IQcfgjProductAllDockService
{
/**
* 查询产品数据信息对接
*
* @param id 产品数据信息对接主键
* @return 产品数据信息对接
*/
public QcfgjProductAllDock selectQcfgjProductAllDockById(String id);
/**
* 查询产品数据信息对接列表
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 产品数据信息对接集合
*/
public List<QcfgjProductAllDock> selectQcfgjProductAllDockList(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 新增产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
public int insertQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 修改产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
public int updateQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock);
/**
* 批量删除产品数据信息对接
*
* @param ids 需要删除的产品数据信息对接主键集合
* @return 结果
*/
public int deleteQcfgjProductAllDockByIds(String[] ids);
/**
* 删除产品数据信息对接信息
*
* @param id 产品数据信息对接主键
* @return 结果
*/
public int deleteQcfgjProductAllDockById(String id);
}

View File

@ -0,0 +1,92 @@
package com.god.qcfgjManage.service.impl;
import java.util.List;
import com.god.common.utils.StringUtils;
import com.god.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.god.qcfgjManage.mapper.QcfgjProductAllDockMapper;
import com.god.qcfgjManage.domain.QcfgjProductAllDock;
import com.god.qcfgjManage.service.IQcfgjProductAllDockService;
/**
* 产品数据信息对接Service业务层处理
*
* @author wangyan
* @date 2024-01-11
*/
@Service
public class QcfgjProductAllDockServiceImpl implements IQcfgjProductAllDockService {
@Autowired
private QcfgjProductAllDockMapper qcfgjProductAllDockMapper;
/**
* 查询产品数据信息对接
*
* @param id 产品数据信息对接主键
* @return 产品数据信息对接
*/
@Override
public QcfgjProductAllDock selectQcfgjProductAllDockById(String id) {
return qcfgjProductAllDockMapper.selectQcfgjProductAllDockById(id);
}
/**
* 查询产品数据信息对接列表
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 产品数据信息对接
*/
@Override
public List<QcfgjProductAllDock> selectQcfgjProductAllDockList(QcfgjProductAllDock qcfgjProductAllDock) {
return qcfgjProductAllDockMapper.selectQcfgjProductAllDockList(qcfgjProductAllDock);
}
/**
* 新增产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
@Override
public int insertQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock) {
if (StringUtils.isBlank(qcfgjProductAllDock.getId())){
qcfgjProductAllDock.setId(IdUtils.fastSimpleUUID());
}
return qcfgjProductAllDockMapper.insertQcfgjProductAllDock(qcfgjProductAllDock);
}
/**
* 修改产品数据信息对接
*
* @param qcfgjProductAllDock 产品数据信息对接
* @return 结果
*/
@Override
public int updateQcfgjProductAllDock(QcfgjProductAllDock qcfgjProductAllDock) {
return qcfgjProductAllDockMapper.updateQcfgjProductAllDock(qcfgjProductAllDock);
}
/**
* 批量删除产品数据信息对接
*
* @param ids 需要删除的产品数据信息对接主键
* @return 结果
*/
@Override
public int deleteQcfgjProductAllDockByIds(String[] ids) {
return qcfgjProductAllDockMapper.deleteQcfgjProductAllDockByIds(ids);
}
/**
* 删除产品数据信息对接信息
*
* @param id 产品数据信息对接主键
* @return 结果
*/
@Override
public int deleteQcfgjProductAllDockById(String id) {
return qcfgjProductAllDockMapper.deleteQcfgjProductAllDockById(id);
}
}

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.god.qcfgjManage.mapper.QcfgjProductAllDockMapper">
<resultMap type="QcfgjProductAllDock" id="QcfgjProductAllDockResult">
<result property="id" column="id" />
<result property="productName" column="product_name" />
<result property="batchInfo" column="batch_info" />
<result property="lengthInfo" column="length_info" />
<result property="wideInfo" column="wide_info" />
<result property="heightInfo" column="height_info" />
<result property="angle" column="angle" />
<result property="standards" column="standards" />
<result property="imageInfo" column="image_info" />
<result property="detectTime" column="detect_time" />
<result property="detectResult" column="detect_result" />
<result property="remark" column="remark" />
<result property="dataType" column="data_type" />
</resultMap>
<sql id="selectQcfgjProductAllDockVo">
select id, product_name, batch_info, length_info, wide_info, height_info, angle, standards, image_info, detect_time, detect_result, remark, data_type from qcfgj_product_all_dock
</sql>
<select id="selectQcfgjProductAllDockList" parameterType="QcfgjProductAllDock" resultMap="QcfgjProductAllDockResult">
<include refid="selectQcfgjProductAllDockVo"/>
<where>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="batchInfo != null and batchInfo != ''"> and batch_info = #{batchInfo}</if>
<if test="lengthInfo != null and lengthInfo != ''"> and length_info like concat('%', #{lengthInfo}, '%')</if>
<if test="wideInfo != null and wideInfo != ''"> and wide_info like concat('%', #{wideInfo}, '%')</if>
<if test="heightInfo != null and heightInfo != ''"> and height_info like concat('%', #{heightInfo}, '%')</if>
<if test="angle != null and angle != ''"> and angle like concat('%', #{angle}, '%')</if>
<if test="standards != null and standards != ''"> and standards like concat('%', #{standards}, '%')</if>
<if test="imageInfo != null and imageInfo != ''"> and image_info = #{imageInfo}</if>
<if test="params.beginDetectTime != null and params.beginDetectTime != '' and params.endDetectTime != null and params.endDetectTime != ''"> and detect_time between #{params.beginDetectTime} and #{params.endDetectTime}</if>
<if test="detectResult != null and detectResult != ''"> and detect_result = #{detectResult}</if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if>
</where>
</select>
<select id="selectQcfgjProductAllDockById" parameterType="String" resultMap="QcfgjProductAllDockResult">
<include refid="selectQcfgjProductAllDockVo"/>
where id = #{id}
</select>
<insert id="insertQcfgjProductAllDock" parameterType="QcfgjProductAllDock">
insert into qcfgj_product_all_dock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="productName != null">product_name,</if>
<if test="batchInfo != null">batch_info,</if>
<if test="lengthInfo != null">length_info,</if>
<if test="wideInfo != null">wide_info,</if>
<if test="heightInfo != null">height_info,</if>
<if test="angle != null">angle,</if>
<if test="standards != null">standards,</if>
<if test="imageInfo != null">image_info,</if>
<if test="detectTime != null">detect_time,</if>
<if test="detectResult != null">detect_result,</if>
<if test="remark != null">remark,</if>
<if test="dataType != null">data_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="productName != null">#{productName},</if>
<if test="batchInfo != null">#{batchInfo},</if>
<if test="lengthInfo != null">#{lengthInfo},</if>
<if test="wideInfo != null">#{wideInfo},</if>
<if test="heightInfo != null">#{heightInfo},</if>
<if test="angle != null">#{angle},</if>
<if test="standards != null">#{standards},</if>
<if test="imageInfo != null">#{imageInfo},</if>
<if test="detectTime != null">#{detectTime},</if>
<if test="detectResult != null">#{detectResult},</if>
<if test="remark != null">#{remark},</if>
<if test="dataType != null">#{dataType},</if>
</trim>
</insert>
<update id="updateQcfgjProductAllDock" parameterType="QcfgjProductAllDock">
update qcfgj_product_all_dock
<trim prefix="SET" suffixOverrides=",">
<if test="productName != null">product_name = #{productName},</if>
<if test="batchInfo != null">batch_info = #{batchInfo},</if>
<if test="lengthInfo != null">length_info = #{lengthInfo},</if>
<if test="wideInfo != null">wide_info = #{wideInfo},</if>
<if test="heightInfo != null">height_info = #{heightInfo},</if>
<if test="angle != null">angle = #{angle},</if>
<if test="standards != null">standards = #{standards},</if>
<if test="imageInfo != null">image_info = #{imageInfo},</if>
<if test="detectTime != null">detect_time = #{detectTime},</if>
<if test="detectResult != null">detect_result = #{detectResult},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="dataType != null">data_type = #{dataType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQcfgjProductAllDockById" parameterType="String">
delete from qcfgj_product_all_dock where id = #{id}
</delete>
<delete id="deleteQcfgjProductAllDockByIds" parameterType="String">
delete from qcfgj_product_all_dock where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询产品数据信息对接列表
export function listDock(query) {
return request({
url: '/qcfgjManage/dock/list',
method: 'get',
params: query
})
}
// 查询产品数据信息对接详细
export function getDock(id) {
return request({
url: '/qcfgjManage/dock/' + id,
method: 'get'
})
}
// 新增产品数据信息对接
export function addDock(data) {
return request({
url: '/qcfgjManage/dock',
method: 'post',
data: data
})
}
// 修改产品数据信息对接
export function updateDock(data) {
return request({
url: '/qcfgjManage/dock',
method: 'put',
data: data
})
}
// 删除产品数据信息对接
export function delDock(id) {
return request({
url: '/qcfgjManage/dock/' + id,
method: 'delete'
})
}

View File

@ -128,12 +128,12 @@
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="算法文件" align="center" prop="quality" /> <!-- <el-table-column label="算法文件" align="center" prop="quality" />-->
<el-table-column label="分析效果" align="center" prop="detectResult" > <el-table-column label="分析效果" align="center" prop="detectResult" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.detectResult === '处理中'">{{scope.row.detectResult}}</el-tag> <el-tag type="warning" v-if="scope.row.detectResult === '处理中'">{{scope.row.detectResult}}</el-tag>
<el-tag type="success" v-else-if="scope.row.detectResult === '已处理'">{{scope.row.detectResult}}</el-tag> <el-tag type="success" v-else-if="scope.row.detectResult === '匹配'">{{scope.row.detectResult}}</el-tag>
<el-tag type="danger" v-else-if="scope.row.detectResult === '待处理'">{{scope.row.detectResult}}</el-tag> <el-tag type="danger" v-else-if="scope.row.detectResult === '未识别'">{{scope.row.detectResult}}</el-tag>
<el-tag type="info" v-else>{{scope.row.detectResult}}</el-tag> <el-tag type="info" v-else>{{scope.row.detectResult}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -156,7 +156,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="表面质量" align="center" prop="quality" /> <el-table-column label="表面质量" align="center" prop="quality" />
<el-table-column label="检验结果" align="center" prop="detectResult" /> <el-table-column label="检验结果" align="center" prop="detectResult" >
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.detectResult === '处理中'">{{scope.row.detectResult}}</el-tag>
<el-tag type="success" v-else-if="scope.row.detectResult === '合格'">{{scope.row.detectResult}}</el-tag>
<el-tag type="danger" v-else-if="scope.row.detectResult === '未识别'">{{scope.row.detectResult}}</el-tag>
<el-tag type="info" v-else>{{scope.row.detectResult}}</el-tag>
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="chargePerson" /> <el-table-column label="负责人" align="center" prop="chargePerson" />
<!-- <el-table-column label="备注" align="center" prop="remark" />--> <!-- <el-table-column label="备注" align="center" prop="remark" />-->

View File

@ -0,0 +1,394 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
<el-form-item label="覆盖件名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入覆盖件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="型号" prop="batchInfo">
<el-input
v-model="queryParams.batchInfo"
placeholder="请输入型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="长度" prop="lengthInfo">
<el-input
v-model="queryParams.lengthInfo"
placeholder="请输入长度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="宽度" prop="wideInfo">
<el-input
v-model="queryParams.wideInfo"
placeholder="请输入宽度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="高度" prop="heightInfo">
<el-input
v-model="queryParams.heightInfo"
placeholder="请输入高度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="角度" prop="angle">
<el-input
v-model="queryParams.angle"
placeholder="请输入角度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测时间">
<el-date-picker
v-model="daterangeDetectTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="结果" prop="detectResult">
<el-input
v-model="queryParams.detectResult"
placeholder="请输入结果"
clearable
@keyup.enter.native="handleQuery"
/>
</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"
v-hasPermi="['qcfgjManage:dock:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['qcfgjManage:dock:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['qcfgjManage:dock:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['qcfgjManage:dock:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="覆盖件名称" align="center" prop="productName" />
<el-table-column label="型号" align="center" prop="batchInfo" />
<el-table-column label="长度" align="center" prop="lengthInfo" />
<el-table-column label="宽度" align="center" prop="wideInfo" />
<el-table-column label="高度" align="center" prop="heightInfo" />
<!-- <el-table-column label="角度" align="center" prop="angle" />-->
<el-table-column label="要求" align="center" prop="standards" />
<!-- <el-table-column label="图片信息" align="center" prop="imageInfo" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <image-preview :src="scope.row.imageInfo" :width="50" :height="50"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="检测时间" align="center" prop="detectTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结果" align="center" prop="detectResult" >
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.detectResult === '处理中'">{{scope.row.detectResult}}</el-tag>
<el-tag type="success" v-else-if="scope.row.detectResult === '合格'">{{scope.row.detectResult}}</el-tag>
<el-tag type="danger" v-else-if="scope.row.detectResult === '未识别'">{{scope.row.detectResult}}</el-tag>
<el-tag type="info" v-else>{{scope.row.detectResult}}</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['qcfgjManage:dock:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['qcfgjManage:dock:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改产品数据信息对接对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="88px">
<el-form-item label="覆盖件名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入覆盖件名称" />
</el-form-item>
<el-form-item label="型号" prop="batchInfo">
<el-input v-model="form.batchInfo" placeholder="请输入型号" />
</el-form-item>
<el-form-item label="长度" prop="lengthInfo">
<el-input v-model="form.lengthInfo" placeholder="请输入长度" />
</el-form-item>
<el-form-item label="宽度" prop="wideInfo">
<el-input v-model="form.wideInfo" placeholder="请输入宽度" />
</el-form-item>
<el-form-item label="高度" prop="heightInfo">
<el-input v-model="form.heightInfo" placeholder="请输入高度" />
</el-form-item>
<el-form-item label="角度" prop="angle">
<el-input v-model="form.angle" placeholder="请输入角度" />
</el-form-item>
<el-form-item label="标准要求" prop="standards">
<el-input v-model="form.standards" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="图片信息" prop="imageInfo">
<image-upload v-model="form.imageInfo"/>
</el-form-item>
<el-form-item label="检测时间" prop="detectTime">
<el-date-picker clearable
v-model="form.detectTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择检测时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结果" prop="detectResult">
<el-input v-model="form.detectResult" placeholder="请输入结果" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</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 { listDock, getDock, delDock, addDock, updateDock } from "@/api/qcfgjManage/dock";
export default {
//
name: "Dock",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dockList: [],
//
title: "",
//
open: false,
//
daterangeDetectTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
productName: null,
batchInfo: null,
lengthInfo: null,
wideInfo: null,
heightInfo: null,
angle: null,
standards: null,
imageInfo: null,
detectTime: null,
detectResult: null,
dataType: "外观尺寸数据"
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询产品数据信息对接列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDetectTime && '' != this.daterangeDetectTime) {
this.queryParams.params["beginDetectTime"] = this.daterangeDetectTime[0];
this.queryParams.params["endDetectTime"] = this.daterangeDetectTime[1];
}
listDock(this.queryParams).then(response => {
this.dockList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
productName: null,
batchInfo: null,
lengthInfo: null,
wideInfo: null,
heightInfo: null,
angle: null,
standards: null,
imageInfo: null,
detectTime: null,
detectResult: null,
remark: null,
dataType: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeDetectTime = [];
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 = "添加产品外观尺寸数据对接";
this.form.dataType="外观尺寸数据";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getDock(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改产品外观尺寸数据对接";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateDock(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDock(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除产品外观尺寸数据对接编号为"' + ids + '"的数据项?').then(function() {
return delDock(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('qcfgjManage/dock/export', {
...this.queryParams
}, `dock_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,394 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
<el-form-item label="零件名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入零件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分类" prop="batchInfo">
<el-input
v-model="queryParams.batchInfo"
placeholder="请输入分类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分类标准" prop="lengthInfo">
<el-input
v-model="queryParams.lengthInfo"
placeholder="请输入分类标准"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="宽度" prop="wideInfo">
<el-input
v-model="queryParams.wideInfo"
placeholder="请输入宽度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="高度" prop="heightInfo">
<el-input
v-model="queryParams.heightInfo"
placeholder="请输入高度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="角度" prop="angle">
<el-input
v-model="queryParams.angle"
placeholder="请输入角度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测时间">
<el-date-picker
v-model="daterangeDetectTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="结果" prop="detectResult">
<el-input
v-model="queryParams.detectResult"
placeholder="请输入结果"
clearable
@keyup.enter.native="handleQuery"
/>
</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"
v-hasPermi="['qcfgjManage:dock:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['qcfgjManage:dock:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['qcfgjManage:dock:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['qcfgjManage:dock:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="零件名称" align="center" prop="productName" />
<el-table-column label="分类" align="center" prop="batchInfo" />
<el-table-column label="分类标准" align="center" prop="lengthInfo" />
<el-table-column label="是否缺陷" align="center" prop="wideInfo" />
<!-- <el-table-column label="高度" align="center" prop="heightInfo" />-->
<!-- <el-table-column label="角度" align="center" prop="angle" />-->
<!-- <el-table-column label="要求" align="center" prop="standards" />-->
<!-- <el-table-column label="图片信息" align="center" prop="imageInfo" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <image-preview :src="scope.row.imageInfo" :width="50" :height="50"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="处理时间" align="center" prop="detectTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="分类结果" align="center" prop="detectResult" >
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.detectResult === '处理中'">{{scope.row.detectResult}}</el-tag>
<el-tag type="success" v-else-if="scope.row.detectResult === '合格'">{{scope.row.detectResult}}</el-tag>
<el-tag type="danger" v-else-if="scope.row.detectResult === '未识别'">{{scope.row.detectResult}}</el-tag>
<el-tag type="info" v-else>{{scope.row.detectResult}}</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['qcfgjManage:dock:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['qcfgjManage:dock:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改产品数据信息对接对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="88px">
<el-form-item label="零件名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入零件名称" />
</el-form-item>
<el-form-item label="分类" prop="batchInfo">
<el-input v-model="form.batchInfo" placeholder="请输入分类" />
</el-form-item>
<el-form-item label="分类标准" prop="lengthInfo">
<el-input v-model="form.lengthInfo" placeholder="请输入分类标准" />
</el-form-item>
<el-form-item label="是否缺陷" prop="wideInfo">
<el-input v-model="form.wideInfo" placeholder="请输入是否缺陷" />
</el-form-item>
<!-- <el-form-item label="高度" prop="heightInfo">-->
<!-- <el-input v-model="form.heightInfo" placeholder="请输入高度" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="角度" prop="angle">-->
<!-- <el-input v-model="form.angle" placeholder="请输入角度" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标准要求" prop="standards">-->
<!-- <el-input v-model="form.standards" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<el-form-item label="图片信息" prop="imageInfo">
<image-upload v-model="form.imageInfo"/>
</el-form-item>
<el-form-item label="处理时间" prop="detectTime">
<el-date-picker clearable
v-model="form.detectTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择处理时间">
</el-date-picker>
</el-form-item>
<el-form-item label="分类结果" prop="detectResult">
<el-input v-model="form.detectResult" placeholder="请输入分类结果" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</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 { listDock, getDock, delDock, addDock, updateDock } from "@/api/qcfgjManage/dock";
export default {
//
name: "Dock",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dockList: [],
//
title: "",
//
open: false,
//
daterangeDetectTime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
productName: null,
batchInfo: null,
lengthInfo: null,
wideInfo: null,
heightInfo: null,
angle: null,
standards: null,
imageInfo: null,
detectTime: null,
detectResult: null,
dataType: "零件分类标准"
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询产品数据信息对接列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeDetectTime && '' != this.daterangeDetectTime) {
this.queryParams.params["beginDetectTime"] = this.daterangeDetectTime[0];
this.queryParams.params["endDetectTime"] = this.daterangeDetectTime[1];
}
listDock(this.queryParams).then(response => {
this.dockList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
productName: null,
batchInfo: null,
lengthInfo: null,
wideInfo: null,
heightInfo: null,
angle: null,
standards: null,
imageInfo: null,
detectTime: null,
detectResult: null,
remark: null,
dataType: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeDetectTime = [];
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 = "添加零件分类标准对接";
this.form.dataType="零件分类标准";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getDock(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改零件分类标准对接";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateDock(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDock(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除零件分类标准对接编号为"' + ids + '"的数据项?').then(function() {
return delDock(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('qcfgjManage/dock/export', {
...this.queryParams
}, `dock_${new Date().getTime()}.xlsx`)
}
}
};
</script>