Merge branch 'feature1.2' of https://git.hanbangtang.com/xxhjsb/hbt-prevention-ui into kongyeqing

dev
kongyeqing 2023-09-05 18:10:48 +08:00
commit fbd7bb3596
2 changed files with 20 additions and 17 deletions

View File

@ -601,22 +601,27 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
//
public deleteSubData(indexs) {
this.$confirm('确认删除所选数据', '确认数据', {
if(indexs.length === 0){
this.$message.warning("请选择要删除的数据!")
}else{
this.$confirm('确认删除所选数据', '确认数据', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (let i = this.updateParams.members.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {
this.updateParams.members.splice(i, 1)
}).then(() => {
for (let i = this.updateParams.members.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {
this.updateParams.members.splice(i, 1)
}
}
}
this.updateParams.members.forEach((item, index) => {
item.index = index + 1;
this.updateParams.members.forEach((item, index) => {
item.index = index + 1;
});
this.$message.success("删除成功")
}).catch(() => {
//
});
}).catch(() => {
//
});
}
}
public changes(data, item) {

View File

@ -273,12 +273,10 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
});
this.tableColumn.push({
name: '状态', key: "status",width:"80px", render: (data) => {
if (data.status) {
if (data.status === 1) {
return `<span class="color_1">${'在用'}</span>`
} else if (data.status === 2) {
return `<span class="color_0">${'废弃'}</span>`
}
if (data.status === 1) {
return `<span class="color_1">${'在用'}</span>`
} else if (data.status === 0) {
return `<span class="color_0">${'废弃'}</span>`
}
}
});