【修改】删除多余参数

This commit is contained in:
zhoulingpo
2023-05-19 09:39:55 +08:00
parent 0fc43d237e
commit 3e8b851461
2 changed files with 4 additions and 181 deletions
+2 -179
View File
@@ -223,38 +223,6 @@ export default {
filterText:'',
filterText2:'',
checkedKeys:[],
privacyLevelOptions:[
{
value:'外部公开',
label:'外部公开'
},
{
value:'普通商密',
label:'普通商密'
},
{
value:'核心商密',
label:'核心商密'
},
{
value:'内部公开',
label:'内部公开'
},
{
value:'用户信息',
label:'用户信息'
},
{
value:'敏感信息',
label:'敏感信息'
},
],
confidentialLevelOptions:[
{
value:'一般隐私',
label:'一般隐私'
}
],
tagsForm: {
tags01: {
name: '',
@@ -441,16 +409,7 @@ export default {
})
.catch(_ => { });
},
/* 权限全选 */
selectAll() {
this.reportF.reportUserIdList = [];
if (this.checked) {
this.userList.forEach((item) => { this.reportF.reportUserIdList.push(item.USID) });
} else {
this.reportF.reportUserIdList = [];
}
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
},
changeSelect(val) {
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length;
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
@@ -531,145 +490,13 @@ export default {
// let itemData = {name: '', id: "", parentId: this.tagsForm['tags0' + type].id, type: String(type)};
// this.tagsForm['tags0' + type].childList.splice(index + 1, 0, itemData);
// },
// 标签维护 删除
delTag(index, type) {
let { id, status } = this.tagsForm['tags0' + type].childList[index];
if (status === '1') {
this.$confirm('此标签已应用于报告, 是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (id) {
this.$api.report.labelDeleteId({ id }).then(_ => {
this.$message.success('操作成功');
this.labelList();
})
} else {
this.tagsForm['tags0' + type].childList.splice(index, 1);
this.$message.success('操作成功');
}
})
} else {
if (id) {
this.$api.report.labelDeleteId({ id }).then(_ => {
this.$message.success('操作成功');
this.labelList();
})
} else {
this.tagsForm['tags0' + type].childList.splice(index, 1);
this.$message.success('操作成功');
}
}
},
// 上移
upTag(item, index, type) {
this.$api.report.labelMove({
id: item.id,
moveType: 'up',
type: String(type)
}).then(_ => {
this.labelList();
})
},
// 下移
downTag(item, index, type) {
this.$api.report.labelMove({
id: item.id,
moveType: 'down',
type: String(type)
}).then(_ => {
this.labelList();
})
},
// 标签维护
openTags() {
this.dialogTags = true;
this.filterText2=''
this.labelList();
},
// 单个标签保存
handleSaveTag(val, item, type) {
if (val === '') {
this.$message.warning('标签名称不能为空');
this.labelList();
return;
}
if (val === '-') {
this.$message.warning('标签名称不能为-');
this.labelList();
return;
}
if (this.tagsForm['tags0' + type].childList.filter(item => item.name === val).length > 1) {
this.$message.warning('标签名称不能重复');
this.labelList();
return;
}
let params = { name: val, parentId: this.tagsForm['tags0' + type].id, type: String(type), id: item.id || '' }
if (item.status === '1') {
this.$confirm('此标签已应用于报告, 是否编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功');
this.labelList();
}).catch(_ => {
this.labelList();
})
}).catch(_ => {
this.labelList();
})
} else {
this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功');
this.labelList();
}).catch(_ => {
this.labelList();
})
}
},
// 单个顶级标签保存
handleSaveTopTag(val, type) {
if (val === '') {
this.$message.warning('标签名称不能为空');
this.labelList();
return;
}
if (val === '-') {
this.$message.warning('标签名称不能为-');
this.labelList();
return;
}
if (type === 1 && (val === this.tagsForm.tags02.name || val === this.tagsForm.tags03.name)) {
this.$message.warning('标签名称不能重复');
this.labelList();
return;
}
if (type === 2 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags03.name)) {
this.$message.warning('标签名称不能重复');
this.labelList();
return;
}
if (type === 3 && (val === this.tagsForm.tags01.name || val === this.tagsForm.tags02.name)) {
this.$message.warning('标签名称不能重复');
this.labelList();
return;
}
let params = { name: val, id: this.tagsForm['tags0' + type].id, parentId: '0', type: String(type) };
this.$api.report.labelAdd(params).then(_ => {
this.$message.success('操作成功');
this.labelList();
}).catch(_ => {
this.labelList();
})
},
handleTagsClose() {
this.dialogTags = false;
this.labelList();
this.reset();
},
/* =============================================== 报告上传 =============================================== */
// 打开报告上传
@@ -879,10 +706,6 @@ export default {
})
// })
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
},
created() {
this.init();