李永德
1 year ago
27 changed files with 631 additions and 28 deletions
Binary file not shown.
@ -1,7 +1,7 @@ |
|||
package org.nl.wms.ext.service; |
|||
package org.nl.wms.ext.acs.service; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.nl.wms.ext.service.vo.BaseResponse; |
|||
import org.nl.wms.ext.acs.service.vo.BaseResponse; |
|||
|
|||
/** |
|||
* @Author: lyd |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service; |
|||
package org.nl.wms.ext.acs.service; |
|||
|
|||
/** |
|||
* @Author: lyd |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.dto; |
|||
package org.nl.wms.ext.acs.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.dto; |
|||
package org.nl.wms.ext.acs.service.dto; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import lombok.Data; |
@ -0,0 +1,42 @@ |
|||
package org.nl.wms.ext.acs.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 砖信息 |
|||
* @Date: 2023/7/18 |
|||
*/ |
|||
@Data |
|||
public class BrickInfoDto { |
|||
/** 当前抓取工位 **/ |
|||
private String get_station; |
|||
/** 当前放置工位 **/ |
|||
private String put_station; |
|||
/** 是否合格 **/ |
|||
private String is_qualified; |
|||
/** 激光标刻码 **/ |
|||
private String laser_marking_code; |
|||
/** 碾次 **/ |
|||
private String grinding_number; |
|||
/** 高度1 **/ |
|||
private String height1; |
|||
/** 高度2 **/ |
|||
private String height2; |
|||
/** 高度3 **/ |
|||
private String height3; |
|||
/** 高度4 **/ |
|||
private String height4; |
|||
/** 宽度1 **/ |
|||
private String width1; |
|||
/** 宽度2 **/ |
|||
private String width2; |
|||
/** 长度 **/ |
|||
private String len; |
|||
/** 体积 **/ |
|||
private String volume; |
|||
/** 平面度 **/ |
|||
private String flatness; |
|||
/** 缺陷个数 **/ |
|||
private String unqualified_qty; |
|||
} |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.dto; |
|||
package org.nl.wms.ext.acs.service.dto; |
|||
|
|||
|
|||
import lombok.Data; |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.dto; |
|||
package org.nl.wms.ext.acs.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
@ -1,7 +1,7 @@ |
|||
package org.nl.wms.ext.service.impl; |
|||
package org.nl.wms.ext.acs.service.impl; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.wms.ext.service.WmsToAcsService; |
|||
import org.nl.wms.ext.acs.service.WmsToAcsService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.vo; |
|||
package org.nl.wms.ext.acs.service.vo; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.http.HttpStatus; |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.vo; |
|||
package org.nl.wms.ext.acs.service.vo; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.http.HttpStatus; |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.vo; |
|||
package org.nl.wms.ext.acs.service.vo; |
|||
|
|||
public class GrabResponse extends BaseResponse { |
|||
} |
@ -1,4 +1,4 @@ |
|||
package org.nl.wms.ext.service.vo; |
|||
package org.nl.wms.ext.acs.service.vo; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.http.HttpStatus; |
@ -0,0 +1,66 @@ |
|||
package org.nl.wms.ext.record.controller; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.common.base.TableDataInfo; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import org.nl.common.logging.annotation.Log; |
|||
import org.nl.wms.ext.record.service.ISysInteractRecordService; |
|||
import org.nl.wms.ext.record.service.dao.SysInteractRecord; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
@Slf4j |
|||
@RestController |
|||
@Api(tags = "外部系统接口记录管理") |
|||
@RequestMapping("/api/sysInteractRecord") |
|||
public class SysInteractRecordController { |
|||
|
|||
@Autowired |
|||
private ISysInteractRecordService sysInteractRecordService; |
|||
|
|||
@GetMapping |
|||
@Log("查询外部系统接口记录") |
|||
@ApiOperation("查询外部系统接口记录") |
|||
//@SaCheckPermission("@el.check('sysInteractRecord:list')")
|
|||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(sysInteractRecordService.queryAll(whereJson,page)),HttpStatus.OK); |
|||
} |
|||
|
|||
@PostMapping |
|||
@Log("新增外部系统接口记录") |
|||
@ApiOperation("新增外部系统接口记录") |
|||
//@SaCheckPermission("@el.check('sysInteractRecord:add')")
|
|||
public ResponseEntity<Object> create(@Validated @RequestBody SysInteractRecord entity){ |
|||
sysInteractRecordService.create(entity); |
|||
return new ResponseEntity<>(HttpStatus.CREATED); |
|||
} |
|||
|
|||
@PutMapping |
|||
@Log("修改外部系统接口记录") |
|||
@ApiOperation("修改外部系统接口记录") |
|||
//@SaCheckPermission("@el.check('sysInteractRecord:edit')")
|
|||
public ResponseEntity<Object> update(@Validated @RequestBody SysInteractRecord entity){ |
|||
sysInteractRecordService.update(entity); |
|||
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
|||
} |
|||
|
|||
@Log("删除外部系统接口记录") |
|||
@ApiOperation("删除外部系统接口记录") |
|||
//@SaCheckPermission("@el.check('sysInteractRecord:del')")
|
|||
@DeleteMapping |
|||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) { |
|||
sysInteractRecordService.deleteAll(ids); |
|||
return new ResponseEntity<>(HttpStatus.OK); |
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
package org.nl.wms.ext.record.service; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import org.nl.wms.ext.acs.service.vo.BaseResponse; |
|||
import org.nl.wms.ext.record.service.dao.SysInteractRecord; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @description 服务接口 |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
public interface ISysInteractRecordService extends IService<SysInteractRecord> { |
|||
|
|||
/** |
|||
* 查询数据分页 |
|||
* @param whereJson 条件 |
|||
* @param pageable 分页参数 |
|||
* @return IPage<SysInteractRecord> |
|||
*/ |
|||
IPage<SysInteractRecord> queryAll(Map whereJson, PageQuery pageable); |
|||
|
|||
/** |
|||
* 创建 |
|||
* @param entity / |
|||
*/ |
|||
void create(SysInteractRecord entity); |
|||
|
|||
/** |
|||
* 编辑 |
|||
* @param entity / |
|||
*/ |
|||
void update(SysInteractRecord entity); |
|||
|
|||
/** |
|||
* 多选删除 |
|||
* @param ids / |
|||
*/ |
|||
void deleteAll(Set<String> ids); |
|||
|
|||
/** |
|||
* 创建记录 |
|||
*/ |
|||
void saveRecord(JSONObject param, BaseResponse response, String direction); |
|||
} |
@ -0,0 +1,52 @@ |
|||
package org.nl.wms.ext.record.service.dao; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("sys_interact_record") |
|||
public class SysInteractRecord implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@TableId(value = "interact_id", type = IdType.NONE) |
|||
@ApiModelProperty(value = "对接标识") |
|||
private String interact_id; |
|||
|
|||
@ApiModelProperty(value = "对接编码") |
|||
private String interact_code; |
|||
|
|||
@ApiModelProperty(value = "响应编码") |
|||
private int code; |
|||
|
|||
@ApiModelProperty(value = "响应信息") |
|||
private String message; |
|||
|
|||
@ApiModelProperty(value = "请求报文") |
|||
private String request_param; |
|||
|
|||
@ApiModelProperty(value = "响应结果") |
|||
private String response_param; |
|||
|
|||
@ApiModelProperty(value = "记录时间") |
|||
private String record_time; |
|||
|
|||
@ApiModelProperty(value = "方向") |
|||
private String direction; |
|||
|
|||
@ApiModelProperty(value = "是否成功") |
|||
private Boolean is_success; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package org.nl.wms.ext.record.service.dao.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.nl.wms.ext.record.service.dao.SysInteractRecord; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
public interface SysInteractRecordMapper extends BaseMapper<SysInteractRecord> { |
|||
|
|||
} |
@ -0,0 +1,5 @@ |
|||
<?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="org.nl.wms.ext.record.service.dao.mapper.SysInteractRecordMapper"> |
|||
|
|||
</mapper> |
@ -0,0 +1,40 @@ |
|||
package org.nl.wms.ext.record.service.dto; |
|||
|
|||
import lombok.Data; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description / |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
@Data |
|||
public class SysInteractRecordDto implements Serializable { |
|||
|
|||
/** 对接标识 */ |
|||
private String interact_id; |
|||
|
|||
/** 对接编码 */ |
|||
private String interact_code; |
|||
|
|||
/** 响应编码 */ |
|||
private String code; |
|||
|
|||
/** 响应信息 */ |
|||
private String message; |
|||
|
|||
/** 请求报文 */ |
|||
private String request_param; |
|||
|
|||
/** 响应结果 */ |
|||
private String response_param; |
|||
|
|||
/** 记录时间 */ |
|||
private String record_time; |
|||
|
|||
/** 方向 */ |
|||
private String direction; |
|||
|
|||
/** 是否成功 */ |
|||
private Boolean is_success; |
|||
} |
@ -0,0 +1,12 @@ |
|||
package org.nl.wms.ext.record.service.dto; |
|||
|
|||
import org.nl.common.domain.query.BaseQuery; |
|||
import org.nl.wms.ext.record.service.dao.SysInteractRecord; |
|||
|
|||
/** |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
public class SysInteractRecordQuery extends BaseQuery<SysInteractRecord> { |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package org.nl.wms.ext.record.service.impl; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import cn.hutool.http.HttpStatus; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import org.nl.common.exception.BadRequestException; |
|||
import org.nl.common.utils.SecurityUtils; |
|||
import org.nl.wms.ext.acs.service.vo.BaseResponse; |
|||
import org.nl.wms.ext.record.service.ISysInteractRecordService; |
|||
import org.nl.wms.ext.record.service.dao.mapper.SysInteractRecordMapper; |
|||
import org.nl.wms.ext.record.service.dao.SysInteractRecord; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @description 服务实现 |
|||
* @author lyd |
|||
* @date 2023-07-19 |
|||
**/ |
|||
@Slf4j |
|||
@Service |
|||
public class SysInteractRecordServiceImpl extends ServiceImpl<SysInteractRecordMapper, SysInteractRecord> implements ISysInteractRecordService { |
|||
|
|||
@Autowired |
|||
private SysInteractRecordMapper sysInteractRecordMapper; |
|||
|
|||
@Override |
|||
public IPage<SysInteractRecord> queryAll(Map whereJson, PageQuery page){ |
|||
LambdaQueryWrapper<SysInteractRecord> lam = new LambdaQueryWrapper<>(); |
|||
lam.orderByDesc(SysInteractRecord::getRecord_time); |
|||
IPage<SysInteractRecord> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|||
sysInteractRecordMapper.selectPage(pages, lam); |
|||
return pages; |
|||
} |
|||
|
|||
@Override |
|||
public void create(SysInteractRecord entity) { |
|||
|
|||
entity.setInteract_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|||
sysInteractRecordMapper.insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
public void update(SysInteractRecord entity) { |
|||
SysInteractRecord dto = sysInteractRecordMapper.selectById(entity.getInteract_id()); |
|||
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!"); |
|||
sysInteractRecordMapper.updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAll(Set<String> ids) { |
|||
// 真删除
|
|||
sysInteractRecordMapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public void saveRecord(JSONObject param, BaseResponse response, String direction) { |
|||
SysInteractRecord entity = new SysInteractRecord(); |
|||
entity.setInteract_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
|||
entity.setInteract_code(response.getRequestNo()); |
|||
entity.setCode(response.getCode()); |
|||
entity.setMessage(response.getMessage()); |
|||
entity.setRecord_time(DateUtil.now()); |
|||
entity.setDirection(direction); |
|||
entity.setRequest_param(JSONObject.toJSONString(param)); |
|||
entity.setResponse_param(JSONObject.toJSONString(response)); |
|||
entity.setIs_success(response.getCode() == HttpStatus.HTTP_OK); |
|||
sysInteractRecordMapper.insert(entity); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,186 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--工具栏--> |
|||
<div class="head-container"> |
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<crudOperation :permission="permission" /> |
|||
<!--表单组件--> |
|||
<el-dialog |
|||
:close-on-click-modal="false" |
|||
:before-close="crud.cancelCU" |
|||
:visible.sync="crud.status.cu > 0" |
|||
:title="crud.status.title" |
|||
width="500px" |
|||
> |
|||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px"> |
|||
<el-form-item label="对接编码"> |
|||
<el-input v-model="form.interact_code" style="width: 370px;" disabled/> |
|||
</el-form-item> |
|||
<el-form-item label="响应编码"> |
|||
<el-input v-model="form.code" style="width: 370px;" disabled/> |
|||
</el-form-item> |
|||
<el-form-item label="响应信息"> |
|||
<el-input v-model="form.message" style="width: 370px;" disabled/> |
|||
</el-form-item> |
|||
<el-form-item label="请求报文"> |
|||
<el-input v-model="formattedRequestParam" :rows="7" type="textarea" style="width: 370px;"/> |
|||
</el-form-item> |
|||
<el-form-item label="响应结果"> |
|||
<el-input v-model="formattedResponseParam" :rows="7" type="textarea" style="width: 370px;" disabled/> |
|||
</el-form-item> |
|||
<el-form-item label="记录时间"> |
|||
<el-input v-model="form.record_time" style="width: 370px;" disabled/> |
|||
</el-form-item> |
|||
<el-form-item label="请求方向"> |
|||
<!-- <el-input v-model="form.direction" style="width: 370px;" disabled/>--> |
|||
<el-select |
|||
disabled |
|||
v-model="form.direction" |
|||
size="mini" |
|||
placeholder="点位状态" |
|||
class="filter-item" |
|||
style="width: 370px;" |
|||
clearable |
|||
> |
|||
<el-option |
|||
v-for="item in dict.interact_direction" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
size="mini" |
|||
style="width: 100%;" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
> |
|||
<el-table-column type="selection" width="55" /> |
|||
<el-table-column |
|||
prop="interact_code" |
|||
label="对接编码" |
|||
:min-width="flexWidth('interact_code',crud.data,'对接编码')" |
|||
/> |
|||
<el-table-column prop="code" label="响应编码" :min-width="flexWidth('code',crud.data,'响应编码')" /> |
|||
<el-table-column prop="message" label="响应信息" :min-width="flexWidth('message',crud.data,'响应信息')" /> |
|||
<el-table-column |
|||
prop="request_param" |
|||
label="请求报文" |
|||
show-overflow-tooltip |
|||
:min-width="200" |
|||
/> |
|||
<el-table-column |
|||
prop="response_param" |
|||
label="响应结果" |
|||
show-overflow-tooltip |
|||
:min-width="200" |
|||
/> |
|||
<el-table-column |
|||
prop="record_time" |
|||
label="记录时间" |
|||
:min-width="flexWidth('record_time',crud.data,'记录时间')" |
|||
/> |
|||
<el-table-column prop="direction" label="方向" :min-width="100"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.interact_direction[scope.row.direction] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="is_success" label="请求状态" :min-width="flexWidth('is_success',crud.data,'是否成功')"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.is_success ? '成功' : '失败'}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> |
|||
<template slot-scope="scope"> |
|||
<udOperation |
|||
:data="scope.row" |
|||
:permission="permission" |
|||
/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import crudSysInteractRecord from './sysInteractRecord' |
|||
import CRUD, { crud, form, header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import udOperation from '@crud/UD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
|
|||
const defaultForm = { |
|||
interact_id: null, |
|||
interact_code: null, |
|||
code: null, |
|||
message: null, |
|||
request_param: null, |
|||
response_param: null, |
|||
record_time: null, |
|||
direction: null, |
|||
is_success: null |
|||
} |
|||
export default { |
|||
name: 'SysInteractRecord', |
|||
dicts: ['interact_direction'], |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), form(defaultForm), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '外部系统接口记录', |
|||
url: 'api/sysInteractRecord', |
|||
idField: 'interact_id', |
|||
sort: 'interact_id,desc', |
|||
crudMethod: { ...crudSysInteractRecord } |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: {}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
computed: { |
|||
formattedRequestParam() { |
|||
try { |
|||
const jsonObject = JSON.parse(this.form.request_param) // 解析 JSON 字符串为 JavaScript 对象 |
|||
return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 |
|||
} catch (error) { |
|||
// 错误处理,如果 JSON 解析失败则返回原始字符串 |
|||
return this.form.request_param |
|||
} |
|||
}, formattedResponseParam() { |
|||
try { |
|||
const jsonObject = JSON.parse(this.form.response_param) // 解析 JSON 字符串为 JavaScript 对象 |
|||
return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 |
|||
} catch (error) { |
|||
// 错误处理,如果 JSON 解析失败则返回原始字符串 |
|||
return this.form.response_param |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,27 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function add(data) { |
|||
return request({ |
|||
url: 'api/sysInteractRecord', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function del(ids) { |
|||
return request({ |
|||
url: 'api/sysInteractRecord/', |
|||
method: 'delete', |
|||
data: ids |
|||
}) |
|||
} |
|||
|
|||
export function edit(data) { |
|||
return request({ |
|||
url: 'api/sysInteractRecord', |
|||
method: 'put', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del } |
Loading…
Reference in new issue