删除判断
This commit is contained in:
parent
c7e168c840
commit
dcfd841e80
|
|
@ -1723,6 +1723,13 @@
|
|||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
if (row.shPersonName!=null && row.shPersonName!='') {
|
||||
this.$alert('存在领用人,无法删除', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(row.shboxName!=this.boxName){
|
||||
this.$alert('请先解绑手环', '提示', {
|
||||
type: 'warning',
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item prop="deviceType">
|
||||
<el-select v-model="queryParams.deviceType" placeholder="设备类型" clearable style="width: 100%;">
|
||||
<el-form-item prop="deviceTypeName">
|
||||
<el-select v-model="queryParams.deviceTypeName" placeholder="设备类型" clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_device_type"
|
||||
v-if = "dict.value != 'shx'"
|
||||
|
|
@ -146,8 +146,8 @@
|
|||
<!-- 添加或修改设备对话框 -->
|
||||
<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-select v-model="form.deviceType" placeholder="请选择设备类型" clearable style="width: 100%;">
|
||||
<el-form-item label="设备类型" prop="devcieType" >
|
||||
<el-select v-if="flag == true" v-model="form.deviceTypeName" placeholder="请选择设备类型" clearable style="width: 100%;" disabled>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_device_type"
|
||||
v-if = "dict.value != 'shx'"
|
||||
|
|
@ -156,6 +156,15 @@
|
|||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select v-else v-model="form.deviceTypeName" placeholder="请选择设备类型" clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_device_type"
|
||||
v-if = "dict.value != 'shx'"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="deviceCode">
|
||||
<el-input v-model="form.deviceCode" placeholder="请输入设备编码" maxlength="20"/>
|
||||
|
|
@ -407,11 +416,13 @@
|
|||
totalThree:0,
|
||||
// 设备表格数据
|
||||
tableData: [],
|
||||
queckName: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
delFileId: undefined,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
flag: false,
|
||||
//所属工程
|
||||
proList: [],
|
||||
deviceAttributeList : [],
|
||||
|
|
@ -696,6 +707,7 @@
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.flag = false;
|
||||
this.open = true;
|
||||
this.title = "添加设备";
|
||||
},
|
||||
|
|
@ -832,6 +844,8 @@
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.flag = true;
|
||||
this.queckName = row.lyName;
|
||||
const deviceId = row.deviceId
|
||||
getDeviceInfo(deviceId).then(response => {
|
||||
this.form = response.data;
|
||||
|
|
|
|||
|
|
@ -904,6 +904,13 @@
|
|||
const param = {
|
||||
gtId:row.gtId
|
||||
}
|
||||
if(row.teamNum>0){
|
||||
this.$alert('该杆塔下存在班组,无法删除', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认删除杆塔编号为"' + row.gtCode + '"的数据项?').then(function() {
|
||||
return delGt(param);
|
||||
}).then(() => {
|
||||
|
|
|
|||
|
|
@ -452,6 +452,13 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const projectId = row.projectId || this.ids;
|
||||
if(row.pronum>0){
|
||||
this.$alert('该项目部存在工程,无法删除', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(row.appnum>0){
|
||||
this.$alert('该项目部存在APP轮播图,无法删除', '提示', {
|
||||
type: 'warning',
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
|
|
@ -174,12 +175,12 @@
|
|||
<!-- 文件格式下载,图片格式预览 -->
|
||||
<el-form-item label="高处作业证">
|
||||
<el-upload
|
||||
class = "upload-demo"
|
||||
action="#"
|
||||
:limit="5"
|
||||
:file-list="highImgList"
|
||||
:show-file-list="true"
|
||||
:auto-upload="false"
|
||||
:before-upload="beforeUpload"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-change="handleChangeHighImgList"
|
||||
|
|
@ -206,6 +207,7 @@
|
|||
|
||||
|
||||
<i class="el-icon-plus avatar-uploader-icon" ></i>
|
||||
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png/jpeg/pdf/doc/docx文件,且不超过10Mb</div> -->
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="电工作业证">
|
||||
|
|
@ -633,7 +635,13 @@
|
|||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
if(file.name.length > 40){
|
||||
this.$message.warning('文件名长度不能超过40个字符')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
this.$message.warning('文件名重复')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
|
|
@ -657,7 +665,13 @@
|
|||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
if(file.name.length > 40){
|
||||
this.$message.warning('文件名长度不能超过40个字符')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
this.$message.warning('文件名重复')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
|
|
@ -681,7 +695,13 @@
|
|||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
if(file.name.length > 40){
|
||||
this.$message.warning('文件名长度不能超过40个字符')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
})
|
||||
}
|
||||
if(fileListTemp.some(item =>item.name === file.name)){
|
||||
this.$message.warning('文件名重复')
|
||||
fileList = fileList.filter(item => {
|
||||
return item.uid != file.uid
|
||||
|
|
@ -1057,4 +1077,5 @@
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -642,7 +642,10 @@
|
|||
bindNum:row.bindNum,
|
||||
}
|
||||
if(row.bindNum>0){
|
||||
this.$modal.msgWarning("该边带已绑定设备,无法删除");
|
||||
this.$alert('该边带已绑定设备,无法删除', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认删除边带名称为"' + row.sidebandId + '"的数据项?').then(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue