2024-05-30 13:52:06 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<label class="el-form-item-label">代码</label>
|
2024-06-21 15:20:54 +08:00
|
|
|
|
<el-input v-model="query.code" clearable placeholder="代码" style="width: 185px;" class="filter-item"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<label class="el-form-item-label">名称</label>
|
2024-06-21 15:20:54 +08:00
|
|
|
|
<el-input v-model="query.name" clearable placeholder="名称" style="width: 185px;" class="filter-item"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<label class="el-form-item-label">状态</label>
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.status"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
placeholder="状态"
|
|
|
|
|
|
class="filter-item"
|
2024-06-21 15:20:54 +08:00
|
|
|
|
style="width: 185px"
|
2024-05-30 13:52:06 +08:00
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.use_status"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
<label class="el-form-item-label">库区</label>
|
2024-11-01 17:58:26 +08:00
|
|
|
|
<el-select v-model="query.areaName"
|
|
|
|
|
|
style="width: 185px;"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@change="getArea()"
|
|
|
|
|
|
>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="area in areas"
|
|
|
|
|
|
:key="area.id"
|
|
|
|
|
|
:label="area.name"
|
|
|
|
|
|
:value="area.name"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
|
|
<rrOperation :crud="crud"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
|
|
|
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
class="upload-demo"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
slot="right"
|
2024-05-30 13:52:06 +08:00
|
|
|
|
style="float: right;padding-left: 5px"
|
|
|
|
|
|
:headers="headers"
|
2024-07-04 13:22:13 +08:00
|
|
|
|
:action="baseApi+'/api/point/import_point'"
|
2024-05-30 13:52:06 +08:00
|
|
|
|
:file-list="fileList"
|
|
|
|
|
|
:on-error="handleErr"
|
|
|
|
|
|
:on-success=" (response, file, fileList) => { return handleSuccess(response, file, fileList,crud);}"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:show-file-list="true"
|
|
|
|
|
|
>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-button size="mini" type="success" icon="el-icon-upload2">导入</el-button>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
|
|
</crudOperation>
|
|
|
|
|
|
|
|
|
|
|
|
<!--表单组件-->
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:title="crud.status.title" width="500px" top="20px"
|
|
|
|
|
|
>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
2024-07-31 17:21:40 +08:00
|
|
|
|
<el-form-item label="库区" prop="area">
|
|
|
|
|
|
<el-select @change="getArea" v-model="form.area"
|
|
|
|
|
|
value-key="id" filterable
|
2024-11-01 17:58:26 +08:00
|
|
|
|
placeholder="请选择" style="width: 370px;"
|
|
|
|
|
|
>
|
2024-07-31 17:21:40 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in areas"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
:value="item"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="代码" prop="code">
|
|
|
|
|
|
<el-input v-model="form.code" style="width: 370px;"/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="名称">
|
|
|
|
|
|
<el-input v-model="form.name" style="width: 370px;"/>
|
|
|
|
|
|
</el-form-item>
|
2024-06-11 17:04:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
|
|
|
<el-select v-model="form.type" filterable placeholder="请选择" style="width: 370px;"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:default-first-option="true"
|
|
|
|
|
|
>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.point_type"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2024-07-31 17:21:40 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="排" prop="posX" v-if="showPaiLieCeng">
|
|
|
|
|
|
<el-input v-model="form.posX" value="1" style="width: 370px;"/>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2024-07-31 17:21:40 +08:00
|
|
|
|
<el-form-item label="列" prop="posY" v-if="showPaiLieCeng">
|
|
|
|
|
|
<el-input v-model="form.posY" style="width: 370px;"/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="层" prop="posZ" v-if="showPaiLieCeng">
|
|
|
|
|
|
<el-input v-model="form.posZ" style="width: 370px;"/>
|
2024-06-12 10:29:45 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2024-07-31 17:21:40 +08:00
|
|
|
|
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-form-item label="状态">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.status"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
placeholder="状态"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
style="width: 370px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.use_status"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="描述">
|
|
|
|
|
|
<el-input type="textarea" v-model="form.description" style="width: 370px;"/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button @click="crud.cancelCU">取消</el-button>
|
|
|
|
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--表格渲染-->
|
2024-07-09 15:03:14 +08:00
|
|
|
|
<el-table ref="table" height="63vh" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-table-column type="selection" width="55"/>
|
|
|
|
|
|
<el-table-column prop="code" label="代码"/>
|
|
|
|
|
|
<el-table-column prop="name" label="名称"/>
|
|
|
|
|
|
<el-table-column prop="type" label="类型">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.point_type[scope.row.type] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-12 10:56:40 +08:00
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="status"
|
|
|
|
|
|
label="状态"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
:filters="[{ text: '空闲', value: 'FREE' }, { text: '占用', value: 'USED' }]"
|
|
|
|
|
|
:filter-method="filterTag"
|
|
|
|
|
|
filter-placement="bottom-end">
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<template slot-scope="scope">
|
2024-11-12 10:56:40 +08:00
|
|
|
|
<el-tag
|
|
|
|
|
|
:type="dict.label.use_status[scope.row.status] === '空闲' ? 'success' : 'danger'"
|
|
|
|
|
|
disable-transitions> {{ dict.label.use_status[scope.row.status] }}
|
|
|
|
|
|
</el-tag>
|
2024-05-30 13:52:06 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-11-12 10:56:40 +08:00
|
|
|
|
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="areaName" label="库区">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div>{{ scope.row.area.name }}</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="启用" align="center" prop="enabled">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-switch
|
|
|
|
|
|
v-model="scope.row.enabled"
|
|
|
|
|
|
active-color="#409EFF"
|
|
|
|
|
|
inactive-color="#F56C6C"
|
|
|
|
|
|
@change="changeEnabled(scope.row, scope.row.enabled)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-18 15:53:00 +08:00
|
|
|
|
<el-table-column v-if="checkPer(['admin','point:edit','point:del'])" label="操作" align="center">
|
2024-05-30 13:52:06 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<udOperation
|
|
|
|
|
|
:data="scope.row"
|
|
|
|
|
|
:permission="permission"
|
|
|
|
|
|
:show-dle="false"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
|
|
|
|
|
<div style="float: right;">
|
|
|
|
|
|
<pagination/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-06-11 17:04:21 +08:00
|
|
|
|
import crudPoint from '@/api/point'
|
2024-11-01 17:58:26 +08:00
|
|
|
|
import crudArea from '@/api/area'
|
2024-11-12 10:56:40 +08:00
|
|
|
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
2024-05-30 13:52:06 +08:00
|
|
|
|
import crudOperation from '@crud/CRUD.operation'
|
|
|
|
|
|
import udOperation from '@crud/UD.operation'
|
|
|
|
|
|
import rrOperation from '@crud/RR.operation'
|
|
|
|
|
|
import pagination from '@crud/Pagination'
|
2024-11-12 10:56:40 +08:00
|
|
|
|
import {getToken} from '@/utils/auth'
|
|
|
|
|
|
import {mapGetters} from 'vuex'
|
2024-05-30 13:52:06 +08:00
|
|
|
|
|
2024-06-11 17:04:21 +08:00
|
|
|
|
const defaultForm = {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
status: 'FREE',
|
|
|
|
|
|
enabled: 1,
|
|
|
|
|
|
code: null,
|
|
|
|
|
|
name: null,
|
|
|
|
|
|
type: null,
|
|
|
|
|
|
dept: null,
|
|
|
|
|
|
description: null,
|
|
|
|
|
|
area: null,
|
2024-07-31 17:21:40 +08:00
|
|
|
|
posX: null,
|
|
|
|
|
|
posY: null,
|
|
|
|
|
|
posZ: null
|
2024-06-11 17:04:21 +08:00
|
|
|
|
}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Point',
|
|
|
|
|
|
components: {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
pagination, crudOperation, udOperation, rrOperation
|
2024-05-30 13:52:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
2024-06-11 17:04:21 +08:00
|
|
|
|
dicts: ['base_staus', 'use_status', 'point_type', 'agv_on_off', 'smallArea', 'item_height'],
|
2024-05-30 13:52:06 +08:00
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({
|
2024-11-12 10:56:40 +08:00
|
|
|
|
title: '点位', url: 'api/point', idField: 'id', sort: 'id,desc', crudMethod: {...crudPoint},
|
2024-05-30 13:52:06 +08:00
|
|
|
|
optShow: {
|
|
|
|
|
|
add: true,
|
|
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
|
|
|
|
|
reset: true,
|
|
|
|
|
|
download: true
|
|
|
|
|
|
},
|
|
|
|
|
|
queryOnPresenterCreated: true
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2024-07-04 13:22:13 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
...mapGetters([
|
|
|
|
|
|
'baseApi'
|
|
|
|
|
|
]),
|
2024-07-31 17:21:40 +08:00
|
|
|
|
showPaiLieCeng() {
|
2024-07-04 13:22:13 +08:00
|
|
|
|
// 通过库区控制高度显示隐藏
|
2024-11-01 17:58:26 +08:00
|
|
|
|
return this.form.area && (this.form.area.code === 'DJQ' || this.form.area.code === 'XJQ')
|
2024-07-04 13:22:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-05-30 13:52:06 +08:00
|
|
|
|
data() {
|
2024-07-31 17:21:40 +08:00
|
|
|
|
var validateCode = (rule, value, callback) => {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
// 检查输入是否为空
|
|
|
|
|
|
if (!value) {
|
|
|
|
|
|
return callback(new Error('请输入代码'));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取区域代码
|
|
|
|
|
|
const areaCode = this.form.area.code;
|
|
|
|
|
|
|
|
|
|
|
|
// 检查是否需要验证特定格式
|
|
|
|
|
|
if (['DJQ', 'XJQ'].includes(areaCode)) {
|
2024-07-31 17:21:40 +08:00
|
|
|
|
const parts = value.split('-');
|
2024-11-01 17:58:26 +08:00
|
|
|
|
|
|
|
|
|
|
// 检查格式是否正确
|
2024-07-31 17:21:40 +08:00
|
|
|
|
if (parts.length === 4) {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
[this.form.posX, this.form.posY, this.form.posZ] = parts.slice(1);
|
|
|
|
|
|
return callback();
|
2024-07-31 17:21:40 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.form.posX = null;
|
|
|
|
|
|
this.form.posY = null;
|
|
|
|
|
|
this.form.posZ = null;
|
2024-11-01 17:58:26 +08:00
|
|
|
|
const msg = areaCode === 'DJQ' ? 'DJ' : 'XJ';
|
|
|
|
|
|
return callback(new Error(`格式错误,格式为(${msg}-01-01-001): 编码-xx-xx-xxx`));
|
2024-07-31 17:21:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-01 17:58:26 +08:00
|
|
|
|
// 如果不需要验证特定格式,直接通过
|
|
|
|
|
|
callback();
|
2024-07-31 17:21:40 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2024-05-30 13:52:06 +08:00
|
|
|
|
return {
|
|
|
|
|
|
//地标点数据
|
|
|
|
|
|
fileList: [],
|
|
|
|
|
|
from1: [],
|
|
|
|
|
|
fromBack: [],
|
|
|
|
|
|
pointListData: [],
|
2024-11-12 10:56:40 +08:00
|
|
|
|
headers: {'Authorization': getToken()},
|
2024-05-30 13:52:06 +08:00
|
|
|
|
queryTypeOptions: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{key: 'code', display_name: '代码'},
|
|
|
|
|
|
{key: 'name', display_name: '名称'},
|
|
|
|
|
|
{key: 'status', display_name: '状态'},
|
|
|
|
|
|
{key: 'beatCode', display_name: '区域编码'},
|
|
|
|
|
|
{key: 'areaCode', display_name: '仓库'},
|
|
|
|
|
|
{key: 'enabled', display_name: '启用'}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
areas: [],
|
|
|
|
|
|
permission: {
|
|
|
|
|
|
add: ['admin', 'point:add'],
|
|
|
|
|
|
edit: ['admin', 'point:edit'],
|
|
|
|
|
|
del: ['admin', 'point:del']
|
|
|
|
|
|
},
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
code: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{validator: validateCode, required: true, trigger: 'blur'}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
type: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{required: true, message: '类型不能为空', trigger: 'blur'}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
area: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{required: true, message: '库区不能为空', trigger: 'blur'}
|
2024-06-18 15:53:00 +08:00
|
|
|
|
],
|
2024-07-31 17:21:40 +08:00
|
|
|
|
posX: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{required: true, message: '排不能为空', trigger: 'blur'}
|
2024-07-31 17:21:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
posY: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{required: true, message: '列不能为空', trigger: 'blur'}
|
2024-07-31 17:21:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
posZ: [
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{required: true, message: '层不能为空', trigger: 'blur'}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
]
|
2024-11-01 17:58:26 +08:00
|
|
|
|
}
|
2024-05-30 13:52:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.getArea()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
handleSuccess(response, file, fileList, crud) {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
let myError = response.toString()//转字符串
|
|
|
|
|
|
this.crud.notify(response['message'], CRUD.NOTIFICATION_TYPE.SUCCESS)
|
2024-05-30 13:52:06 +08:00
|
|
|
|
crud.toQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
handleErr(err, file, fileList) {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
let myError = err.toString()//转字符串
|
|
|
|
|
|
myError = myError.replace('Error: ', '') // 去掉前面的" Error: "
|
|
|
|
|
|
myError = JSON.parse(myError)//转对象
|
|
|
|
|
|
this.crud.notify(myError['message'], CRUD.NOTIFICATION_TYPE.ERROR)
|
2024-05-30 13:52:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
},
|
|
|
|
|
|
// 改变状态
|
|
|
|
|
|
changeEnabled(data, val) {
|
|
|
|
|
|
this.$confirm('此操作将 "' + this.dict.label.base_staus[val] + ', 是否继续?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
crudPoint.edit(data).then(res => {
|
|
|
|
|
|
this.crud.notify(this.dict.label.base_staus[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
data.enabled = !data.enabled
|
|
|
|
|
|
})
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
data.enabled = !data.enabled
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
getArea() {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
crudArea.queryAreaAll({}).then(res => {
|
|
|
|
|
|
this.areas = res
|
2024-05-30 13:52:06 +08:00
|
|
|
|
})
|
2024-11-12 10:56:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
filterTag(value, row) {
|
|
|
|
|
|
return row.status === value
|
2024-05-30 13:52:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|