feat:云音箱
This commit is contained in:
1 parent
f9b2e1ae4a
commit
0a138d258d
2 files changed
+39
-46
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="120px"
|
||||
v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="设备名" prop="name">
|
||||
@@ -25,6 +26,11 @@
|
||||
<dict-select v-model="form.type" dict-code="hard_type" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="['10'].includes(form.type)" :span="24" class="mb20">
|
||||
<el-form-item label="唯一编号" prop="uniqueCode">
|
||||
<el-input v-model="form.uniqueCode" placeholder="设备唯一编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -52,6 +58,7 @@ const loading = ref(false)
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id: "",
|
||||
uniqueCode: "",
|
||||
merchantId: "",
|
||||
deptId: "",
|
||||
name: "",
|
||||
@@ -62,6 +69,7 @@ const form = reactive({
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
name: [{ required: true, message: "设备名不能为空", trigger: "blur" }],
|
||||
uniqueCode: [{ required: true, message: "设备唯一编号不能为空", trigger: "blur" }],
|
||||
merchantId: [{ required: true, message: "商户不能为空", trigger: "change" }],
|
||||
hardGroupId: [{ required: true, message: "分组不能为空", trigger: "change" }],
|
||||
type: [{ required: true, message: "设备类型不能为空", trigger: "change" }],
|
||||
@@ -86,7 +94,7 @@ const openDialog = (id: string) => {
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
const valid = await dataFormRef.value.validate().catch(() => { })
|
||||
if (!valid) return false
|
||||
|
||||
try {
|
||||
|
||||
@@ -13,45 +13,30 @@
|
||||
<select-mch v-model="state.queryForm.merchantIds" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn")
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'hard_hardManager_add'">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'hard_hardManager_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'hard_hardManager_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'hard_hardManager_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'hard_hardManager_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'hard_hardManager_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="name" width="200" label="设备名" />
|
||||
@@ -67,38 +52,38 @@
|
||||
<el-table-column prop="mainTopic" width="350" label="topic" />
|
||||
<el-table-column prop="isTakeFood" width="200" label="是否为当前商户的取餐机器">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
:disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
:loading="switchTakeFoodLoading"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
v-model="row.isTakeFood"
|
||||
@change="changeTakeFood($event, row)"
|
||||
/>
|
||||
<el-switch :disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
:loading="switchTakeFoodLoading" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="0" v-model="row.isTakeFood" @change="changeTakeFood($event, row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="创建时间" />
|
||||
<el-table-column v-auths="['hard_hardManager_edit', 'hard_hardManager_del']" label="操作" fixed="right" width="400">
|
||||
<el-table-column v-auths="['hard_hardManager_edit', 'hard_hardManager_del']" label="操作" fixed="right"
|
||||
width="400">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.type == '4'" icon="InfoFilled" text type="primary" v-auth="'hard_hardManager_edit'" @click="doInfo(row)">
|
||||
<el-button v-if="row.type == '4'" icon="InfoFilled" text type="primary"
|
||||
v-auth="'hard_hardManager_edit'" @click="doInfo(row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardManager_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardManager_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="TrendCharts" link type="primary" v-auth="'hard_hardManager_edit'" @click="mqformDialogRef.openDialog(row.id)">
|
||||
<el-button v-if="!['10'].includes(row.type)" icon="TrendCharts" link type="primary"
|
||||
v-auth="'hard_hardManager_edit'" @click="mqformDialogRef.openDialog(row.id)">
|
||||
mq设置
|
||||
</el-button>
|
||||
<el-button icon="SetUp" link type="primary" v-auth="'hard_hardManager_edit'" @click="faceFormDialogRef.openDialog(row.id)">
|
||||
<el-button v-if="!['10'].includes(row.type)" icon="SetUp" link type="primary"
|
||||
v-auth="'hard_hardManager_edit'" @click="faceFormDialogRef.openDialog(row.id)">
|
||||
人脸sdk设置
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'hard_hardManager_del'" @click="handleDelete([row.id])">删除</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'hard_hardManager_del'"
|
||||
@click="handleDelete([row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
Reference in new issue
Block a user