手环名称添加

This commit is contained in:
jjLv 2024-10-14 11:56:53 +08:00
parent 9397d3dbf1
commit 532e51aec5
1 changed files with 116 additions and 87 deletions

View File

@ -4,6 +4,16 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryFormOne" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item prop="shName">
<el-input
v-model="queryParams.shName"
placeholder="请输入手环名称"
clearable
@keyup.enter.native="handleQuery"
maxlength="20"
/>
</el-form-item>
<el-form-item prop="shCode">
<el-input
v-model="queryParams.shCode"
@ -48,7 +58,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
@ -70,10 +80,10 @@
v-hasPermi="['basic:bracelet:export']"
>导出数据</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="braceletList" ref="multipleTableSh" row-key="shId" @selection-change="handleSelectionChangeSh" @select="handlerSelectSh" @select-all="handlerSelectAllSh">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
<el-table-column label="序号" align="center" width="80" type="index">
@ -82,11 +92,12 @@
</template>
</el-table-column>
<el-table-column label="手环id" align="center" prop="shId" v-if="false" />
<el-table-column label="手环名称" align="center" prop="shName" sortable/>
<el-table-column label="手环编码" align="center" prop="shCode" sortable/>
<el-table-column label="所属手环箱" align="center" prop="shboxName" sortable>
<template slot-scope="scope">
<div v-if="scope.row.shboxName!=boxName" >
{{ scope.row.shboxName }}
{{ scope.row.shboxName }}
<el-button
size="mini"
type="text"
@ -142,7 +153,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -150,25 +161,27 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 手环弹窗 -->
<el-dialog :title="title" :visible.sync="showsh" width="600px" height="600px" append-to-body @close="cancel">
<el-form ref="queryshCode" :model="queryshCode" :rules="rules" label-width="100px" @submit.native.prevent>
<el-form-item label="手环编码" prop="shCode">
<el-input
v-model="queryshCode.shCode"
placeholder="请输入手环编码"
<el-form-item label="手环编码" prop="shCode" >
<el-input
v-model="queryshCode.shCode"
placeholder="请输入手环编码"
maxlength="50"
style="width: 400px;"
/>
</el-form-item>
<el-form-item label="手环名称" prop="shName">
<el-input
v-model="queryshCode.shName"
placeholder="请输入手环名称"
maxlength="32"
/>
</el-form-item>
</el-form>
</el-form-item>
<el-form-item label="手环名称" prop="shName" >
<el-input
v-model="queryshCode.shName"
placeholder="请输入手环名称"
maxlength="50"
style="width: 400px;"
/>
</el-form-item>
</el-form>
<el-table v-loading="loadingTwo" :data="shboxList" width="600px" height = "400px" >
<el-table-column label="手环箱id" align="center" prop="shboxId" v-if="false" />
<el-table-column label="手环箱名称" align="center" prop="shboxName" />
@ -177,7 +190,7 @@
<template slot-scope="scope">
<div>
<span style="color: green;">{{ scope.row.shboxBindNum }}/</span><span>{{ scope.row.shboxCapacity }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="选择" align="center" class-name="small-padding fixed-width">
@ -224,7 +237,7 @@
<template slot-scope="scope">
<div>
<span style="color: green;">{{ scope.row.shboxBindNum }}/</span><span>{{ scope.row.shboxCapacity }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="选择" align="center" class-name="small-padding fixed-width">
@ -250,20 +263,22 @@
<!-- 修改手环弹窗 -->
<el-dialog :title="title" :visible.sync="showShEdit" width="600px" height="600px" append-to-body @close="cancelEdit">
<el-form :model="queryshEdit" ref="queryshEdit" :rules="rules" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="手环编码" prop="shCode">
<el-input
v-model="queryshEdit.shCode"
placeholder="请输入手环编码"
<el-form-item label="手环编码" prop="shCode" with="50px" >
<el-input
v-model="queryshEdit.shCode"
placeholder="请输入手环编码"
maxlength="50"
style="width: 400px;"
/>
</el-form-item>
</el-form-item>
<el-form-item label="手环名称" prop="shName">
<el-input
v-model="queryshEdit.shName"
placeholder="请输入手环名称"
maxlength="20"
/>
</el-form-item>
<el-input
v-model="queryshEdit.shName"
placeholder="请输入手环名称"
maxlength="50"
style="width: 400px;"
/>
</el-form-item>
</el-form>
<el-table v-loading="loadingFour" :data="shboxList" width="600px" height = "400px" >
<el-table-column label="手环箱id" align="center" prop="shboxId" v-if="false" />
@ -273,7 +288,7 @@
<template slot-scope="scope">
<div>
<span style="color: green;">{{ scope.row.shboxBindNum }}/</span><span>{{ scope.row.shboxCapacity }}</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="选择" align="center" class-name="small-padding fixed-width">
@ -369,7 +384,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="totalTwo>0"
:total="totalTwo"
@ -390,39 +405,39 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">
<!-- <el-row :gutter="24">
<el-col :span="20">
<el-form-item label="设备采集值" prop="dataVal">
<el-input v-model="formThree.dataVal" placeholder="请输入设备采集值" maxlength="20"/>
</el-form-item>
</el-col>
</el-row> -->
<el-row :gutter="24">
<el-col :span="20">
<el-form-item label="设备值单位" prop="dataUnit">
<el-input v-model.number="formThree.dataUnit" placeholder="请输入设备值单位" maxlength="20">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="20">
<el-form-item label="级联编码" prop="dataCode">
<el-input v-model.number="formThree.dataCode" placeholder="请输入级联编码" maxlength="20">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="20">
<el-form-item label="数据类型" prop="dataType">
<el-input v-model.number="formThree.dataType" placeholder="请输入数据类型" maxlength="20">
</el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">
<el-col :span="20">
<el-form-item label="数据采集时间" prop="dataTime">
<el-date-picker
@ -432,10 +447,10 @@
value-format="yyyy-MM-dd"
type="date">
</el-date-picker>
</el-form-item>
</el-col>
</el-form-item>
</el-col>
</el-row> -->
<el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="20">
<el-form-item label="图标 " label-width="120px">
<el-upload
@ -454,8 +469,8 @@
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormAttribute"> </el-button>
@ -510,7 +525,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryTwo">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
@ -526,10 +541,10 @@
<!-- 二维码导出组件按钮在内部传选中数组 currentSelection:选中数组 clearCheck:清空选中状态-->
<qrCodeUpload :checkboxModel.sync="currentSelection" @clearCheck="clearCheck"/>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getboxList"></right-toolbar>
</el-row>
<el-table v-loading="loadingFive" :data="shboxallList" ref="multipleTable" row-key="shboxCode" @selection-change="handleSelectionChangeImag" @select="handlerSelect" @select-all="handlerSelectAll">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
<el-table-column label="序号" align="center" width="80" type="index">
@ -586,7 +601,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="totalTwo>0"
:total="totalTwo"
@ -594,10 +609,19 @@
:limit.sync="queryShbox.pageSize"
@pagination="getboxList"
/>
<!-- 手环箱管理页面绑定手环弹窗 -->
<el-dialog :title="title" :visible.sync="showShall" width="1000px" height="1000px" append-to-body @close="cancelOne">
<el-form :model="queryShBoxall" ref="queryFormThree" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item prop="shName">
<el-input
v-model="queryShBoxall.shName"
placeholder="请输入手环名称"
clearable
@keyup.enter.native="handleQueryShBind"
maxlength="50"
/>
</el-form-item>
<el-form-item prop="shCode">
<el-input
v-model="queryShBoxall.shCode"
@ -647,6 +671,7 @@
<el-table v-loading="loadingSix" :data="shBindList" width="600px" height = "400px" >
<el-table-column label="手环id" align="center" prop="shId" v-if="false" />
<el-table-column label="手环名称" align="center" prop="shName" />
<el-table-column label="手环编码" align="center" prop="shCode" />
<el-table-column label="手环状态" align="center" prop="shStatus" >
<template slot-scope="scope">
@ -685,11 +710,12 @@
<el-table-column type="selection" width="55" align="center" :selectable="selectable" >
</el-table-column>
<el-table-column label="手环id" align="center" prop="shId" v-if="false" />
<el-table-column label="手环名称" align="center" prop="shName" />
<el-table-column label="手环编码" align="center" prop="shCode" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelBindTemp"> </el-button>
<el-button
<el-button
type="primary"
plain
icon="el-icon-plus"
@ -730,9 +756,9 @@
<el-input v-model.number="formTwo.shboxCapacity" placeholder="请输入手环箱容量" maxlength="10">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormbox"> </el-button>
@ -766,7 +792,7 @@
</el-tab-pane>
</el-tabs>
</template>
<script>
import { listBracelet, listShboxall,delShById, exportSh,listShbox,addSh,listShboxBind,addShBind,delSh,editSh,delDeviceAttribute,exportShSome,
getBoxInfo,editBox,addBox,delShboxById,listShBind,listShNoBind,bindSh,getBoxNewInfo,addAttribute,listDeviceAttribute,getAttributeInfo,editAttribute} from "@/api/base/bracelet";
@ -882,14 +908,15 @@
shboxCode: undefined,
shPersonName:undefined,
shStatus:undefined,
shName:undefined,
},
queryshCode:{
pageNum: 1,
pageSize: 10,
shCode: undefined,
shName: undefined,
shboxName: undefined,
shboxId: undefined,
shName:undefined,
},
queryshCodeBind:{
pageNum: 1,
@ -921,9 +948,9 @@
pageSize: 10,
shId: undefined,
shCode: undefined,
shName:undefined,
shboxName: undefined,
shboxId: undefined,
shName: undefined,
},
queryShbox: {
@ -943,6 +970,7 @@
shId:undefined,
shPersonName: undefined,
shStatus:undefined,
shName:undefined,
},
queryDeviceAttribute: {
pageNum: 1,
@ -962,7 +990,7 @@
showShall:false,
openbox:false,
openSh:false,
showAttribute:false,
@ -1176,7 +1204,7 @@
});
},
selectAll() {
selectAll() {
this.$refs.MainTable.clearSelection();
},
@ -1239,7 +1267,7 @@
resetAdd() {
this.queryshCode.shCode = '';
this.resetForm("queryshCode");
},
},
//
resetEdit() {
this.queryshEdit.shCode = {};
@ -1277,12 +1305,12 @@
this.queryShBoxall.pageNum = 1;
this.queryShBoxall.shboxId = this.queryShBoxall.shboxId;
this.getListBoxall();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryFormOne");
this.resetForm("queryFormOne");
this.currentSelectionSh = [];//
this.handleQuery();
},
@ -1292,7 +1320,7 @@
this.handleQueryShbox();
},
/** 重置按钮操作 */
resetQueryThree() {
this.resetForm("queryFormThree");
@ -1462,7 +1490,7 @@
this.showAttribute = true;
},
/** 修改按钮操作 */
handleUpdateAttribute(row) {
this.resetAttribute();
@ -1484,7 +1512,7 @@
this.showAttribute = true;
this.title = "修改设备属性";
},100)
});
},
@ -1501,7 +1529,7 @@
},
/** 手环管理页面新增设备属性提交按钮 */
submitFormAttribute() {
submitFormAttribute() {
this.$refs["formThree"].validate(valid => {
if (valid) {
if (this.formThree.id != undefined) {
@ -1538,7 +1566,7 @@
}
}
});
},
//
@ -1573,10 +1601,10 @@
this.totalTwo = response.total;
this.loadingTwo = false;
});
},
},
/** 绑定操作 */
handleBindSh(row) {
handleBindSh(row) {
const shIds = row.shId || this.ids;
const param = {
shboxId:this.shboxbindId,
@ -1624,6 +1652,7 @@
this.queryshEdit.pageNum = 1;
this.queryshEdit.shId = row.shId;
this.queryshEdit.shCode = row.shCode;
this.queryshEdit.shName = row.shName;
},
@ -1649,7 +1678,7 @@
this.openbox = true;
this.title = "修改手环箱";
},100)
});
},
@ -1720,7 +1749,7 @@
/** 提交按钮 */
submitForm() {
submitForm() {
this.queryshCode.shCode = this.queryshCode.shCode;
this.queryshCode.shboxId = this.shboxIdOne;
this.$refs["queryshCode"].validate(valid => {
@ -1734,9 +1763,9 @@
})
},
/** 手环绑定选择页面提交按钮 */
submitFormBind() {
submitFormBind() {
if(this.queryshCodeBind.shboxId == undefined){
this.$modal.msgError("请选择手环箱");
return;
@ -1753,7 +1782,7 @@
},
/** 修改手环页面提交按钮 */
submitFormEdit() {
submitFormEdit() {
this.queryshEdit.shCode = this.queryshEdit.shCode;
this.queryshEdit.shboxId = this.shboxId;
this.$refs["queryshEdit"].validate(valid => {
@ -1769,7 +1798,7 @@
/** 手环箱管理页面提交按钮 */
submitFormbox() {
submitFormbox() {
this.$refs["formTwo"].validate(valid => {
if (valid) {
if (this.formTwo.shboxId != undefined) {
@ -1792,7 +1821,7 @@
}
}
});
},
@ -1960,7 +1989,7 @@
},
//
openShboxTemp(row){
openShboxTemp(row){
this.queryshCodeBind = {};
this.shboxIdTwo = null;
this.title = "选择"
@ -2006,7 +2035,7 @@
})
},
}
};
</script>
@ -2036,4 +2065,4 @@
::v-deep.order .el-table__header-wrapper .el-checkbox {
display: none;
}
</style>
</style>