|
|
@@ -596,6 +596,15 @@ export default {
|
|
|
this.$message.warning('请选择一条数据');
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.selection[0].checkOutUserName) {
|
|
|
+ this.$message.warning(
|
|
|
+ this.selection[0].name +
|
|
|
+ '已被' +
|
|
|
+ this.selection[0].checkOutUserName +
|
|
|
+ '检出 无法废止'
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (this.powerFn(powerData)) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -648,18 +657,25 @@ export default {
|
|
|
},
|
|
|
/* 显示编辑 */
|
|
|
openEdit(type, row = '', powerData) {
|
|
|
- if (this.powerFn(powerData, row)) {
|
|
|
- return;
|
|
|
+ if (type != 'add') {
|
|
|
+ if (!row.checkOutUserName) {
|
|
|
+ this.$message.warning('请先检出在修改');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (isCheckOut(this.current)) {
|
|
|
+ this.$message.warning(
|
|
|
+ this.current.name +
|
|
|
+ '已被' +
|
|
|
+ this.current.checkOutUserName +
|
|
|
+ '检出 无法修改'
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
- if (type != 'add' && isCheckOut(this.current)) {
|
|
|
- this.$message.warning(
|
|
|
- this.current.name +
|
|
|
- '已被' +
|
|
|
- this.current.checkOutUserName +
|
|
|
- '检出 无法修改'
|
|
|
- );
|
|
|
+ if (this.powerFn(powerData, row)) {
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
this.$refs.fileEditRef.open(type, row, this.folderList);
|
|
|
},
|
|
|
/* 显示编辑 */
|
|
|
@@ -670,9 +686,6 @@ export default {
|
|
|
this.$refs.fileEditAllRef.open(this.folderList);
|
|
|
},
|
|
|
tabClick(data) {
|
|
|
- console.log(this.$refs[data.name])
|
|
|
- console.log(data.name)
|
|
|
-
|
|
|
if (this.$refs[data.name]) {
|
|
|
this.$refs[data.name].init();
|
|
|
}
|
|
|
@@ -758,7 +771,7 @@ export default {
|
|
|
this.$message.warning('请选择一条数据');
|
|
|
return;
|
|
|
}
|
|
|
- if (isCheckOut(this.selection[0])) {
|
|
|
+ if (this.selection[0].checkOutUserName) {
|
|
|
this.$message.warning(
|
|
|
this.selection[0].name +
|
|
|
'已被' +
|
|
|
@@ -797,6 +810,11 @@ export default {
|
|
|
if (this.powerFn(powerData, row)) {
|
|
|
return;
|
|
|
}
|
|
|
+ if (!row.checkOutUserName) {
|
|
|
+ this.$message.warning('请先检出在删除');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (isCheckOut(this.current)) {
|
|
|
this.$message.warning(
|
|
|
this.current.name +
|