文件导入、设备属性管理

This commit is contained in:
jjLv 2024-08-15 17:56:45 +08:00
parent daf7b411de
commit 933885f7b9
4 changed files with 25 additions and 12 deletions

View File

@ -174,6 +174,16 @@ export function delShboxById(data) {
})
}
// 删除设备属性
export function delDeviceAttribute(data) {
return request({
url: '/bracelet/bracelet/delDeviceAttribute',
method: 'post',
data: data
})
}
// 详情
export function getBoxInfo(shboxId) {
return request({

View File

@ -1369,6 +1369,18 @@
});
},
/** 删除按钮操作 */
handleDeleteDeviceAttribute(row) {
const id = row.id;
console.log(id)
this.$modal.confirm('是否确认删除级联编码为"' + row.dataCode + '"的数据项?').then(function() {
return delDeviceAttribute({id:id});
}).then(() => {
this.getListDeviceAttribute();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 手环管理页面新增设备属性提交按钮 */
submitFormAttribute() {
this.$refs["formThree"].validate(valid => {
@ -1432,16 +1444,6 @@
this.getListDeviceAttribute();
},
/** 删除按钮操作 */
handleDeleteDeviceAttribute(row) {
const id = row.id ;
this.$modal.confirm('是否确认删除级联编码为"' + row.dataCode + '"的数据项?').then(function() {
return delDeviceAttribute(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 查询设备属性列表 */
getListDeviceAttribute() {

View File

@ -736,7 +736,7 @@
this.$modal.confirm('是否确认删除级联编码为"' + row.dataCode + '"的数据项?').then(function() {
return delDeviceAttribute({id:id});
}).then(() => {
this.getList();
this.getListDeviceAttribute();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},

View File

@ -379,7 +379,7 @@
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" :data="{updateSupport:upload.updateSupport,proId:this.proId}" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
@ -829,6 +829,7 @@
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
this.getListGt();
},
//
submitFileForm() {