|
|
@@ -0,0 +1,667 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<crud-template :ref="(el) => (crudRef = el)" class="as-weight" :home-data="field" :table-data="tableData" |
|
|
|
@btnSearch="btnSearch" @add="add" @handleEdit="handleEdit" @cancel="cancel" |
|
|
|
@refreshLeft="refreshLeft" @download="downloadHandle" @CurrentChange="handleCurrentChange" |
|
|
|
@pageSizeChange="(val) => { |
|
|
|
field.paging.currentPage = 1 |
|
|
|
field.paging.pageSize = val |
|
|
|
getList() |
|
|
|
} |
|
|
|
"> |
|
|
|
<template #search> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.customerName" style="width: 200px" |
|
|
|
placeholder="请输入用户姓名"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.customerIdNum" style="width: 200px" |
|
|
|
placeholder="请输入身份证号"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.cardId" style="width: 200px" |
|
|
|
placeholder="请输入卡号"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.cardVehiclePlate" style="width: 200px" |
|
|
|
placeholder="请输入卡车牌号码"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.cardVehiclePlateColor" style="width: 200px" |
|
|
|
placeholder="请输入卡车牌颜色"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.obuId" style="width: 200px" |
|
|
|
placeholder="请输入obu编号"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.obuVehiclePlate" style="width: 200px" |
|
|
|
placeholder="请输入签车牌号码"/> |
|
|
|
<el-input maxlength="60" v-trim clearable v-model="searchForm.obuVehiclePlateColor" style="width: 200px" |
|
|
|
placeholder="请输入签车牌颜色"/> |
|
|
|
<el-select clearable v-model="searchForm.sourceType" placeholder="请选择来源" style="width: 150px"> |
|
|
|
<el-option :label="item.label" :key="item.label" :value="item.value" v-for="item in DATA_SOURCE"/> |
|
|
|
</el-select> |
|
|
|
<el-date-picker unlink-panels v-model="value1" type="datetimerange" range-separator="到" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" |
|
|
|
@change="dateChangeHandle" :clearable="false"/> |
|
|
|
</template> |
|
|
|
</crud-template> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<!-- 接入渠道查询 --> |
|
|
|
<script lang="ts" setup> |
|
|
|
// @ts-ignore crudFrom模板 |
|
|
|
import CrudTemplate from '@/crud/index.vue' |
|
|
|
import {ref, onMounted, computed, reactive, toRaw} from 'vue' |
|
|
|
import {ElMessage} from 'element-plus' |
|
|
|
import BaseService from '@/utils/baseService' |
|
|
|
import moment from 'moment' |
|
|
|
import $storeinitData from '@/store/initData' //引入tab vuex |
|
|
|
import {IsPermission} from '@/router/routerUtil' |
|
|
|
import {useRoute} from 'vue-router' |
|
|
|
import $storeInitData from '@/store/initData' |
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
const VEHICLE_COLOR_TYPE = computed(() => { |
|
|
|
return $storeinitData.state.dictData['VEHICLE_COLOR_TYPE'] || [] |
|
|
|
}) |
|
|
|
const DATA_SOURCE = computed(() => { |
|
|
|
return $storeinitData.state.dictData['DATA_SOURCE'] || [] |
|
|
|
}) |
|
|
|
|
|
|
|
const crudRef = ref() |
|
|
|
const searchForm = ref({ |
|
|
|
sourceType: '', |
|
|
|
customerName: '', |
|
|
|
customerIdNum: '', |
|
|
|
cardId: '', |
|
|
|
cardVehiclePlate: '', |
|
|
|
cardVehiclePlateColor: '', |
|
|
|
obuId: '', |
|
|
|
obuVehiclePlate: '', |
|
|
|
obuVehiclePlateColor: '', |
|
|
|
startTime: '', |
|
|
|
endTime: '', |
|
|
|
}) |
|
|
|
const value1 = ref() // 筛选时间 |
|
|
|
const tableData = ref([]) |
|
|
|
|
|
|
|
//表单数据配置 |
|
|
|
const formLabelWidth = '180px' |
|
|
|
const field = ref({ |
|
|
|
tabSize: 'small', //Table 的尺寸 large / default /small (默认default) |
|
|
|
searchShow: true, //是否显示搜索模块(默认false) |
|
|
|
border: true, //是否添加边框(默认false) |
|
|
|
dialogCustom: false, //自定义Dialog (默认false) |
|
|
|
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) |
|
|
|
dialogWidth: '40%', //dialog宽度 (默认40%) |
|
|
|
crudShow: false, //是否显示CURD操作栏 (默认true) |
|
|
|
crudChildShow: false, //是否显示CURD子操作栏 (默认true) |
|
|
|
paginStart: true, //是否显示分页查询 (默认false) |
|
|
|
isPageSizes: true, |
|
|
|
pageLayout: 'total, sizes, prev, pager, next', |
|
|
|
titleDialog: '', //table 标题 |
|
|
|
paging: { |
|
|
|
pageSize: 10, |
|
|
|
currentPage: 1, |
|
|
|
total: 0, |
|
|
|
}, |
|
|
|
crud: { |
|
|
|
add: IsPermission(route, 'ADD_BASE'), |
|
|
|
}, |
|
|
|
searchOperation: { |
|
|
|
isDownload: false, // 导出 |
|
|
|
isToLead: false, // 导入 |
|
|
|
isAdd: false, |
|
|
|
isTransferMachine: false, |
|
|
|
}, |
|
|
|
tableSize: -1, |
|
|
|
operateShow: true, //是否为表格添加操作栏(默认true) |
|
|
|
operateTitle: '操作', //操作栏标题(默认为"") |
|
|
|
operateFixed: true, //操作栏是否固定(默认false) |
|
|
|
operateWidth: '200', //操作栏宽度 |
|
|
|
operate: { |
|
|
|
info: true, //详情 |
|
|
|
edit: false, //是否编辑(默认true) |
|
|
|
delete: false, //是否删除(默认true) |
|
|
|
remark: false, // 查看 |
|
|
|
}, |
|
|
|
extend: [ |
|
|
|
{ |
|
|
|
type: 'index', |
|
|
|
label: '序号', |
|
|
|
}, |
|
|
|
], |
|
|
|
field: [ |
|
|
|
{ |
|
|
|
label: 'openId', |
|
|
|
prop: 'openId', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '查询时间', |
|
|
|
prop: 'queryTime', |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '-'; |
|
|
|
}, |
|
|
|
hideEdit: true, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "来源", |
|
|
|
prop: "sourceType", |
|
|
|
listData: DATA_SOURCE, |
|
|
|
form: { |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: "90%", |
|
|
|
type: "select", |
|
|
|
listData: DATA_SOURCE, |
|
|
|
required: true, |
|
|
|
hideEdit: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
prop: 'customerName', |
|
|
|
label: '用户姓名', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '身份证号', |
|
|
|
prop: 'customerIdNum', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'ETC卡号', |
|
|
|
prop: 'cardId', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡行驶证车辆类型', |
|
|
|
prop: 'cardVehicleType', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡车牌号码', |
|
|
|
prop: 'cardVehiclePlate', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡车牌颜色', |
|
|
|
prop: 'cardVehiclePlateColor', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡启用时间', |
|
|
|
prop: 'cardEnableTime', |
|
|
|
hide: true, |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '-'; |
|
|
|
}, |
|
|
|
hideEdit: true, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡过期时间', |
|
|
|
prop: 'cardExpireTime', |
|
|
|
hide: true, |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '-'; |
|
|
|
}, |
|
|
|
hideEdit: true, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '校验值', |
|
|
|
prop: 'checksums', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡版本号', |
|
|
|
prop: 'cardVersion', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '卡签绑定完成状态', |
|
|
|
prop: 'bindingFinishStatus', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'obu号', |
|
|
|
prop: 'obuId', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '行驶证车辆类型', |
|
|
|
prop: 'obuVehicleType', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车辆用户类型', |
|
|
|
prop: 'obuVehicleCustomerType', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '签车牌号码', |
|
|
|
prop: 'obuVehiclePlate', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '签车牌颜色', |
|
|
|
prop: 'obuVehiclePlateColor', |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '核定载人数', |
|
|
|
prop: 'approvedCount', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车辆识别代号', |
|
|
|
prop: 'vin', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '发动机号码', |
|
|
|
prop: 'vehicleEngineNum', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车轮数', |
|
|
|
prop: 'wheelCount', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车轴数', |
|
|
|
prop: 'axleCount', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '轴距', |
|
|
|
prop: 'axleDistance', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '外廓尺寸', |
|
|
|
prop: 'vehicleDimensions', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '签启用时间', |
|
|
|
prop: 'obuEnableTime', |
|
|
|
hide: true, |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '-'; |
|
|
|
}, |
|
|
|
hideEdit: true, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '签到期时间', |
|
|
|
prop: 'obuExpireTime', |
|
|
|
hide: true, |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
funRuleStarts: true, |
|
|
|
funRule: (time: any) => { |
|
|
|
return time ? time.replace('T', ' ') : '-'; |
|
|
|
}, |
|
|
|
hideEdit: true, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否激活', |
|
|
|
prop: 'isActive', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
listData: [ |
|
|
|
{ value: true, label: '是' }, |
|
|
|
{ value: false, label: '否' }, |
|
|
|
], |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '拆卸状态', |
|
|
|
prop: 'loadStatus', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
listData: [ |
|
|
|
{ value: true, label: '是' }, |
|
|
|
{ value: false, label: '否' }, |
|
|
|
], |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'obu版本号', |
|
|
|
prop: 'obuVersion', |
|
|
|
hide: true, |
|
|
|
form: { |
|
|
|
disabled: false, |
|
|
|
formLabelWidth: formLabelWidth, |
|
|
|
width: '90%', |
|
|
|
type: 'input', |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}) |
|
|
|
const typeOption = ref('') |
|
|
|
|
|
|
|
// 编辑按钮 |
|
|
|
function handleEdit(idx: any, row: any) { |
|
|
|
changeStatus(true) |
|
|
|
typeOption.value = 'edit' |
|
|
|
} |
|
|
|
|
|
|
|
function changeStatus(b) { |
|
|
|
field.value.field.forEach((item: any) => { |
|
|
|
if ( |
|
|
|
item.prop == 'accessChannelCode' |
|
|
|
) { |
|
|
|
item.form.disabled = b |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 新增按钮 |
|
|
|
function add() { |
|
|
|
changeStatus(false) |
|
|
|
typeOption.value = "add"; |
|
|
|
} |
|
|
|
|
|
|
|
// 取消 |
|
|
|
function cancel() { |
|
|
|
crudRef.value.reset() |
|
|
|
crudRef.value.dialogFormVisible = false |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索按钮 |
|
|
|
function btnSearch() { |
|
|
|
field.value.paging.currentPage = 1 |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索重置 |
|
|
|
function refreshLeft() { |
|
|
|
field.value.paging.currentPage = 1 |
|
|
|
searchForm.value = { |
|
|
|
sourceType: '', |
|
|
|
customerName: '', |
|
|
|
customerIdNum: '', |
|
|
|
cardId: '', |
|
|
|
cardVehiclePlate: '', |
|
|
|
cardVehiclePlateColor: '', |
|
|
|
obuId: '', |
|
|
|
obuVehiclePlate: '', |
|
|
|
obuVehiclePlateColor: '', |
|
|
|
startTime: '', |
|
|
|
endTime: '', |
|
|
|
} |
|
|
|
value1.value = null |
|
|
|
tableData.value = [] |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
function dateChangeHandle(val) { |
|
|
|
if (val) { |
|
|
|
searchForm.value.startTime = val[0]; |
|
|
|
searchForm.value.endTime = val[1] |
|
|
|
} else { |
|
|
|
searchForm.value.startTime = ""; |
|
|
|
searchForm.value.endTime = "" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 处理请求参数 |
|
|
|
const handleParams = (isPage?) => { |
|
|
|
let params: any = {} |
|
|
|
if (!isPage) { |
|
|
|
params.pageNo = field.value.paging.currentPage |
|
|
|
params.pageSize = field.value.paging.pageSize |
|
|
|
} |
|
|
|
for (const key in searchForm.value) { |
|
|
|
let data = searchForm.value[key] |
|
|
|
if (data || data === 0) { |
|
|
|
params[key] = data |
|
|
|
} |
|
|
|
} |
|
|
|
return params |
|
|
|
} |
|
|
|
const isDetailShow = ref(false) |
|
|
|
const selectedData = ref<any>({}) |
|
|
|
const isEditShow = ref(false) |
|
|
|
const handleData = (scope, key) => { |
|
|
|
// console.log(scope) |
|
|
|
if (key == 'detail') { |
|
|
|
isDetailShow.value = true |
|
|
|
} else { |
|
|
|
isEditShow.value = true |
|
|
|
} |
|
|
|
selectedData.value = scope.row |
|
|
|
} |
|
|
|
|
|
|
|
// 获取列表 |
|
|
|
function getList() { |
|
|
|
crudRef.value.tableLoding = true |
|
|
|
const params = handleParams() |
|
|
|
// console.log(params, 'paramsparams') |
|
|
|
BaseService.postN('/managew/api/deviceQuery/page', params).then( |
|
|
|
(res: any) => { |
|
|
|
if (res && res.statusCode === 0) { |
|
|
|
let bizContent = res.data |
|
|
|
let data = bizContent.result || []; |
|
|
|
tableData.value = data |
|
|
|
// console.log(bizContent) |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
field.value.paging.total = bizContent.totalCount |
|
|
|
} else { |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
ElMessage.error(res.errorMsg) |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
function handleCurrentChange(val: number) { |
|
|
|
field.value.paging.currentPage = val |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
import {optionExportFn} from '@/views/optionalSystem/optionUtils' |
|
|
|
|
|
|
|
// 导出 |
|
|
|
function downloadHandle() { |
|
|
|
const params = handleParams() |
|
|
|
optionExportFn('64fdfd607b4f4356ba55d44c24ab31a2', params, '接入渠道') |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
getList() |
|
|
|
}) |
|
|
|
</script> |