2023-12-12 13:36:08 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<div style="z-index: 10000">
|
|
|
|
|
|
<div style="z-index: 10000">
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
|
ref="queryForm"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
v-show="showSearch"
|
|
|
|
|
|
label-width="68px"
|
|
|
|
|
|
style="z-index: 10000"
|
2023-12-19 04:26:18 +08:00
|
|
|
|
>
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-form-item label="关键字" prop="labelType">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.labelType"
|
|
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="设备类型" prop="typeId">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.typeId"
|
|
|
|
|
|
placeholder="请选择设备类型"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="typeItem in typeList"
|
|
|
|
|
|
:key="typeItem.typeId"
|
|
|
|
|
|
:label="typeItem.typeName"
|
|
|
|
|
|
:value="typeItem.typeId"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="规格型号" prop="modelId">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="queryParams.modelId"
|
|
|
|
|
|
placeholder="请选择规格型号"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="model in modelList"
|
|
|
|
|
|
:key="model.typeId"
|
|
|
|
|
|
:label="model.typeName"
|
|
|
|
|
|
:value="model.typeId"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2023-12-22 14:05:57 +08:00
|
|
|
|
<el-form-item label="绑定状态" prop="isBind">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-select
|
2023-12-22 14:05:57 +08:00
|
|
|
|
v-model="queryParams.isBind"
|
2023-12-20 20:17:03 +08:00
|
|
|
|
placeholder="请选择绑定状态"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option label="已绑定" value="1" />
|
|
|
|
|
|
<el-option label="未绑定" value="0" />
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-form-item>
|
|
|
|
|
|
<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-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
|
<!-- -->
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleBind"
|
|
|
|
|
|
:disabled="single"
|
|
|
|
|
|
>绑定</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<!-- :disabled="single" -->
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="createLabel"
|
|
|
|
|
|
>标签生成</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
@click="labelUpload"
|
|
|
|
|
|
>标签下载</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-col>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<!-- <el-col :span="1.5">
|
2023-12-12 13:36:08 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="single"
|
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
|
>删除</el-button>
|
2023-12-19 04:26:18 +08:00
|
|
|
|
</el-col> -->
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<!-- <el-col :span="1.5">
|
2023-12-12 13:36:08 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="warning"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
|
>导出</el-button>
|
2023-12-19 04:26:18 +08:00
|
|
|
|
</el-col> -->
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<right-toolbar
|
|
|
|
|
|
:showSearch.sync="showSearch"
|
|
|
|
|
|
@queryTable="getList"
|
|
|
|
|
|
></right-toolbar>
|
|
|
|
|
|
</el-row>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
|
:data="labelList"
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
<el-table-column label="序号" align="center" type="index" />
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="标签类型"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="name"
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="标签编号" align="center" prop="labelCode">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span
|
|
|
|
|
|
style="color: blue; cursor: pointer"
|
|
|
|
|
|
@click="labelUploadCode(scope.row)"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ scope.row.labelCode }}</span
|
|
|
|
|
|
>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="物品种类"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="kindName"
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="物品名称" align="center" prop="modelName" />
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="规格型号"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="typeName"
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="设备编码" align="center" prop="maCode" />
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="绑定人员"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="userName"
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column label="绑定时间" align="center" prop="bindTime" />
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="状态" align="center" prop="status">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{ scope.row.status == 1 ? '已绑定' : '未绑定' }}</span>
|
|
|
|
|
|
<!-- <dict-tag
|
|
|
|
|
|
:options="dict.type.sys_normal_disable"
|
|
|
|
|
|
:value="scope.row.status"
|
|
|
|
|
|
/> -->
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<!-- <el-button
|
2023-12-12 13:36:08 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
2023-12-19 04:26:18 +08:00
|
|
|
|
>编辑</el-button> -->
|
2023-12-22 14:05:57 +08:00
|
|
|
|
<!-- status 未绑定0 已绑定1 已解绑2 -->
|
|
|
|
|
|
<!-- isBind 不展示解绑0 展示解绑1 -->
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-button
|
2023-12-22 14:05:57 +08:00
|
|
|
|
v-if="scope.row.isBind == 1"
|
2023-12-20 20:17:03 +08:00
|
|
|
|
:disabled="scope.row.status == 0"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
|
>解绑</el-button
|
|
|
|
|
|
>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 标签绑定对话框 -->
|
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
2023-12-16 14:48:20 +08:00
|
|
|
|
<el-form-item label="标签类型" prop="labelType">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.labelType"
|
|
|
|
|
|
placeholder="请选择标签类型"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
disabled
|
|
|
|
|
|
>
|
2023-12-19 04:26:18 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in labelTypeList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
:value="item.id"
|
2023-12-20 20:17:03 +08:00
|
|
|
|
v-if="item.status != '1'"
|
2023-12-19 04:26:18 +08:00
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
2023-12-20 20:17:03 +08:00
|
|
|
|
</el-form-item>
|
2023-12-16 14:48:20 +08:00
|
|
|
|
<el-form-item label="标签编号" prop="labelCode">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.labelCode"
|
|
|
|
|
|
placeholder="请选择标签编号"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
disabled
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in labelCodeList"
|
|
|
|
|
|
:key="item.labelCode"
|
|
|
|
|
|
:label="item.labelCode"
|
|
|
|
|
|
:value="item.labelCode"
|
|
|
|
|
|
v-if="item.status != '1'"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
<!-- <el-input v-model="form.labelCode" placeholder="请输入标签编号" /> -->
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</el-form-item>
|
2023-12-16 14:48:20 +08:00
|
|
|
|
<el-form-item label="设备编码" prop="maCode">
|
|
|
|
|
|
<el-input v-model="form.maCode" placeholder="请输入设备编码" />
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 标签生成对话框 -->
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
:visible.sync="createOpen"
|
|
|
|
|
|
width="500px"
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
<el-form ref="cform" :model="cform" :rules="crules" label-width="80px">
|
|
|
|
|
|
<el-form-item label="标签类型" prop="labelType">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="cform.labelType"
|
|
|
|
|
|
placeholder="请选择标签类型"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in labelTypeList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
:value="item.id"
|
|
|
|
|
|
v-if="item.status != '1'"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
<!-- <el-input v-model="cform.labelType" placeholder="请输入标签类型" /> -->
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="标签数量" prop="labelNum">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-input-number
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
v-model="cform.labelNum"
|
|
|
|
|
|
controls-position="right"
|
|
|
|
|
|
:min="1"
|
|
|
|
|
|
:max="100"
|
|
|
|
|
|
placeholder="请输入标签数量"
|
|
|
|
|
|
></el-input-number>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="submitCreate">确 定</el-button>
|
|
|
|
|
|
<el-button @click="cancelCreate">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 标签下载对话框 -->
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
:visible.sync="uploadOpen"
|
|
|
|
|
|
width="500px"
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
|
<div class="uploadImg">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<div id="qrcode" class="qrcode" ref="codeItem"></div>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
<!-- <img src="" alt="">-->
|
|
|
|
|
|
</div>
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<div class="maCode">设备编号:{{ rowObj.maCode }}</div>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<el-button type="primary" @click="downloadCode">下 载</el-button>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
2023-12-21 17:54:28 +08:00
|
|
|
|
<div style="background-color;: transparent">
|
|
|
|
|
|
<div
|
|
|
|
|
|
id="qrCode"
|
|
|
|
|
|
v-for="(codeItem, codeIndex) in checkboxModel"
|
|
|
|
|
|
:key="codeIndex"
|
|
|
|
|
|
class="captureId"
|
|
|
|
|
|
v-show="codeId"
|
|
|
|
|
|
ref="QrcodePage"
|
|
|
|
|
|
style="
|
|
|
|
|
|
z-index: -1111111;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 10px;
|
|
|
|
|
|
left: -99999;
|
|
|
|
|
|
width: 450px;
|
|
|
|
|
|
height: 475px;
|
|
|
|
|
|
background-size: cover;
|
|
|
|
|
|
"
|
|
|
|
|
|
></div>
|
2023-12-20 20:17:03 +08:00
|
|
|
|
<!-- <center style="text-align: center; font-size: 1.5625rem">
|
|
|
|
|
|
{{ codeVal }}
|
|
|
|
|
|
</center> -->
|
|
|
|
|
|
</div>
|
2023-12-12 13:36:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-12-20 20:17:03 +08:00
|
|
|
|
import { listType, getType, delType, addType, updateType, refreshCache, } from "@/api/system/dict/type";
|
|
|
|
|
|
import { listLabelBind, addLabelBind, delLabelBind } from "@/api/store/label";
|
2023-12-19 04:26:18 +08:00
|
|
|
|
import { getTypeList } from "@/api/store/warehousing";
|
|
|
|
|
|
import user from '../../../store/modules/user'
|
2023-12-20 20:17:03 +08:00
|
|
|
|
import { unitTypeList, getMaMachineLabelApi, addMaMachineLabelApi } from "@/api/base/base";
|
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
import html2canvas from "html2canvas";
|
|
|
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
|
|
|
import JSZip from 'jszip'
|
|
|
|
|
|
import FileSaver from "file-saver"
|
2023-12-12 13:36:08 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "Dict",
|
|
|
|
|
|
dicts: ['sys_normal_disable'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
rowObj: {},
|
|
|
|
|
|
userInfo: user.state,
|
2023-12-12 13:36:08 +08:00
|
|
|
|
// 遮罩层
|
|
|
|
|
|
loading: true,
|
|
|
|
|
|
// 选中数组
|
|
|
|
|
|
ids: [],
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
single: true,
|
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
|
multiple: true,
|
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
|
showSearch: true,
|
|
|
|
|
|
// 总条数
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
typeList: [],
|
2023-12-19 04:26:18 +08:00
|
|
|
|
modelList: [],
|
|
|
|
|
|
// 字典表格数据
|
|
|
|
|
|
labelList: [],
|
|
|
|
|
|
//标签类型下拉
|
|
|
|
|
|
labelTypeList: [],
|
2023-12-20 20:17:03 +08:00
|
|
|
|
// 标签编号
|
|
|
|
|
|
labelCodeList: [],
|
2023-12-12 13:36:08 +08:00
|
|
|
|
// 弹出层标题
|
|
|
|
|
|
title: "",
|
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
// 日期范围
|
|
|
|
|
|
dateRange: [],
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
2023-12-22 14:05:57 +08:00
|
|
|
|
// labelType: undefined,
|
|
|
|
|
|
// labelCode: undefined,
|
|
|
|
|
|
// status: undefined
|
2023-12-12 13:36:08 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 表单参数
|
|
|
|
|
|
form: {},
|
|
|
|
|
|
// 表单校验
|
|
|
|
|
|
rules: {
|
2023-12-16 14:48:20 +08:00
|
|
|
|
labelType: [
|
2023-12-19 04:26:18 +08:00
|
|
|
|
{ required: true, message: "标签类型不能为空", trigger: "blur" }
|
2023-12-12 13:36:08 +08:00
|
|
|
|
],
|
2023-12-16 14:48:20 +08:00
|
|
|
|
labelCode: [
|
2023-12-19 04:26:18 +08:00
|
|
|
|
{ required: true, message: "标签编号不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
maCode: [
|
|
|
|
|
|
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
2023-12-12 13:36:08 +08:00
|
|
|
|
},
|
|
|
|
|
|
//标签生成
|
2023-12-20 20:17:03 +08:00
|
|
|
|
createOpen: false,
|
2023-12-12 13:36:08 +08:00
|
|
|
|
cform: {},
|
|
|
|
|
|
crules: {
|
|
|
|
|
|
labelType: [
|
|
|
|
|
|
{ required: true, message: "标签类型不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
2023-12-20 20:17:03 +08:00
|
|
|
|
labelNum: [
|
2023-12-12 13:36:08 +08:00
|
|
|
|
{ required: true, message: "标签数量不能为空", trigger: "blur" }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
//标签下载
|
2023-12-20 20:17:03 +08:00
|
|
|
|
uploadOpen: false,
|
|
|
|
|
|
deviceId: '',
|
|
|
|
|
|
selectionList: [],
|
|
|
|
|
|
checkboxModel: [], // 列表复选框
|
|
|
|
|
|
checked: false,
|
|
|
|
|
|
qrcodeArr: [],
|
|
|
|
|
|
codeVal: "",
|
|
|
|
|
|
codeId: true,
|
2023-12-22 14:05:57 +08:00
|
|
|
|
isShowQrCode: -1,
|
|
|
|
|
|
labelmaCode: '',
|
2023-12-12 13:36:08 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
2023-12-19 04:26:18 +08:00
|
|
|
|
console.log(this.userInfo.id)
|
2023-12-12 13:36:08 +08:00
|
|
|
|
this.getList();
|
2023-12-19 04:26:18 +08:00
|
|
|
|
this.getType()
|
|
|
|
|
|
this.getTypeList();
|
2023-12-12 13:36:08 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
/** 查询下拉 */
|
|
|
|
|
|
getTypeList() {
|
|
|
|
|
|
getTypeList({ level: '3' }).then(response => {
|
|
|
|
|
|
this.typeList = response.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
getTypeList({ level: '4' }).then(response => {
|
|
|
|
|
|
this.modelList = response.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
);
|
|
|
|
|
|
},
|
|
|
|
|
|
//获取单位类型
|
|
|
|
|
|
getType() {
|
|
|
|
|
|
unitTypeList({ id: "8" }).then(response => {
|
|
|
|
|
|
this.labelTypeList = response.rows;
|
|
|
|
|
|
})
|
|
|
|
|
|
// 获取标签编号
|
|
|
|
|
|
getMaMachineLabelApi().then(response => {
|
|
|
|
|
|
this.labelCodeList = response.rows;
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-12-19 04:26:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
2023-12-12 13:36:08 +08:00
|
|
|
|
/** 查询字典类型列表 */
|
|
|
|
|
|
getList() {
|
|
|
|
|
|
this.loading = true;
|
2023-12-16 14:48:20 +08:00
|
|
|
|
listLabelBind(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.labelList = response.rows;
|
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
}
|
2023-12-12 13:36:08 +08:00
|
|
|
|
);
|
|
|
|
|
|
},
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
|
cancel() {
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
|
reset() {
|
|
|
|
|
|
this.form = {
|
2023-12-19 04:26:18 +08:00
|
|
|
|
typeId: undefined,
|
|
|
|
|
|
maId: undefined,
|
2023-12-16 14:48:20 +08:00
|
|
|
|
labelType: undefined,
|
|
|
|
|
|
labelCode: undefined,
|
2023-12-12 13:36:08 +08:00
|
|
|
|
remark: undefined
|
|
|
|
|
|
};
|
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
|
handleQuery() {
|
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
|
resetQuery() {
|
|
|
|
|
|
this.dateRange = [];
|
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
|
},
|
2023-12-19 04:26:18 +08:00
|
|
|
|
/** 绑定按钮操作 */
|
|
|
|
|
|
handleBind() {
|
2023-12-12 13:36:08 +08:00
|
|
|
|
this.reset();
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
|
this.title = "绑定";
|
2023-12-20 20:41:12 +08:00
|
|
|
|
this.form.id = this.ids[0].id;
|
2023-12-20 20:44:17 +08:00
|
|
|
|
this.form.typeId = this.ids[0].typeId;
|
2023-12-19 04:26:18 +08:00
|
|
|
|
this.form.maId = this.ids[0].maId;
|
2023-12-22 14:05:57 +08:00
|
|
|
|
this.form.labelId = this.ids[0].labelId;
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.form.labelType = this.ids[0].labelType;
|
|
|
|
|
|
this.form.labelCode = this.ids[0].labelCode;
|
2023-12-19 04:26:18 +08:00
|
|
|
|
},
|
2023-12-20 20:17:03 +08:00
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
|
handleUpdate(row) {
|
2023-12-19 04:26:18 +08:00
|
|
|
|
// this.reset();
|
|
|
|
|
|
// const maId = row.maId || this.ids
|
|
|
|
|
|
// getType(maId).then(response => {
|
|
|
|
|
|
// this.form = response.data;
|
|
|
|
|
|
// this.open = true;
|
|
|
|
|
|
// this.title = "绑定";
|
|
|
|
|
|
// });
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|
2023-12-20 20:17:03 +08:00
|
|
|
|
submitForm: function () {
|
|
|
|
|
|
this.form.binder = this.userInfo.id + '';
|
2023-12-19 04:26:18 +08:00
|
|
|
|
this.form.typeId
|
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
addLabelBind(this.form).then(response => {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.$modal.msgSuccess("绑定成功");
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
});
|
2023-12-19 04:26:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
handleDelete(row) {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
const id = row.id;
|
|
|
|
|
|
this.$modal.confirm('是否确认解绑数据项?').then(function () {
|
|
|
|
|
|
return delLabelBind(id);
|
2023-12-19 04:26:18 +08:00
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
this.$modal.msgSuccess("解绑成功");
|
2023-12-20 20:17:03 +08:00
|
|
|
|
}).catch(() => { });
|
2023-12-12 13:36:08 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 标签生成按钮
|
|
|
|
|
|
createLabel() {
|
|
|
|
|
|
this.resetCreate();
|
|
|
|
|
|
this.createOpen = true;
|
|
|
|
|
|
this.title = "标签生成";
|
|
|
|
|
|
},
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
|
resetCreate() {
|
|
|
|
|
|
this.cform = {
|
|
|
|
|
|
labelType: undefined,
|
|
|
|
|
|
labelNum: undefined,
|
|
|
|
|
|
};
|
|
|
|
|
|
this.resetForm("cform");
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelCreate() {
|
|
|
|
|
|
this.createOpen = false;
|
|
|
|
|
|
this.resetCreate();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 标签生成提交
|
2023-12-20 20:17:03 +08:00
|
|
|
|
submitCreate() {
|
2023-12-12 13:36:08 +08:00
|
|
|
|
this.$refs["cform"].validate(valid => {
|
|
|
|
|
|
if (valid) {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
let uuidList = []
|
|
|
|
|
|
for (let i = 0; i < this.cform.labelNum; i++) {
|
|
|
|
|
|
uuidList.push(uuidv4())
|
|
|
|
|
|
// 索引,数组下标
|
|
|
|
|
|
}
|
|
|
|
|
|
let parmas = {
|
2023-12-21 17:54:28 +08:00
|
|
|
|
uuidList: uuidList.join(','),
|
2023-12-20 20:17:03 +08:00
|
|
|
|
labelType: this.cform.labelType,
|
|
|
|
|
|
labelNum: this.cform.labelNum,
|
|
|
|
|
|
}
|
|
|
|
|
|
addMaMachineLabelApi(parmas).then(res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.$modal.msgSuccess(res.msg);
|
|
|
|
|
|
this.createOpen = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
// updateType(this.form).then(response => {
|
|
|
|
|
|
|
|
|
|
|
|
// this.open = false;
|
|
|
|
|
|
// this.getList();
|
|
|
|
|
|
// });
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return false
|
2023-12-12 13:36:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
//标签下载
|
2023-12-20 20:17:03 +08:00
|
|
|
|
async labelUpload() {
|
|
|
|
|
|
if (this.checkboxModel.length < 0) {
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
const msg = this.$modal.loading("批量生成中,请稍候...");
|
|
|
|
|
|
try {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
// 获取生成二维码dom元素
|
|
|
|
|
|
let captureId = document.getElementsByClassName("captureId");
|
|
|
|
|
|
// 循环复选框数组,生成多个二维码
|
|
|
|
|
|
for (let i = 0; i < this.checkboxModel.length; i++) {
|
|
|
|
|
|
// that.$nextTick(() => {
|
|
|
|
|
|
const element = this.checkboxModel[i];
|
|
|
|
|
|
// 每次生成二维码画布之前,先清空原来的
|
|
|
|
|
|
captureId[i].innerHTML = "";
|
|
|
|
|
|
// console.log(captureId[i]);
|
|
|
|
|
|
// 二维码下显示的文案
|
|
|
|
|
|
// that.codeVal = element.campus + "-" + element.addr + "-" + element.room;
|
|
|
|
|
|
let shareContent = that.$refs["QrcodePage"][i],
|
|
|
|
|
|
width = shareContent.offsetWidth,
|
|
|
|
|
|
height = shareContent.offsetHeight;
|
|
|
|
|
|
// 生成二维码
|
|
|
|
|
|
new QRCode(captureId[i], {
|
|
|
|
|
|
width: width, // 二维码的宽
|
|
|
|
|
|
height: height, // 二维码的高
|
|
|
|
|
|
// 二维码扫描出来的数据
|
2023-12-22 14:05:57 +08:00
|
|
|
|
text: element.maCode, // 二维码地址
|
2023-12-20 20:17:03 +08:00
|
|
|
|
// text: element.maCode + "-" + element.addr + "-" + element.room, // 二维码地址
|
|
|
|
|
|
colorDark: "#000", // 二维码颜色
|
|
|
|
|
|
colorLight: "#fff" // 二维码背景色
|
|
|
|
|
|
// 这里 生成的二维码可能样式达不到预期要求,文后在说一说怎么调节
|
|
|
|
|
|
});
|
|
|
|
|
|
// 创建画布放二维码,方便下载
|
|
|
|
|
|
let canvas = document.createElement("canvas"),
|
|
|
|
|
|
scale = 1;
|
|
|
|
|
|
canvas.width = width * scale;
|
|
|
|
|
|
canvas.height = height * scale;
|
|
|
|
|
|
canvas.style.width = (shareContent.clientWidth * scale) / 100 + "rem";
|
|
|
|
|
|
canvas.style.height = (shareContent.clientHeight * scale) / 100 + "rem";
|
|
|
|
|
|
canvas.getContext("2d").scale(scale, scale);
|
|
|
|
|
|
let opts = {
|
|
|
|
|
|
scale: scale,
|
|
|
|
|
|
canvas: canvas,
|
|
|
|
|
|
logging: false,
|
|
|
|
|
|
width: width,
|
|
|
|
|
|
height: height,
|
|
|
|
|
|
useCORS: true
|
|
|
|
|
|
};
|
|
|
|
|
|
// console.log(shareContent);
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
// 生成二维码图片
|
|
|
|
|
|
await html2canvas(shareContent, opts)
|
|
|
|
|
|
.then(function (canvas) {
|
|
|
|
|
|
const qrContentImage = canvas.toDataURL("image/jpeg", 1.0);
|
|
|
|
|
|
// const qrContentImage = canvas.toDataURL();
|
|
|
|
|
|
if (i <= that.checkboxModel.length - 1) {
|
|
|
|
|
|
that.qrcodeArr.push({
|
|
|
|
|
|
url: qrContentImage,
|
|
|
|
|
|
name: element.maCode
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
if (that.qrcodeArr.length == that.checkboxModel.length) {
|
|
|
|
|
|
that.packageImages();
|
|
|
|
|
|
that.codeId = null;
|
|
|
|
|
|
setTimeout(msg, 1000);
|
|
|
|
|
|
that.$modal.closeLoading()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(function (reason) {
|
|
|
|
|
|
console.log(reason);
|
|
|
|
|
|
that.$modal.closeLoading()
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
setTimeout(msg, 1000);
|
|
|
|
|
|
that.$modal.closeLoading()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
packageImages() {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
const zip = new JSZip();
|
|
|
|
|
|
const cache = {};
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
let arr = that.qrcodeArr;
|
|
|
|
|
|
arr.forEach((item, index) => {
|
|
|
|
|
|
let fileName = item.name;
|
|
|
|
|
|
zip.file(fileName + ".png", item.url.substring(22), { base64: true });
|
|
|
|
|
|
cache[fileName] = item.url;
|
|
|
|
|
|
});
|
|
|
|
|
|
// 下载压缩包
|
|
|
|
|
|
zip.generateAsync({ type: "blob" }).then(content => {
|
|
|
|
|
|
FileSaver.saveAs(content, "二维码.zip");
|
|
|
|
|
|
});
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
// this.checkboxModel = []
|
|
|
|
|
|
// this.selectionList = []
|
|
|
|
|
|
// this.qrcodeArr = []
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
labelUploadCode(row) {
|
2023-12-22 14:05:57 +08:00
|
|
|
|
if (row.maCode == null) {
|
|
|
|
|
|
this.$message.error('当前设备没有设备编码');
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.labelCodeName = ''
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.rowObj = row
|
2023-12-12 13:36:08 +08:00
|
|
|
|
this.uploadOpen = true;
|
|
|
|
|
|
this.title = "二维码查看";
|
2023-12-22 14:05:57 +08:00
|
|
|
|
this.labelmaCode = row.maCode
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
// this.selectionList.forEach((item, index) => {
|
|
|
|
|
|
this.$refs.codeItem.innerHTML = "";
|
|
|
|
|
|
var qrcode = new QRCode(this.$refs.codeItem, {
|
2023-12-22 14:05:57 +08:00
|
|
|
|
text: row.maCode, //二维码内容
|
2023-12-20 20:17:03 +08:00
|
|
|
|
width: 256,
|
|
|
|
|
|
height: 256,
|
|
|
|
|
|
colorDark: '#000000',
|
|
|
|
|
|
colorLight: '#ffffff',
|
|
|
|
|
|
correctLevel: QRCode.CorrectLevel.H,
|
|
|
|
|
|
})
|
|
|
|
|
|
// });
|
|
|
|
|
|
}, 500)
|
|
|
|
|
|
},
|
|
|
|
|
|
downloadCode(e) {
|
|
|
|
|
|
let imgSrc, canvas
|
|
|
|
|
|
if (document.getElementById('qrcode').childNodes[0]) {
|
|
|
|
|
|
canvas = document.getElementById('qrcode').childNodes[0]
|
|
|
|
|
|
imgSrc = this.CanvasToImage(canvas).getAttribute('src')
|
|
|
|
|
|
const alink = document.createElement('a')
|
|
|
|
|
|
alink.href = imgSrc
|
2023-12-22 14:05:57 +08:00
|
|
|
|
alink.download = this.labelmaCode
|
2023-12-20 20:17:03 +08:00
|
|
|
|
alink.click()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
CanvasToImage(canvas) {
|
|
|
|
|
|
// 新Image对象,可以理解为DOM
|
|
|
|
|
|
var image = new Image()
|
|
|
|
|
|
// canvas.toDataURL 返回的是一串Base64编码的URL,当然,浏览器自己肯定支持
|
|
|
|
|
|
// 指定格式PNG
|
|
|
|
|
|
image.src = canvas.toDataURL('image/png')
|
|
|
|
|
|
return image
|
2023-12-12 13:36:08 +08:00
|
|
|
|
},
|
2023-12-20 20:17:03 +08:00
|
|
|
|
// 分享二维码弹窗
|
|
|
|
|
|
popQrcode() {
|
|
|
|
|
|
this.qrcodeDialogVisible = true
|
|
|
|
|
|
const colorFore = '#4169E1'
|
|
|
|
|
|
const colorOut = '#CD5C5C'
|
|
|
|
|
|
const colorIn = '#191970'
|
|
|
|
|
|
this.qrcode = ''
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.qrcode = qrcanvas({
|
|
|
|
|
|
cellSize: 8,
|
|
|
|
|
|
data: location.href,
|
|
|
|
|
|
effect: { round: 0.4 },
|
|
|
|
|
|
correctLevel: 'M',
|
|
|
|
|
|
foreground: [
|
|
|
|
|
|
// 前景色
|
|
|
|
|
|
{ style: colorFore },
|
|
|
|
|
|
// 外方块位置
|
|
|
|
|
|
{ row: 0, rows: 7, col: 0, cols: 7, style: colorOut },
|
|
|
|
|
|
{ row: -7, rows: 7, col: 0, cols: 7, style: colorOut },
|
|
|
|
|
|
{ row: 0, rows: 7, col: -7, cols: 7, style: colorOut },
|
|
|
|
|
|
// 内方块位置
|
|
|
|
|
|
{ row: 2, rows: 3, col: 2, cols: 3, style: colorIn },
|
|
|
|
|
|
{ row: -5, rows: 3, col: 2, cols: 3, style: colorIn },
|
|
|
|
|
|
{ row: 2, rows: 3, col: -5, cols: 3, style: colorIn }
|
|
|
|
|
|
],
|
|
|
|
|
|
background: '#f5f5f5',
|
|
|
|
|
|
padding: 12
|
|
|
|
|
|
})
|
|
|
|
|
|
// 判断是否有子节点,如果已经有则删除原有的,然后再新增子节点
|
|
|
|
|
|
if (document.getElementById('qrcode').childNodes[0]) {
|
|
|
|
|
|
this.$refs.qrcode.removeChild(document.getElementById('qrcode').childNodes[0])
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$refs.qrcode.appendChild(this.qrcode)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// downloadCode() { },
|
2023-12-12 13:36:08 +08:00
|
|
|
|
// 多选框选中数据
|
|
|
|
|
|
handleSelectionChange(selection) {
|
2023-12-20 20:17:03 +08:00
|
|
|
|
console.log('thhis,', selection);
|
|
|
|
|
|
this.selectionList = selection
|
|
|
|
|
|
this.checkboxModel = selection
|
2023-12-19 04:26:18 +08:00
|
|
|
|
this.ids = selection.map(item => item)
|
2023-12-20 20:17:03 +08:00
|
|
|
|
this.single = selection.length != 1
|
2023-12-12 13:36:08 +08:00
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
},
|
2023-12-20 20:17:03 +08:00
|
|
|
|
|
2023-12-12 13:36:08 +08:00
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
handleExport() {
|
|
|
|
|
|
this.download('system/dict/type/export', {
|
|
|
|
|
|
...this.queryParams
|
|
|
|
|
|
}, `type_${new Date().getTime()}.xlsx`)
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 刷新缓存按钮操作 */
|
|
|
|
|
|
handleRefreshCache() {
|
|
|
|
|
|
refreshCache().then(() => {
|
|
|
|
|
|
this.$modal.msgSuccess("刷新成功");
|
|
|
|
|
|
this.$store.dispatch('dict/cleanDict');
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
2023-12-20 20:17:03 +08:00
|
|
|
|
.uploadImg {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.maCode {
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
font-size: 18px;
|
2023-12-12 13:36:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|