bug修复

This commit is contained in:
jjLv 2024-08-30 18:18:03 +08:00
parent fa5e890caf
commit d41e3e40a2
5 changed files with 36 additions and 13 deletions

BIN
src/assets/noPicture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -153,7 +153,7 @@
<!-- 手环弹窗 -->
<el-dialog :title="title" :visible.sync="showsh" width="600px" height="600px" append-to-body @close="cancel">
<el-form :model="queryshCode" ref="queryshCode" :rules="rules" size="small" :inline="true" v-show="showSearch" label-width="100px">
<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"
@ -668,12 +668,13 @@
<el-dialog :title="title" :visible.sync="openSh" width="600px" height="600px" append-to-body>
<div> 当前手环箱还可以绑定{{ this.numers }}个手环</div>
<el-table v-loading="loadingSeven" :data="shListNoBind" width="600px" height = "400px" class="order" @selection-change="handleSelectionChange" >
<el-table-column type="selection" width="55" align="center" label="选择" :selectable="selectable" />
<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="shCode" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelBindTemp"> </el-button>
<el-button
type="primary"
plain
@ -682,7 +683,6 @@
@click="handleBindSh"
v-hasPermi="['basic:bracelet:add']"
>绑定</el-button>
<el-button @click="cancelBindTemp"> </el-button>
</div>
<!-- <pagination
v-show="totalTwo>0"
@ -891,6 +891,7 @@
Capacity: 0,
BindNum: 0,
boxId:0,
bindTemp:0,
queryshNoBind:{
pageNum: 1,
pageSize: 10,
@ -1002,7 +1003,9 @@
}
if (!Number.isInteger(value) || value <= 0) {
callback(new Error('请必须输入为正整数'));
} else {
} else if(value > 1000) {
callback(new Error('请必须输入小于1000的正整数'));
}else {
callback();
}
},
@ -1306,7 +1309,7 @@
//
// tableDatavalcurrentSelection
// tableDatavalcurrentSelection
const isAllSelect = this.tableData.every(item =>
const isAllSelect = this.shboxallList.every(item =>
val.some(valItem => valItem.shboxCode === item.shboxCode)
)
if (isAllSelect) {
@ -1324,7 +1327,7 @@
}
} else {
this.currentSelection = this.currentSelection.filter(
shboxCode => !this.tableData.some(item => item.shboxCode === shboxCode)
shboxCode => !this.shboxallList.some(item => item.shboxCode === shboxCode)
)
}
} else {
@ -1614,6 +1617,7 @@
this.$set(this.formTwo,'shboxCode',response.data.shboxCode+'')
this.$set(this.formTwo,'shboxCapacity',response.data.shboxCapacity)
this.formTwo.shboxId = response.data.shboxId;
this.formTwo.shboxBindNum = response.data.shboxBindNum;
setTimeout(()=>{
this.openbox = true;
this.title = "修改手环箱";
@ -1742,6 +1746,11 @@
this.$refs["formTwo"].validate(valid => {
if (valid) {
if (this.formTwo.shboxId != undefined) {
console.log(this.formTwo)
if(this.formTwo.shboxBindNum > this.formTwo.shboxCapacity){
this.$modal.msgError("绑定手环数量不能大于手环箱容量");
return;
}
editBox(this.formTwo).then(response => {
this.$modal.msgSuccess("修改成功");
this.openbox = false;
@ -1858,7 +1867,7 @@
if (this.currentSelection.length) {
this.$nextTick(() => {
this.currentSelection.forEach(row => {
this.tableData.forEach(item => {
this.shboxallList.forEach(item => {
if (item.shboxCode === row) {
this.$refs.multipleTable?.toggleRowSelection(item, true)
}

View File

@ -148,7 +148,7 @@
<!-- 添加或修改设备对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" >
<el-form-item label="设备类型" prop="devcieType" >
<el-form-item label="设备类型" prop="deviceType" >
<el-select v-if="flag == true" v-model="form.deviceType" placeholder="请选择设备类型" clearable style="width: 100%;" disabled>
<el-option
v-for="dict in dict.type.sys_device_type"
@ -375,7 +375,8 @@
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible">
<img width="100%" height="650px" :src="dialogImageUrl" alt />
<img v-if="isImage(dialogImageUrl)" width="100%" height="650px" :src="dialogImageUrl" alt="" />
<img v-else width="100%" height="650px" :src="urlTemp" alt="" />
</el-dialog>
</div>
</template>
@ -526,6 +527,14 @@
console.log(this.dict.type.sys_device_type)
},
methods: {
isImage(dUrl){
this.urlTemp = require('@/assets/noPicture.png');
if(dUrl == null || dUrl == ''){
return false
}else{
return true
}
},
//-
openImg(url) {

View File

@ -97,10 +97,10 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="项目部名称" prop="projectDepartName">
<el-input v-model="form.projectDepartName" maxlength="20" placeholder="请输入项目名称" />
</el-form-item>
@ -324,6 +324,7 @@ export default {
this.fileList=[];
this.reset();
},
//
reset() {
this.form = {

View File

@ -221,6 +221,7 @@
</el-form-item>
<el-form-item label="电工作业证">
<el-upload
class = "upload-demo"
action="#"
:file-list="electricianImgList"
:show-file-list="true"
@ -258,6 +259,7 @@
</el-form-item>
<el-form-item label="其他作业证">
<el-upload
class = "upload-demo"
action="#"
:file-list="elseImgList"
:show-file-list="true"
@ -1150,7 +1152,9 @@
::v-deep .el-upload-list__item-actions{
overflow:hidden;
}
.upload-demo{
display: flex;
}
.el-upload-list__item-thumbnail{
height: 145px!important;
}