|
|
@@ -64,6 +64,7 @@ import { message } from 'ant-design-vue';
|
|
|
import { approvedColumns } from './configData.js';
|
|
|
import CustomerTask from './CustomerTask.vue';
|
|
|
import { Uuid } from 'pc-component-v3';
|
|
|
+import { queryAuth, addAuth } from '../api/authorization/index.js';
|
|
|
|
|
|
const emit = defineEmits(['refreshStasticCount']);
|
|
|
const customerTask = ref(null);
|
|
|
@@ -156,8 +157,8 @@ const searchApprove = (params, isSearch) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-// 选择了taskInfo
|
|
|
-const selectTaskInfo = taskInfo => {
|
|
|
+// 跳到审批页
|
|
|
+const goWindow = taskInfo => {
|
|
|
const type = 'view';
|
|
|
const windowNo = taskInfo.windowNo;
|
|
|
const tabIndex = taskInfo.tabIndex;
|
|
|
@@ -179,6 +180,43 @@ const selectTaskInfo = taskInfo => {
|
|
|
window.open(Common.getRedirectUrl('#' + url));
|
|
|
};
|
|
|
|
|
|
+// 选择了taskInfo 先查询授权资源
|
|
|
+const selectTaskInfo = taskInfo => {
|
|
|
+ const params = {
|
|
|
+ userId: JSON.parse(localStorage.getItem('#LoginInfo')).userId,
|
|
|
+ recordId: taskInfo.recordId,
|
|
|
+ windowNo: taskInfo.windowNo,
|
|
|
+ };
|
|
|
+ queryAuth(params).then(
|
|
|
+ success => {
|
|
|
+ if (success.errorCode === 0) {
|
|
|
+ goWindow(taskInfo);
|
|
|
+ } else {
|
|
|
+ addAuthorization(params, taskInfo);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ Common.processException(err);
|
|
|
+ },
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+// 增加授权资源
|
|
|
+const addAuthorization = (params, taskInfo) => {
|
|
|
+ addAuth(params).then(
|
|
|
+ success => {
|
|
|
+ if (success.errorCode === 0) {
|
|
|
+ goWindow(taskInfo);
|
|
|
+ } else {
|
|
|
+ message.warning(success.errorMessage);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ Common.processException(err);
|
|
|
+ },
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
// 处理content json
|
|
|
const parseContent = content => {
|
|
|
const x = content;
|