DataSyncMDRClick(row){ this.dialogVisible=true; this.dialogSrc = `./P37040102.html?InstanceGuid=${row.InstanceGuid}` //this.dialogSrc = `https://app-emp-v7-test.ccshcc.cn/P85/Modules/P85010102.html?InstanceGuid=${row.InstanceGuid}` // var data = { // title: '审批详情' + uuid(), // url: K7WebSite + `modules/P85010102.html?InstanceGuid=${row.InstanceGuid}` // }; // openTab(data); //window.location.href=`./P85010102.html?InstanceGuid=${row.InstanceGuid}` // openTab(_def) },
时间: 2024-02-14 07:31:05 浏览: 24
这段代码是一个点击事件的处理函数 `DataSyncMDRClick`,当点击某一行时会触发该函数。在函数中,首先将 `dialogVisible` 设置为 `true`,以显示对话框。然后根据点击行的 `row` 对象的 `InstanceGuid` 属性,构建一个 URL 地址,并将其赋值给 `dialogSrc` 变量。最后,注释掉了一些关于打开新标签页或跳转页面的代码,这些代码可能是用于打开指定 URL 地址的新标签页或在当前页面跳转到指定 URL 地址的。根据注释的不同情况,你可以根据需要将其恢复并进行相应的操作。
相关问题
DataSyncMDRClick2(row){ this.dialogVisible2 = true; this.dialogSrc2=`${K7WorkflowWeb}/Modules/P37020101.html?InstanceGuid=${row.InstanceGuid}` this.dialogSrc2 = `https://app-emp-v7-test.ccshcc.cn/P85/Modules/P37020101.html?InstanceGuid=${row.InstanceGuid
这段代码是另一个点击事件的处理函数 `DataSyncMDRClick2`,当点击某一行时会触发该函数。在函数中,首先将 `dialogVisible2` 设置为 `true`,以显示对话框。然后根据点击行的 `row` 对象的 `InstanceGuid` 属性,构建一个 URL 地址,并将其赋值给 `dialogSrc2` 变量。注意,代码中存在两个不同的URL赋值语句,你可以根据需要选择使用哪一个URL。
第一个URL赋值语句是使用了变量 `K7WorkflowWeb`,并拼接了 `/Modules/P37020101.html?InstanceGuid=${row.InstanceGuid}`。这个URL可能是从配置文件或其他地方获取的。
第二个URL赋值语句是一个具体的URL地址 `https://app-emp-v7-test.ccshcc.cn/P85/Modules/P37020101.html?InstanceGuid=${row.InstanceGuid}`。这个URL是一个固定的地址。
根据你的需要选择使用哪一个URL赋值语句,并将其赋值给 `dialogSrc2` 变量。
this.objs = row 如何使用this.$set方法将其更行
如果你想使用 `this.$set` 方法来更新 `this.objs` 的值为 `row`,你可以通过指定属性名来实现。请注意,`this.$set` 方法用于在 Vue 实例中设置响应式属性或更新已存在的响应式属性。
```javascript
this.$set(this, 'objs', row);
```
这将使用 `this.$set` 方法来更新 Vue 实例中的 `objs` 属性为 `row`。通过指定 `this` 作为对象,将实现在 Vue 实例中更新属性的目的。这样更新后的值将保持响应式,当 `objs` 属性的值发生变化时,Vue 将自动更新相关的视图。
需要注意的是,这里的 `this` 指向当前的 Vue 实例,可以根据实际情况进行调整。确保在 Vue 实例内部使用 `this.$set` 方法来更新属性。