update - 设备台账页面

master
yinq 8 months ago
parent f96210b377
commit 63c137c475

@ -42,3 +42,12 @@ export function delDeviceLedger(objId) {
method: 'delete' method: 'delete'
}) })
} }
// 查询设备台账列表
export function getDeviceCode(query) {
return request({
url: '/base/deviceLedger/getDeviceCode',
method: 'get',
params: query
})
}

@ -1,14 +1,42 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="设备编号" prop="deviceCode">--> <!-- <el-form-item label="设备编号" prop="deviceCode">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.deviceCode"--> <!-- v-model="queryParams.deviceCode"-->
<!-- placeholder="请输入设备编号"--> <!-- placeholder="请输入设备编号"-->
<!-- clearable--> <!-- clearable-->
<!-- @keyup.enter.native="handleQuery"--> <!-- @keyup.enter.native="handleQuery"-->
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="所属产线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="请选择所属产线" clearable>
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="班组" prop="teamCode" clearable>
<el-select v-model="form.teamCode" placeholder="请输入班组">
<el-option
v-for="item in teamMemberList"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备型号" prop="deviceModel">
<el-input
v-model="queryParams.deviceModel"
placeholder="请输入设备型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
<el-input <el-input
v-model="queryParams.deviceName" v-model="queryParams.deviceName"
@ -37,22 +65,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="使用部门" prop="usedDepartment">-->
<!-- <el-input-->
<!-- v-model="queryParams.usedDepartment"-->
<!-- placeholder="请输入使用部门"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="所属工位" prop="productLineCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.productLineCode"-->
<!-- placeholder="请输入所属工位"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -68,7 +80,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['base:deviceLedger:add']" v-hasPermi="['base:deviceLedger:add']"
>新增</el-button> >新增
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -79,7 +92,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['base:deviceLedger:edit']" v-hasPermi="['base:deviceLedger:edit']"
>修改</el-button> >修改
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -90,7 +104,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['base:deviceLedger:remove']" v-hasPermi="['base:deviceLedger:remove']"
>删除</el-button> >删除
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -100,30 +115,33 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['base:deviceLedger:export']" v-hasPermi="['base:deviceLedger:export']"
>导出</el-button> >导出
</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="deviceLedgerList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="deviceLedgerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/> <el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="资产编号" align="center" prop="assetCode" v-if="columns[19].visible"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" v-if="columns[1].visible"/> <el-table-column label="设备编号" align="center" prop="deviceCode" v-if="columns[1].visible"/>
<el-table-column label="设备名称" align="center" prop="deviceName" v-if="columns[2].visible"/> <el-table-column label="设备名称" align="center" prop="deviceName" v-if="columns[2].visible" width="150"/>
<el-table-column label="设备型号" align="center" prop="deviceModel" v-if="columns[3].visible"/> <el-table-column label="设备型号" align="center" prop="deviceModel" v-if="columns[3].visible" width="180"/>
<el-table-column label="设备类型" align="center" prop="deviceType" v-if="columns[4].visible"> <el-table-column label="设备类型" align="center" prop="deviceType" v-if="columns[4].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_type" :value="scope.row.deviceType"/> <dict-tag :options="dict.type.device_type" :value="scope.row.deviceType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备位置" align="center" prop="deviceAddress" v-if="columns[5].visible"/> <el-table-column label="IP地址" align="center" prop="deviceAddress" v-if="columns[5].visible" width="130"/>
<el-table-column label="设备状态" align="center" prop="deviceStatus" v-if="columns[6].visible"> <el-table-column label="设备状态" align="center" prop="deviceStatus" v-if="columns[6].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_status" :value="scope.row.deviceStatus"/> <dict-tag :options="dict.type.device_status" :value="scope.row.deviceStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所属班组" align="center" prop="teamName" v-if="columns[18].visible" width="120"/>
<el-table-column label="使用部门" align="center" prop="usedDepartment" v-if="columns[7].visible"/> <el-table-column label="使用部门" align="center" prop="usedDepartment" v-if="columns[7].visible"/>
<el-table-column label="所属工位" align="center" prop="productLineCode" v-if="columns[8].visible"/> <el-table-column label="所属产线" align="center" prop="productLineName" v-if="columns[8].visible"/>
<el-table-column label="成本中心" align="center" prop="costCenter" v-if="columns[14].visible"/> <el-table-column label="成本中心" align="center" prop="costCenter" v-if="columns[14].visible"/>
<el-table-column label="生产厂商" align="center" prop="manufacturer" v-if="columns[15].visible"/> <el-table-column label="生产厂商" align="center" prop="manufacturer" v-if="columns[15].visible"/>
<el-table-column label="启用日期" align="center" prop="enableDate" width="180" v-if="columns[16].visible"> <el-table-column label="启用日期" align="center" prop="enableDate" width="180" v-if="columns[16].visible">
@ -148,7 +166,7 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -156,14 +174,16 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['base:deviceLedger:edit']" v-hasPermi="['base:deviceLedger:edit']"
>修改</el-button> >修改
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['base:deviceLedger:remove']" v-hasPermi="['base:deviceLedger:remove']"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -177,85 +197,126 @@
/> />
<!-- 添加或修改设备台账对话框 --> <!-- 添加或修改设备台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备编号" prop="deviceCode"> <el-row>
<el-input v-model="form.deviceCode" placeholder="请输入设备编号" /> <el-col :span="12">
</el-form-item> <el-form-item label="设备编号" prop="deviceCode">
<el-form-item label="设备名称" prop="deviceName"> <el-input v-model="form.deviceCode" placeholder="请输入设备编号" :disabled="true"/>
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="设备型号" prop="deviceModel"> <el-col :span="12">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" /> <el-form-item label="资产编号" prop="assetCode">
</el-form-item> <el-input
<el-form-item label="设备类型" prop="deviceType"> v-model="queryParams.assetCode"
<el-select v-model="form.deviceType" placeholder="请选择设备类型"> placeholder="请输入资产编号"
<el-option clearable
v-for="dict in dict.type.device_type" @keyup.enter.native="handleQuery"
:key="dict.value" />
:label="dict.label" </el-form-item>
:value="parseInt(dict.value)" </el-col>
></el-option> <el-col :span="12">
</el-select> <el-form-item label="设备名称" prop="deviceName">
</el-form-item> <el-input v-model="form.deviceName" placeholder="请输入设备名称"/>
<el-form-item label="设备位置" prop="deviceAddress"> </el-form-item>
<el-input v-model="form.deviceAddress" placeholder="请输入设备位置" /> <el-form-item label="设备型号" prop="deviceModel">
</el-form-item> <el-input v-model="form.deviceModel" placeholder="请输入设备型号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型">
<el-option
v-for="dict in dict.type.device_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="IP地址" prop="deviceAddress">
<el-input v-model="form.deviceAddress" placeholder="请输入IP地址"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="使用部门" prop="usedDepartment">
<el-input v-model="form.usedDepartment" placeholder="请输入使用部门"/>
</el-form-item>
<el-form-item label="成本中心" prop="costCenter">
<el-input v-model="form.costCenter" placeholder="请输入成本中心"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="生产厂商" prop="manufacturer">
<el-input v-model="form.manufacturer" placeholder="请输入生产厂商"/>
</el-form-item>
<el-form-item label="启用日期" prop="enableDate">
<el-date-picker clearable
v-model="form.enableDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择启用日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属产线">
<el-select v-model="form.productLineCode" placeholder="请选择所属产线">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="班组">
<el-select v-model="form.teamCode" placeholder="请输入班组">
<el-option
v-for="item in teamMemberList"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工厂名称">
<el-select v-model="form.factoryCode" placeholder="请选择工厂名称">
<el-option
v-for="item in factoryList"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="设备状态" prop="deviceStatus"> <el-form-item label="设备状态" prop="deviceStatus">
<el-radio-group v-model="form.deviceStatus"> <el-radio-group v-model="form.deviceStatus">
<el-radio <el-radio
v-for="dict in dict.type.device_status" v-for="dict in dict.type.device_status"
:key="dict.value" :key="dict.value"
:label="parseInt(dict.value)" :label="parseInt(dict.value)"
>{{dict.label}}</el-radio> >{{ dict.label }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="使用部门" prop="usedDepartment"> <!-- <el-form-item label="启用标识" prop="isFlag">-->
<el-input v-model="form.usedDepartment" placeholder="请输入使用部门" /> <!-- <el-radio-group v-model="form.isFlag">-->
</el-form-item> <!-- <el-radio-->
<el-form-item label="成本中心" prop="costCenter"> <!-- v-for="dict in dict.type.is_flag"-->
<el-input v-model="form.costCenter" placeholder="请输入成本中心" /> <!-- :key="dict.value"-->
</el-form-item> <!-- :label="parseInt(dict.value)"-->
<el-form-item label="生产厂商" prop="manufacturer"> <!-- >{{dict.label}}</el-radio>-->
<el-input v-model="form.manufacturer" placeholder="请输入生产厂商" /> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="启用日期" prop="enableDate">
<el-date-picker clearable
v-model="form.enableDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择启用日期">
</el-date-picker>
</el-form-item>
<el-form-item label="所属工位">
<el-select v-model="form.productLineCode" placeholder="请选择所属工位">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属工厂">
<el-select v-model="form.factoryCode" placeholder="请选择所属工厂">
<el-option
v-for="item in factoryList"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="启用标识" prop="isFlag">-->
<!-- <el-radio-group v-model="form.isFlag">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="parseInt(dict.value)"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -266,13 +327,20 @@
</template> </template>
<script> <script>
import { listDeviceLedger, getDeviceLedger, delDeviceLedger, addDeviceLedger, updateDeviceLedger } from "@/api/base/deviceLedger"; import {
import { findFactoryList } from "@/api/base/factory"; listDeviceLedger,
import { findProductLineList } from "@/api/base/productLine"; getDeviceLedger,
delDeviceLedger,
addDeviceLedger,
updateDeviceLedger, getDeviceCode
} from '@/api/base/deviceLedger'
import { findFactoryList } from '@/api/base/factory'
import { findProductLineList } from '@/api/base/productLine'
import { getTeamMemberList } from '@//api/base/teamMembers'
export default { export default {
name: "DeviceLedger", name: 'DeviceLedger',
dicts: ['device_status', 'is_flag','device_type'], dicts: ['device_status', 'is_flag', 'device_type'],
data() { data() {
return { return {
// //
@ -290,9 +358,11 @@ export default {
// //
deviceLedgerList: [], deviceLedgerList: [],
// //
title: "", title: '',
// //
open: false, open: false,
//
teamMemberList: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -317,57 +387,61 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
},
columns: [ columns: [
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `设备编号`, visible: true }, { key: 1, label: `设备编号`, visible: true },
{ key: 2, label: `设备名称`, visible: true }, { key: 2, label: `设备名称`, visible: true },
{ key: 3, label: `设备型号`, visible: true }, { key: 3, label: `设备型号`, visible: true },
{ key: 4, label: `设备类型`, visible: true }, { key: 4, label: `设备类型`, visible: true },
{ key: 5, label: `设备位置`, visible: true }, { key: 5, label: `IP地址`, visible: true },
{ key: 6, label: `设备状态`, visible: true }, { key: 6, label: `设备状态`, visible: true },
{ key: 7, label: `使用部门`, visible: true }, { key: 7, label: `使用部门`, visible: true },
{ key: 8, label: `所属工位`, visible: true }, { key: 8, label: `所属产线`, visible: true },
{ key: 9, label: `启用标识`, visible: false }, { key: 9, label: `启用标识`, visible: false },
{ key: 10, label: `创建人`, visible: false }, { key: 10, label: `创建人`, visible: false },
{ key: 11, label: `创建时间`, visible: false }, { key: 11, label: `创建时间`, visible: false },
{ key: 12, label: `更新人`, visible: false }, { key: 12, label: `更新人`, visible: false },
{ key: 13, label: `更新时间`, visible: false }, { key: 13, label: `更新时间`, visible: false },
{ key: 14, label: `成本中心`, visible: true }, { key: 14, label: `成本中心`, visible: true },
{ key: 15, label: `生产厂商`, visible: true }, { key: 15, label: `生产厂商`, visible: true },
{ key: 16, label: `启用日期`, visible: true }, { key: 16, label: `启用日期`, visible: true },
{ key: 17, label: `所属工厂`, visible: true }, { key: 17, label: `工厂名称`, visible: true },
], { key: 18, label: `所属班组`, visible: true },
{ key: 19, label: `资产编号`, visible: true }
],
// 线 // 线
productLineList: [], productLineList: [],
// //
factoryList: [], factoryList: []
}; }
}, },
created() { created() {
this.getList(); this.getList()
findProductLineList().then(response => { findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data; this.productLineList = response.data
}); })
findFactoryList().then(response => { findFactoryList().then(response => {
this.factoryList = response.data; this.factoryList = response.data
}); })
}, },
methods: { methods: {
/** 查询设备台账列表 */ /** 查询设备台账列表 */
getList() { getList() {
this.loading = true; this.loading = true
listDeviceLedger(this.queryParams).then(response => { listDeviceLedger(this.queryParams).then(response => {
this.deviceLedgerList = response.rows; this.deviceLedgerList = response.rows
this.total = response.total; this.total = response.total
this.loading = false; this.loading = false
}); })
getTeamMemberList({ classes: 1 }).then(response => {
this.teamMemberList = response.data
})
}, },
// //
cancel() { cancel() {
this.open = false; this.open = false
this.reset(); this.reset()
}, },
// //
reset() { reset() {
@ -380,80 +454,86 @@ export default {
deviceAddress: null, deviceAddress: null,
deviceStatus: 0, deviceStatus: 0,
usedDepartment: null, usedDepartment: null,
productLineCode: null, productLineCode: 'CX_02',
costCenter: null, costCenter: null,
manufacturer: null, manufacturer: null,
factoryCode: null, factoryCode: '1301',
enableDate: null, enableDate: null,
isFlag: 0, isFlag: 0,
createdBy: null, createdBy: null,
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,
updatedTime: null updatedTime: null
}; }
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId) this.ids = selection.map(item => item.objId)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset()
this.open = true; getDeviceCode().then(res => {
this.title = "添加设备台账"; this.form.deviceCode = res.msg
this.open = true
this.title = '添加设备台账'
})
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset()
const objId = row.objId || this.ids const objId = row.objId || this.ids
getDeviceLedger(objId).then(response => { getDeviceLedger(objId).then(response => {
this.form = response.data; this.form = response.data
this.open = true; this.open = true
this.title = "修改设备台账"; this.title = '修改设备台账'
}); })
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.form.objId != null) { if (this.form.objId != null) {
updateDeviceLedger(this.form).then(response => { updateDeviceLedger(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess('修改成功')
this.open = false; this.open = false
this.getList(); this.getList()
}); })
} else { } else {
addDeviceLedger(this.form).then(response => { addDeviceLedger(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess('新增成功')
this.open = false; this.open = false
this.getList(); this.getList()
}); })
} }
} }
}); })
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const objIds = row.objId || this.ids; const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除设备台账编号为"' + objIds + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除设备台账编号为"' + objIds + '"的数据项?').then(function() {
return delDeviceLedger(objIds); return delDeviceLedger(objIds)
}).then(() => { }).then(() => {
this.getList(); this.getList()
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess('删除成功')
}).catch(() => {}); }).catch(() => {
})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -462,5 +542,5 @@ export default {
}, `deviceLedger_${new Date().getTime()}.xlsx`) }, `deviceLedger_${new Date().getTime()}.xlsx`)
} }
} }
}; }
</script> </script>

Loading…
Cancel
Save