|
@@ -264,6 +264,8 @@ export default {
|
|
|
houseList: [],
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
+ // 选中数组的乐观锁
|
|
|
+ versions: [],
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
@@ -423,8 +425,13 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
+ this.versions = selection.map(item => item.version)
|
|
|
this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.multiple = !selection.length;
|
|
|
+
|
|
|
+ if(this.ids != null && this.ids.length>0){
|
|
|
+ this.form.id = null;
|
|
|
+ }
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -472,28 +479,30 @@ export default {
|
|
|
submitY(row){
|
|
|
if (this.form.id!=null){
|
|
|
const ids = this.form.id;
|
|
|
+ const versions = this.form.version;
|
|
|
this.$modal.confirm("确定审核?").then(() => {
|
|
|
this.loading = true;
|
|
|
- return submitY(ids,this.form.reason,this.form.version);
|
|
|
- }).then(() => {
|
|
|
+ return submitY(ids,this.form.reason,versions);
|
|
|
+ }).then((res) => {
|
|
|
this.open = false;
|
|
|
this.loading = false;
|
|
|
this.getList();
|
|
|
this.getWorker();
|
|
|
- this.$modal.msgSuccess("审核成功");
|
|
|
+ this.$modal.msgSuccess(res.msg);
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
}else{
|
|
|
const ids = row.id || this.ids;
|
|
|
+ const versions = row.version || this.versions;
|
|
|
this.$modal.confirm("确定审核?").then(() => {
|
|
|
this.loading = true;
|
|
|
- return submitY(ids,this.form.reason,this.form.version);
|
|
|
- }).then(() => {
|
|
|
+ return submitY(ids,this.form.reason,versions);
|
|
|
+ }).then((res) => {
|
|
|
this.loading = false;
|
|
|
this.getList();
|
|
|
this.getWorker();
|
|
|
- this.$modal.msgSuccess("审核成功");
|
|
|
+ this.$modal.msgSuccess(res.msg);
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -502,28 +511,30 @@ export default {
|
|
|
submitN(row){
|
|
|
if (this.form.id!=null){
|
|
|
const ids = this.form.id;
|
|
|
+ const versions = this.form.version;
|
|
|
this.$modal.confirm("确定审核?").then(() => {
|
|
|
this.loading = true;
|
|
|
- return submitN(ids,this.form.reason,this.form.version);
|
|
|
- }).then(() => {
|
|
|
+ return submitN(ids,this.form.reason,versions);
|
|
|
+ }).then((res) => {
|
|
|
this.open = false;
|
|
|
this.loading = false;
|
|
|
this.getList();
|
|
|
this.getWorker();
|
|
|
- this.$modal.msgSuccess("审核成功");
|
|
|
+ this.$modal.msgSuccess(res.msg);
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
}else{
|
|
|
const ids = row.id || this.ids;
|
|
|
+ const versions = row.version || this.versions;
|
|
|
this.$modal.confirm("确定审核?").then(() => {
|
|
|
this.loading = true;
|
|
|
- return submitN(ids,this.form.reason,this.form.version);
|
|
|
- }).then(() => {
|
|
|
+ return submitN(ids,this.form.reason,versions);
|
|
|
+ }).then((res) => {
|
|
|
this.loading = false;
|
|
|
this.getList();
|
|
|
this.getWorker();
|
|
|
- this.$modal.msgSuccess("审核成功");
|
|
|
+ this.$modal.msgSuccess(res.msg);
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|