新增字段
This commit is contained in:
parent
7cdb18b531
commit
9397d3dbf1
|
|
@ -16,7 +16,7 @@ router.beforeEach((to, from, next) => {
|
|||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' })
|
||||
next({ path: '/zhgd-ht/' })
|
||||
NProgress.done()
|
||||
} else if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
|
|
@ -34,7 +34,7 @@ router.beforeEach((to, from, next) => {
|
|||
}).catch(err => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
Message.error(err)
|
||||
next({ path: '/zhgd-ht' })
|
||||
next({ path: '/zhgd-ht/' })
|
||||
})
|
||||
})
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ service.interceptors.response.use(res => {
|
|||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = '/zhgd-ht';
|
||||
location.href = '/zhgd-ht/';
|
||||
})
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,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 +70,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">
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<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 +142,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -150,18 +150,25 @@
|
|||
: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-input
|
||||
v-model="queryshCode.shCode"
|
||||
placeholder="请输入手环编码"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
<el-form-item label="手环名称" prop="shName">
|
||||
<el-input
|
||||
v-model="queryshCode.shName"
|
||||
placeholder="请输入手环名称"
|
||||
maxlength="32"
|
||||
/>
|
||||
</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" />
|
||||
|
|
@ -170,7 +177,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">
|
||||
|
|
@ -217,7 +224,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">
|
||||
|
|
@ -244,12 +251,19 @@
|
|||
<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-input
|
||||
v-model="queryshEdit.shCode"
|
||||
placeholder="请输入手环编码"
|
||||
maxlength="50"
|
||||
/>
|
||||
</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-form>
|
||||
<el-table v-loading="loadingFour" :data="shboxList" width="600px" height = "400px" >
|
||||
<el-table-column label="手环箱id" align="center" prop="shboxId" v-if="false" />
|
||||
|
|
@ -259,7 +273,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">
|
||||
|
|
@ -355,7 +369,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="totalTwo>0"
|
||||
:total="totalTwo"
|
||||
|
|
@ -376,39 +390,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
|
||||
|
|
@ -418,10 +432,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
|
||||
|
|
@ -440,8 +454,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>
|
||||
|
|
@ -496,7 +510,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
|
||||
|
|
@ -512,10 +526,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">
|
||||
|
|
@ -572,7 +586,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="totalTwo>0"
|
||||
:total="totalTwo"
|
||||
|
|
@ -580,7 +594,7 @@
|
|||
: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">
|
||||
|
|
@ -675,7 +689,7 @@
|
|||
</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"
|
||||
|
|
@ -716,9 +730,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>
|
||||
|
|
@ -752,7 +766,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";
|
||||
|
|
@ -873,6 +887,7 @@
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shCode: undefined,
|
||||
shName: undefined,
|
||||
shboxName: undefined,
|
||||
shboxId: undefined,
|
||||
},
|
||||
|
|
@ -906,6 +921,7 @@
|
|||
pageSize: 10,
|
||||
shId: undefined,
|
||||
shCode: undefined,
|
||||
shName:undefined,
|
||||
shboxName: undefined,
|
||||
shboxId: undefined,
|
||||
},
|
||||
|
|
@ -946,7 +962,7 @@
|
|||
showShall:false,
|
||||
|
||||
openbox:false,
|
||||
|
||||
|
||||
openSh:false,
|
||||
|
||||
showAttribute:false,
|
||||
|
|
@ -987,6 +1003,9 @@
|
|||
shCode: [
|
||||
{ required: true, message: "手环编码不能为空", trigger: "blur" }
|
||||
],
|
||||
shName: [
|
||||
{ required: true, message: "手环名称不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
rulesbox: {
|
||||
shboxName: [
|
||||
|
|
@ -1157,7 +1176,7 @@
|
|||
});
|
||||
},
|
||||
|
||||
selectAll() {
|
||||
selectAll() {
|
||||
this.$refs.MainTable.clearSelection();
|
||||
},
|
||||
|
||||
|
|
@ -1220,7 +1239,7 @@
|
|||
resetAdd() {
|
||||
this.queryshCode.shCode = '';
|
||||
this.resetForm("queryshCode");
|
||||
},
|
||||
},
|
||||
// 手环修改按钮页面表单重置
|
||||
resetEdit() {
|
||||
this.queryshEdit.shCode = {};
|
||||
|
|
@ -1258,12 +1277,12 @@
|
|||
this.queryShBoxall.pageNum = 1;
|
||||
this.queryShBoxall.shboxId = this.queryShBoxall.shboxId;
|
||||
this.getListBoxall();
|
||||
|
||||
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryFormOne");
|
||||
this.resetForm("queryFormOne");
|
||||
this.currentSelectionSh = [];//重置清除已选列表
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
@ -1273,7 +1292,7 @@
|
|||
this.handleQueryShbox();
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQueryThree() {
|
||||
this.resetForm("queryFormThree");
|
||||
|
|
@ -1443,7 +1462,7 @@
|
|||
this.showAttribute = true;
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** 修改按钮操作 */
|
||||
handleUpdateAttribute(row) {
|
||||
this.resetAttribute();
|
||||
|
|
@ -1465,7 +1484,7 @@
|
|||
this.showAttribute = true;
|
||||
this.title = "修改设备属性";
|
||||
},100)
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -1482,7 +1501,7 @@
|
|||
},
|
||||
|
||||
/** 手环管理页面新增设备属性提交按钮 */
|
||||
submitFormAttribute() {
|
||||
submitFormAttribute() {
|
||||
this.$refs["formThree"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.formThree.id != undefined) {
|
||||
|
|
@ -1519,7 +1538,7 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
// 手环管理页面新增设备属性取消按钮
|
||||
|
|
@ -1554,10 +1573,10 @@
|
|||
this.totalTwo = response.total;
|
||||
this.loadingTwo = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/** 绑定操作 */
|
||||
handleBindSh(row) {
|
||||
handleBindSh(row) {
|
||||
const shIds = row.shId || this.ids;
|
||||
const param = {
|
||||
shboxId:this.shboxbindId,
|
||||
|
|
@ -1630,7 +1649,7 @@
|
|||
this.openbox = true;
|
||||
this.title = "修改手环箱";
|
||||
},100)
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -1701,7 +1720,7 @@
|
|||
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
submitForm() {
|
||||
this.queryshCode.shCode = this.queryshCode.shCode;
|
||||
this.queryshCode.shboxId = this.shboxIdOne;
|
||||
this.$refs["queryshCode"].validate(valid => {
|
||||
|
|
@ -1715,9 +1734,9 @@
|
|||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** 手环绑定选择页面提交按钮 */
|
||||
submitFormBind() {
|
||||
submitFormBind() {
|
||||
if(this.queryshCodeBind.shboxId == undefined){
|
||||
this.$modal.msgError("请选择手环箱");
|
||||
return;
|
||||
|
|
@ -1734,7 +1753,7 @@
|
|||
},
|
||||
|
||||
/** 修改手环页面提交按钮 */
|
||||
submitFormEdit() {
|
||||
submitFormEdit() {
|
||||
this.queryshEdit.shCode = this.queryshEdit.shCode;
|
||||
this.queryshEdit.shboxId = this.shboxId;
|
||||
this.$refs["queryshEdit"].validate(valid => {
|
||||
|
|
@ -1750,7 +1769,7 @@
|
|||
|
||||
|
||||
/** 手环箱管理页面提交按钮 */
|
||||
submitFormbox() {
|
||||
submitFormbox() {
|
||||
this.$refs["formTwo"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.formTwo.shboxId != undefined) {
|
||||
|
|
@ -1773,7 +1792,7 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -1941,7 +1960,7 @@
|
|||
},
|
||||
|
||||
//打开手环绑定页面
|
||||
openShboxTemp(row){
|
||||
openShboxTemp(row){
|
||||
this.queryshCodeBind = {};
|
||||
this.shboxIdTwo = null;
|
||||
this.title = "选择"
|
||||
|
|
@ -1987,7 +2006,7 @@
|
|||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -2017,4 +2036,4 @@
|
|||
::v-deep.order .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue