Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -45,7 +45,21 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.poi</groupId>-->
|
||||
<!-- <artifactId>poi</artifactId>-->
|
||||
<!-- <version>4.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.poi</groupId>-->
|
||||
<!-- <artifactId>poi-ooxml</artifactId>-->
|
||||
<!-- <version>4.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.poi</groupId>-->
|
||||
<!-- <artifactId>poi-ooxml-schemas</artifactId>-->
|
||||
<!-- <version>4.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.openscada.jinterop</groupId>
|
||||
<artifactId>org.openscada.jinterop.core</artifactId>
|
||||
|
||||
@@ -21,7 +21,9 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -382,4 +384,12 @@ public class DeviceController {
|
||||
deviceService.downDeviceDBloadFX5UCSV(deviceService.queryDeviceProtocol(whereJson), response);
|
||||
}
|
||||
|
||||
@PostMapping("/excelImport")
|
||||
@Log("excel导入")
|
||||
@ApiOperation("excel导入")
|
||||
public ResponseEntity<Object> excelImport(@RequestParam("file") MultipartFile file, HttpServletRequest request) {
|
||||
deviceService.excelImport(file, request);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.acs.device.service.dto.StorageCellDto;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -289,4 +291,11 @@ public interface DeviceService {
|
||||
void downDeviceDBloadSmartCSV(JSONArray queryDeviceProtocol, HttpServletResponse response);
|
||||
|
||||
void downDeviceDBloadFX5UCSV(JSONArray queryDeviceProtocol, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* excel导入
|
||||
* @param file
|
||||
* @param request
|
||||
*/
|
||||
void excelImport(MultipartFile file, HttpServletRequest request);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.poi.excel.ExcelReader;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -44,9 +46,12 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@@ -1813,6 +1818,47 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
ExportCSVUtil.responseSetProperties(fileName, bytes, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void excelImport(MultipartFile file, HttpServletRequest request) {
|
||||
if (file.isEmpty()) {
|
||||
throw new BadRequestException("文件为空,请添加数据后重新导入");
|
||||
}
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
// 1.获取上传文件输入流
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
inputStream = file.getInputStream();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_device");
|
||||
|
||||
// 调用用 hutool 方法读取数据 默认调用第一个sheet
|
||||
ExcelReader excelReader = ExcelUtil.getReader(inputStream);
|
||||
// 从第二行开始获取数据 excelReader.read的结果是一个2纬的list,外层是行,内层是行对应的所有列
|
||||
List<List<Object>> read = excelReader.read(1, excelReader.getRowCount());
|
||||
// 循环获取的数据
|
||||
for (int i = 0; i < read.size(); i++) {
|
||||
List list = read.get(i);
|
||||
JSONObject param = new JSONObject();
|
||||
//按照列获取
|
||||
param.put("device_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
param.put("device_code", list.get(0).toString());
|
||||
param.put("device_name", list.get(0).toString());
|
||||
param.put("device_type", "conveyor");
|
||||
param.put("is_config", "FALSE");
|
||||
param.put("is_route", "FALSE");
|
||||
param.put("create_by", nickName);
|
||||
param.put("create_time", now);
|
||||
param.put("update_by", nickName);
|
||||
param.put("update_time", now);
|
||||
wo.insert(param);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String,Object> getValue1(JSONArray wss, int j, Integer dbInterval, int i){
|
||||
int size = wss.size();
|
||||
Map<String,Object> map = new ListOrderedMap<>();
|
||||
|
||||
@@ -149,6 +149,14 @@ export function reload() {
|
||||
})
|
||||
}
|
||||
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: 'api/device/excelImport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, selectDeviceList, selectDeviceListByRegion, callAgv, responseAgv, selectDeviceDevicerInfo, autoCreateTask,
|
||||
changeDeviceStatus, cleanTask, queryStorageExtra, selectConDeviceList, saveBarcode, selectDeviceListOne, selectDeviceListTwo, selectDeviceListThree,
|
||||
addMaterial, cleanMaterial, reload }
|
||||
addMaterial, cleanMaterial, reload, excelImport }
|
||||
|
||||
116
acs/nladmin-ui/src/views/acs/device/UploadDialog.vue
Normal file
116
acs/nladmin-ui/src/views/acs/device/UploadDialog.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="导入Excel文件"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="400px"
|
||||
:show-close="true"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
class="upload-demo"
|
||||
action=""
|
||||
drag
|
||||
:on-exceed="is_one"
|
||||
:limit="1"
|
||||
:auto-upload="false"
|
||||
:multiple="false"
|
||||
:show-file-list="true"
|
||||
:on-change="uploadByJsqd"
|
||||
:file-list="fileList"
|
||||
accept=".xlsx,.xls"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传Excel文件,且不超过10MB</div>
|
||||
</el-upload>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDevice from '@/api/acs/device/device'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
|
||||
export default {
|
||||
name: 'UploadDialog',
|
||||
mixins: [crud()],
|
||||
components: {},
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
fileList: [],
|
||||
file1: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
openParam: {
|
||||
handler(newValue, oldValue) {
|
||||
this.opendtlParam = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
is_one() {
|
||||
this.crud.notify('只能上传一个excel文件!', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
},
|
||||
// 文件校验方法
|
||||
beforeAvatarUpload(file) {
|
||||
// 不能导入大小超过2Mb的文件
|
||||
if (file.size > 10 * 1024 * 1024) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 文件发生改变就会触发的事件
|
||||
uploadByJsqd(file) {
|
||||
this.file1 = file
|
||||
},
|
||||
submit() {
|
||||
if (this.beforeAvatarUpload(this.file1)) {
|
||||
this.fileList.name = this.file1.name
|
||||
this.fileList.url = ''
|
||||
var formdata = new FormData()
|
||||
formdata.append('file', this.file1.raw)
|
||||
// excelImport:请求接口 formdata:传递参数
|
||||
crudDevice.excelImport(formdata).then((res) => {
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
})
|
||||
} else {
|
||||
this.crud.notify('文件过大,请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -359,29 +359,20 @@ export default {
|
||||
return
|
||||
}
|
||||
for (const val in this.data1) {
|
||||
if (this.data1[val].code.indexOf('mode') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 0)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('move') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
if (this.data1[val].code.indexOf('carrier_direction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('ioaction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 3)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('height') !== -1) {
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 5)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('direction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('operation_type') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 7)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('task') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 21)
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 8)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,13 +391,32 @@ export default {
|
||||
if (isNaN(parseInt(endNumber))) {
|
||||
return
|
||||
}
|
||||
console.log(endNumber)
|
||||
for (const val in this.data2) {
|
||||
if (this.data2[val].code.indexOf('to_command') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 0)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_target') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_container_type') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_task') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_strap_times') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 10)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_length') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 12)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_weight') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 14)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_height') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 16)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -29,6 +29,16 @@
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="uploadShow = true"
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -140,7 +150,7 @@
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" slot="right">
|
||||
<el-button slot="right" size="mini" style="margin-left: -1px;margin-right: 2px" type="text">
|
||||
<router-link :to="'/devices/device/config/' + scope.row.device_code ">
|
||||
驱动配置
|
||||
</router-link>
|
||||
@@ -151,6 +161,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="tableChanged3" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -162,6 +173,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { get } from '@/api/system/dictDetail'
|
||||
import UploadDialog from '@/views/acs/device/UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
manufacturer: null,
|
||||
@@ -184,7 +196,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Device',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -203,6 +215,7 @@ export default {
|
||||
del: ['admin', 'device:del']
|
||||
},
|
||||
device_types: [],
|
||||
uploadShow: false,
|
||||
regions: [],
|
||||
rules: {
|
||||
device_code: [
|
||||
@@ -235,6 +248,9 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
tableChanged3() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
reload() {
|
||||
crudDevice.reload().then(res => {
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<rrOperation/>
|
||||
<rrOperation />
|
||||
</el-row>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
@@ -67,7 +67,7 @@
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
|
||||
<el-form-item v-if="false" label="路线标识" prop="line_uuid">
|
||||
<el-input v-model="form.line_uuid" style="width: 370px;"/>
|
||||
<el-input v-model="form.line_uuid" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="路由方案" prop="route_plan_id">
|
||||
@@ -87,12 +87,12 @@
|
||||
|
||||
<el-form-item label="当前设备名称" prop="device_code">
|
||||
<el-select
|
||||
ref="test"
|
||||
v-model="form.device_code"
|
||||
filterable
|
||||
ref="test"
|
||||
clearable
|
||||
multiple
|
||||
reserveKeyword
|
||||
reserve-keyword
|
||||
placeholder="请选择"
|
||||
style="width: 370px;"
|
||||
>
|
||||
@@ -110,7 +110,7 @@
|
||||
v-model="form.next_device_code"
|
||||
filterable
|
||||
clearable
|
||||
reserveKeyword
|
||||
reserve-keyword
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
style="width: 370px;"
|
||||
@@ -139,10 +139,10 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="权值" prop="weights">
|
||||
<el-input-number v-model="form.weights" :min="1" :max="10" label="描述文字"/>
|
||||
<el-input-number v-model="form.weights" :min="1" :max="10" label="描述文字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述信息" prop="description">
|
||||
<el-input v-model="form.remark" style="width: 370px;" rows="5" type="textarea"/>
|
||||
<el-input v-model="form.remark" style="width: 370px;" rows="5" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -160,20 +160,20 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column v-if="false" prop="line_uuid" label="路线标识"/>
|
||||
<el-table-column prop="device_code" label="设备编码"/>
|
||||
<el-table-column v-if="false" prop="device_code" label="设备名称"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="line_uuid" label="路线标识" />
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column v-if="false" prop="device_code" label="设备名称" />
|
||||
<el-table-column prop="type" label="路由类型">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type=='0' ">输送路由</span>
|
||||
<span v-if="scope.row.type=='1' ">agv路由</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="next_device_code" min-width="120" label="后置设备号"/>
|
||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备名称"/>
|
||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备类型"/>
|
||||
<el-table-column prop="weights" label="权值"/>
|
||||
<el-table-column prop="next_device_code" min-width="120" label="后置设备号" />
|
||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备名称" />
|
||||
<el-table-column v-if="false" prop="next_device_code" min-width="120" label="后置设备类型" />
|
||||
<el-table-column prop="weights" label="权值" />
|
||||
|
||||
<el-table-column label="是否启用" align="center" prop="is_active">
|
||||
<template slot-scope="scope">
|
||||
@@ -188,8 +188,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="update_by" label="修改者"/>
|
||||
<el-table-column prop="update_time" min-width="160" label="修改时间"/>
|
||||
<el-table-column prop="update_by" label="修改者" />
|
||||
<el-table-column prop="update_time" min-width="160" label="修改时间" />
|
||||
<el-table-column
|
||||
v-permission="['admin','routeLine:edit','routeLine:del']"
|
||||
label="操作"
|
||||
@@ -206,7 +206,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -314,6 +314,13 @@ export default {
|
||||
this.form.next_device_code = Array.of(data.form.next_device_code.split('').join(''))
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit](data) {
|
||||
if (this.crud.status.edit === 1) {
|
||||
this.form.device_code = data.form.device_code.join('')
|
||||
this.form.next_device_code = data.form.next_device_code.join('')
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data) {
|
||||
var msg = '停用'
|
||||
|
||||
Reference in New Issue
Block a user