Ver Fonte

Merge remote-tracking branch 'origin/master'

yusm há 1 ano atrás
pai
commit
0505fbaf48
100 ficheiros alterados com 2419 adições e 1208 exclusões
  1. 56 8
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/api.ts
  2. 77 40
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/index.vue
  3. 10 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/type.d.ts
  4. 13 10
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/ExportModal.vue
  5. 11 5
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/api.ts
  6. 160 60
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue
  7. 7 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/type.d.ts
  8. 45 40
      fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts
  9. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/DingDingController.java
  10. 6 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ExpenseItemController.java
  11. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java
  12. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/GroupBudgetReviewController.java
  13. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectRequirementController.java
  14. 217 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  15. 445 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java
  16. 7 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java
  17. 5 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserYearleaveSettingController.java
  18. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  19. 8 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/TaskMapper.java
  20. 6 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ExcelExportService.java
  21. 6 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/TaskService.java
  22. 0 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserService.java
  23. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java
  24. 8 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  25. 14 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DingDingServiceImpl.java
  26. 168 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java
  27. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java
  28. 6 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java
  29. 5 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java
  30. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectApprovalServiceImpl.java
  31. 63 31
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  32. 6 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProviderInfoServiceImpl.java
  33. 6 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportExtraDegreeServiceImpl.java
  34. 14 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  35. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SimpleReportServiceImpl.java
  36. 6 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskRestartServiceImpl.java
  37. 129 177
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java
  38. 1 370
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  39. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  40. 83 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskMapper.xml
  41. 12 12
      fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue
  42. 8 8
      fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue
  43. 7 7
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  44. 14 14
      fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue
  45. 3 1
      fhKeeper/formulahousekeeper/timesheet/src/components/translationOpenData.vue
  46. 90 0
      fhKeeper/formulahousekeeper/timesheet/src/components/translationOpenDataText.vue
  47. 2 0
      fhKeeper/formulahousekeeper/timesheet/src/main.js
  48. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/permissions.js
  49. 3 3
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  50. 13 13
      fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue
  51. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/contract/index.vue
  52. 235 37
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue
  53. 3 3
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  54. 12 12
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue
  55. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/CostBaseline.vue
  56. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/budgetReview.vue
  57. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  58. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/fileCenter.vue
  59. 7 7
      fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue
  60. 8 8
      fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue
  61. 15 15
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  62. 22 22
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  63. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue
  64. 5 5
      fhKeeper/formulahousekeeper/timesheet/src/views/project/vueGantt.vue
  65. 11 11
      fhKeeper/formulahousekeeper/timesheet/src/views/projectApproval/projectApproval.vue
  66. 11 11
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue
  67. 4 4
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue
  68. 10 10
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue
  69. 45 61
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  70. 15 15
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue
  71. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_department.vue
  72. 5 5
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_import.vue
  73. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_profession.vue
  74. 3 3
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/weeklyCustomization.vue
  75. 3 3
      fhKeeper/formulahousekeeper/timesheet/src/views/workflow/report.vue
  76. 91 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/components/translationOpenDataText.vue
  77. 3 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/main.js
  78. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/audit/audit.vue
  79. 2 2
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/count/count.vue
  80. 16 16
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue
  81. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-01.vue
  82. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-02.vue
  83. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-03.vue
  84. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue
  85. 5 5
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/applyLeave.vue
  86. 3 3
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/awayOffice.vue
  87. 2 2
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/exaLeave.vue
  88. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/details.vue
  89. 16 16
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue
  90. 19 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue
  91. 12 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue
  92. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/msg/index.vue
  93. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue
  94. 6 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/edit.vue
  95. 5 5
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue
  96. 4 4
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue
  97. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/department_list.vue
  98. 7 7
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue
  99. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/profession_list.vue
  100. 0 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/editask.vue

+ 56 - 8
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/api.ts

@@ -1,14 +1,14 @@
 export const defalutModalForm = {
   taskName: "", //任务名称
   priority: "", //优先级
-  taskType: 2, //  任务类型
-  customerId: null, //  客户id 0
-  businessId: null, //商机id 1
+  taskType: 0, //  任务类型
+  customId: null, //  客户id 0
+  businessOpportunityId: null, //商机id 1
   orderId: null, //  订单id 2
   clueId: null, //线索id 3
   contactsId: null, //联系人id
   executorId: null, //执行人id
-  repeat: 0, //是否重复
+  isRepeat: 0, //是否重复
   repeatType: 0, //重复类型
   endType: 1, //结束类型
   repeatEndNever: 1,
@@ -37,23 +37,33 @@ export const TASK_TYPE = [
 ];
 export const TASK_TYPE_FIELD: {
   type: string;
-  field: "customerId" | "businessId" | "orderId" | "clueId";
+  field: "customId" | "businessOpportunityId" | "orderId" | "clueId";
+  valueIndex: string;
+  labelIndex: string;
 }[] = [
   {
     type: "0",
-    field: "customerId",
+    field: "customId",
+    valueIndex: "id",
+    labelIndex: "customName",
   },
   {
     type: "1",
-    field: "businessId",
+    field: "businessOpportunityId",
+    valueIndex: "id",
+    labelIndex: "name",
   },
   {
     type: "2",
     field: "orderId",
+    valueIndex: "value",
+    labelIndex: "label",
   },
   {
     type: "3",
     field: "clueId",
+    valueIndex: "id",
+    labelIndex: "clueName",
   },
 ];
 
@@ -68,4 +78,42 @@ export const defaultGenerateFormData = {
   list: [],
   config: {},
 };
-export const CUSTOMER_FORM_URL = "/sys-form/getListByCode/tasks";
+export const propertyToTaskTypeMap = {
+  customId: 0,
+  businessOpportunityId: 1,
+  orderId: 2,
+  clueId: 3,
+};
+export const propertyToEndTypeMap = {};
+/**
+ * 获取任务类型的函数
+ *
+ * @param obj 任意对象,期望该对象包含特定的属性以确定任务类型
+ * @returns 返回匹配到的任务类型值,如果没有匹配则返回null
+ */
+export function getTaskType(obj: any) {
+  if (!obj) {
+    return
+  }
+  if (obj.taskType) {
+    return obj.taskType;
+  }
+  let taskType = null;
+  for (const [property, taskTypeValue] of Object.entries(
+    propertyToTaskTypeMap
+  )) {
+    if (obj.hasOwnProperty(property)) {
+      taskType = taskTypeValue;
+      break;
+    }
+  }
+  return taskType;
+}
+
+export const CUSTOMER_FORM_URL = "/sys-form/getListByCode/tasks"; //自定义form表单
+export const ALL_CUSTOM = "/custom/getAll"; //客户
+export const ALL_CLUE = "/clue/getAll"; //线索
+export const ALL_BUSINESS = "/business-opportunity/getAll"; //商机
+export const ALL_CONTACTS = "/contacts/allContacts"; //联系人
+
+export const ALL_USERS = "/user/getSimpleActiveUserList"; //获取所有人

+ 77 - 40
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/index.vue

@@ -34,26 +34,27 @@
           <template v-for="item in TASK_TYPE_FIELD">
             <el-select v-model="form[item.field]" v-if="form.taskType == item.type" placeholder="请选择" clearable
               filterable :disabled="disabledList && disabledList.includes(item.field)">
-              <el-option v-for="item in taskTypeValueData" :key="item.value" :value="item.value" :label="item.label" />
+              <el-option v-for="v in taskTypeValueData" :key="v.id" :value="v[item.valueIndex]"
+                :label="v[item.labelIndex]" />
             </el-select>
           </template>
         </el-form-item>
-        <el-form-item label="联系人:" v-if="TASK_TYPE.find(v => v.value === (form.taskType || '1'))?.show">
+        <el-form-item label="联系人:" v-if="TASK_TYPE.find(v => v.value == (form.taskType || '1'))?.show">
           <el-select v-model="form.contactsId" placeholder="请选择" clearable filterable
             :disabled="disabledList && disabledList.includes('contactsId')">
-            <el-option v-for="item in contactValueData" :key="item.value" :value="item.value" :label="item.label" />
+            <el-option v-for="item in contactValueData" :key="item.id" :value="item.id" :label="item.name" />
           </el-select>
         </el-form-item>
         <el-form-item label="执行人:">
           <el-select v-model="form.executorId" placeholder="请选择" clearable multiple filterable
             :disabled="disabledList && disabledList.includes('executorId')">
-            <el-option v-for="item in executorValueData" :key="item.value" :value="item.value" :label="item.label" />
+            <el-option v-for="item in executorValueData" :key="item.id" :value="item.id" :label="item.name" />
           </el-select>
         </el-form-item>
         <el-form-item label="重复提醒:">
-          <el-switch v-model="form.repeat" :active-value="1" :inactive-value="0" @change="changeRepeat" />
+          <el-switch v-model="form.isRepeat" :active-value="1" :inactive-value="0" @change="changeRepeat" />
         </el-form-item>
-        <template v-if="form.repeat === 1">
+        <template v-if="form.isRepeat === 1">
           <el-form-item label="重复类型:">
             <el-select v-model="form.repeatType" placeholder="请选择" @change="changeRepeatType">
               <el-option v-for="item in REPEAT_TYPE" :key="item.value" :value="item.value" :label="item.label" />
@@ -65,14 +66,15 @@
             </el-form-item>
             <el-form-item label="结束:">
               <el-radio-group v-model="form.endType" @change="changeEndType">
-                <el-radio label="1" class="w-full">永不</el-radio>
-                <el-radio label="2" class="w-full mb-3"><el-input-number v-model="form.repeatEndCount" :min="1"
-                    controls-position="right" />
+                <el-radio :label="1" class="w-full">永不</el-radio>
+                <el-radio :label="2" class="w-full mb-3"><el-input-number v-model="form.repeatEndCount" :min="1"
+                    controls-position="right" :disabled="form.endType != 2" />
                   次以后
                 </el-radio>
-                <el-radio label="3" class="w-full">
+                <el-radio :label="3" class="w-full">
                   <el-date-picker v-model="form.repeatEndDate" type="date" placeholder="选择日期" style="width:65%"
-                    :disabled-date="(value: Date) => (new Date() > new Date(value))" />
+                    :disabled-date="(value: Date) => (new Date() > new Date(value))" value-format="YYYY-MM-DD"
+                    :disabled="form.endType != 3" />
                   以后
                 </el-radio>
               </el-radio-group>
@@ -111,11 +113,11 @@
         </el-form-item>
       </el-form>
       <GenerateForm ref="generateFormRef" :data="generateFormData" :value="form" />
-      <div v-if="editForm">
+      <div v-if="showLog">
         <el-form-item label="操作记录" label-width="7em">
           <div class="w-full">
             <div v-for="item in form.taskLogs" class=" border-b-2 w-full pl-3">
-              {{ `${item.modTime} ${item.userName} ${item.content}` }}
+              {{ `${dayjs(item.modTime).format('YYYY-MM-DD HH:mm:ss')} ${item.userName} ${item.content}` }}
             </div>
           </div>
         </el-form-item>
@@ -126,11 +128,11 @@
 
 <script lang="ts" setup>
 import { ref, watch } from 'vue';
-import { PRIORITY, TASK_TYPE, TASK_TYPE_FIELD, defalutModalForm, REPEAT_TYPE, CUSTOMER_FORM_URL, defaultGenerateFormData } from "./api";
+import { PRIORITY, TASK_TYPE, TASK_TYPE_FIELD, defalutModalForm, REPEAT_TYPE, CUSTOMER_FORM_URL, defaultGenerateFormData, ALL_CUSTOM, ALL_CLUE, ALL_BUSINESS, ALL_CONTACTS, ALL_USERS, getTaskType } from "./api";
 import { GenerateForm } from "@zmjs/form-design"
 import { get } from '@/utils/request';
 import { Delete, Plus } from "@element-plus/icons-vue"
-import { FormInstance } from 'element-plus';
+import { FormInstance, dayjs } from 'element-plus';
 import { getFromValue } from '@/utils/tools';
 import { Props, Emits } from './type';
 const props = defineProps<Props>()
@@ -139,10 +141,11 @@ watch(() => props.saveLoading, (val) => {
   if (val == "3") {
     formRef.value?.resetFields();
     form.value = { ...defalutModalForm };
+    generateFormRef.value?.reset();
   }
 })
 watch(() => props.visible, (val) => {
-  formRef.value?.resetFields();
+
   if (val) {
     get(CUSTOMER_FORM_URL).then(res => {
       if (Array.isArray(res.data) && res.data.length > 0) {
@@ -151,23 +154,47 @@ watch(() => props.visible, (val) => {
     })
   }
 })
+const customeData = ref<any>([])
+const clueData = ref<any>([])
+const businessData = ref<any>([])
 watch(() => props.editForm, (val) => {
-  if (!val) {
-    //TODO 如果是新增
-    form.value = { ...defalutModalForm };
-    taskTypeValueData.value = [{ label: '客户1', value: 1 }, { label: '客户2', value: 2 }];
-    contactValueData.value = [{ label: '联系人1', value: 1 }, { label: '联系人2', value: 2 }];
-    executorValueData.value = [{ label: '执行人1', value: 1 }, { label: '执行人2', value: 2 }];
-    return
-  }
-  //TODO 如果是编辑
-  form.value = { ...val };
-  customeDate.value = (form.value.repeatDesignDay || "").split(',').filter(Boolean);
-  console.log("customeDate.value ", customeDate.value, form.value.repeatDesignDay);
-  changeTaskType(form.value.taskType)
-  contactValueData.value = [{ label: '联系人1', value: 1 }, { label: '联系人2', value: 2 }];
-  executorValueData.value = [{ label: '执行人1', value: 1 }, { label: '执行人2', value: 2 }];
 
+  let taskType = 0;
+  if (val) {
+    taskType = getTaskType(val);
+  }
+  get(ALL_CUSTOM, {}).then(({ data }) => {
+    customeData.value = data;//客户
+    if (taskType == 0) {
+      taskTypeValueData.value = data;
+    }
+  })
+  get(ALL_BUSINESS, {}).then(({ data }) => {
+    businessData.value = data;//商机
+    if (taskType == 1) {
+      taskTypeValueData.value = data;
+    }
+  })
+  get(ALL_CLUE, {}).then(({ data }) => {
+    clueData.value = data;//线索
+    if (taskType == 3) {
+      taskTypeValueData.value = data;
+    }
+  })
+  get(ALL_CONTACTS, {}).then(({ data }) => {
+    contactValueData.value = data;//联系人
+  })
+  get(ALL_USERS, {}).then(({ data }) => {
+    executorValueData.value = data;
+  })
+  if (val) {
+    form.value = {
+      ...val,
+      taskType,
+    }
+  } else {
+    form.value = { ...defalutModalForm }
+  }
 })
 const rules = ref({
   taskName: [
@@ -180,9 +207,11 @@ const rules = ref({
 const form = ref<any>({});
 const formRef = ref<FormInstance>();
 const generateFormRef = ref<InstanceType<typeof GenerateForm>>();
-const generateFormData = ref<any>(defaultGenerateFormData);
+const generateFormData = ref<any>({ ...defaultGenerateFormData });
 function closeVisible() {
-  generateFormData.value = defaultGenerateFormData;
+  formRef.value?.resetFields();
+  generateFormData.value = { ...defaultGenerateFormData };
+  generateFormRef.value?.reset()
   emits('close')
 }
 function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
@@ -193,6 +222,15 @@ function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
     }
     const repeatDesignDay = customeDate.value.join(",")
     generateFormRef.value?.getData().then((res: any) => {
+      console.log(`{
+        ...form.value,
+        repeatDesignDay,
+        ...res
+      }`, {
+        ...form.value,
+        repeatDesignDay,
+        ...res
+      });
       let submitData = getFromValue({
         ...form.value,
         repeatDesignDay,
@@ -210,8 +248,8 @@ function changeTaskType(value: TASK_VALUE_TYPE) {
   form.value = {
     ...form.value,
     taskType: value,
-    customerId: null, //  客户id 0
-    businessId: null, //商机id 1
+    customId: null, //  客户id 0
+    businessOpportunityId: null, //商机id 1
     orderId: null, //  订单id 2
     clueId: null, //线索id 3
     contactsId: null, //联系人id
@@ -220,13 +258,13 @@ function changeTaskType(value: TASK_VALUE_TYPE) {
     case 0:
       taskTypeValueData.value = [];
       setTimeout(() => {
-        taskTypeValueData.value = [{ label: '客户1', value: 1 }, { label: '客户2', value: 2 }];
+        taskTypeValueData.value = customeData.value;
       }, 500)
       break;
     case 1:
       taskTypeValueData.value = [];
       setTimeout(() => {
-        taskTypeValueData.value = [{ label: "商机1", value: 1 }, { label: "商机2", value: 2 }]
+        taskTypeValueData.value = businessData.value;
       }, 500)
       break;
     case 2:
@@ -238,7 +276,7 @@ function changeTaskType(value: TASK_VALUE_TYPE) {
     case 3:
       taskTypeValueData.value = [];
       setTimeout(() => {
-        taskTypeValueData.value = [{ label: "线索1", value: 1 }, { label: "线索2", value: 2 }]
+        taskTypeValueData.value = clueData.value;
       }, 500)
       break;
     default:
@@ -254,7 +292,7 @@ const executorValueData = ref<any>([])
 function changeRepeat(value: string | number | boolean) {
   form.value = {
     ...form.value,
-    repeat: value,
+    isRepeat: value,
     repeatType: 0, //重复类型
     endType: 1, //结束类型
     repeatEndNever: 1,
@@ -288,7 +326,6 @@ function changeEndType(value: string | number | boolean) {
     repeatEndCount: null, //重复指定次数次数后结束
     repeatEndDate: null, //重复到指定日期后结束
     repeatDesignDay: null, //自定义日期
-    repeatDesignSameday: null, //自定义周期
   }
 }
 

+ 10 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/type.d.ts

@@ -16,12 +16,15 @@ export interface Props {
    * @default '新建任务'
    */
   title?: string;
+  /**
+   * 需要禁用的表单的字段
+   */
   disabledList?: (
     | "taskName"
     | "priority"
     | "taskType"
-    | "customerId"
-    | "businessId"
+    | "customId"
+    | "businessOpportunityId"
     | "orderId"
     | "clueId"
     | "contactsId"
@@ -29,6 +32,11 @@ export interface Props {
     | "startDate"
     | "endDate"
   )[];
+  /**
+   *  是否显示操作记录
+   * @default false
+   */
+  showLog?: boolean;
 }
 
 export interface Emits {

+ 13 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/ExportModal.vue

@@ -19,12 +19,12 @@
             <el-option v-for="item in PRIORITY " :key="item.value" :value="item.value" :label="item.label" />
           </el-select>
         </el-form-item>
-          <el-form-item label="执行人:">
+        <el-form-item label="执行人:">
           <el-select v-model="form.executorId" placeholder="请选择" clearable multiple filterable>
-            <el-option v-for="item in executorValueData" :key="item.value" :value="item.value" :label="item.label" />
+            <el-option v-for="item in executorValueData" :key="item.id" :value="item.id" :label="item.name" />
           </el-select>
         </el-form-item>
-         <el-form-item label="开始时间:" class="w50">
+        <el-form-item label="开始时间:" class="w50">
           <el-date-picker v-model="form.startDate" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" />
         </el-form-item>
         <el-form-item label="截止时间:" class="w50">
@@ -37,27 +37,30 @@
 
 <script lang="ts" setup>
 import { ref, watch } from 'vue';
-import { Props, Emits } from "./type"
-import { defalutExportForm,PRIORITY } from './api';
+import { defalutExportForm, PRIORITY,ALL_USERS } from './api';
+import { post } from '@/utils/request';
+import { Emits, Props } from './type';
 const props = defineProps<Props>();
 const emits = defineEmits<Emits>();
 watch(() => props.visible, (val) => {
   if (val) {
     form.value = { ...defalutExportForm }
-    executorValueData.value = [{ label: '执行人1', value: '1' }, { label: '执行人2', value: '2' }];
+    post(ALL_USERS, {}).then(({ data }) => {
+      executorValueData.value = data;
+    })
   }
- })
+})
 function closeVisible() {
   emits("close")
- }
+}
 function submit() {
   const { executorId, ...rest } = form.value;
   const data = {
     ...rest,
     executorId: executorId.join(','),
   }
-  emits("submit",data)
- }
+  emits("submit", data)
+}
 
 const formRef = ref();
 const form = ref<any>({})

+ 11 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/api.ts

@@ -21,10 +21,10 @@ export const defaultSearchForm = {
   orderName: "", //销售订单
   phone: "", //电话
   clueName: "", //线索名称
-  priority: "",//优先级
-  status: "",//任务状态
-  startDate: "",//开始时间
-  endDate: "",//截止时间
+  priority: "", //优先级
+  status: "", //任务状态
+  startDate: "", //开始时间
+  endDate: "", //截止时间
   pageIndex: 1,
   pageSize: 10,
 };
@@ -49,4 +49,10 @@ export const defalutExportForm = {
   endDate: "", //截止日期
 };
 
-export const PAGE_LIST = `/task/pageTask`;
+export const PAGE_LIST = `${MOD}/pageTask`; //列表
+export const ADD_TASK = `${MOD}/addTask`; //新建任务
+export const DELETE_TASKS = `${MOD}/deleteTasks`; //删除任务
+export const UPDATE_TASK_STATUS = `${MOD}/updateTaskStatus`; //更新任务状态
+export const UPDATE_TASK = `${MOD}/updateTask`;//修改任务
+
+export const ALL_USERS = "/user/getSimpleActiveUserList"; //获取所有人

+ 160 - 60
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue

@@ -12,25 +12,23 @@
                 <el-option v-for="item in PRIORITY" :key="item.value" :value="item.value" :label="item.label" />
               </el-select>
             </el-form-item>
-            <el-form-item label="客户名称:" label-width="7em" prop="customerName">
-              <el-input v-model="searchForm.customerName" placeholder="请输入" />
+            <el-form-item label="客户名称:" label-width="7em" prop="customName">
+              <el-input v-model="searchForm.customName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="联系人:" label-width="7em" prop="tel">
-              <el-input v-model="searchForm.tel" placeholder="请输入" />
+            <el-form-item label="联系人:" label-width="7em" prop="contactsName">
+              <el-input v-model="searchForm.contactsName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="执行人:" label-width="7em" prop="tel">
-              <el-select v-model="searchForm.status" placeholder="请选择">
-                <el-option v-for="item in STATUS" :key="item.value" :value="item.value" :label="item.label" />
-              </el-select>
+            <el-form-item label="执行人:" label-width="7em" prop="executorName">
+              <el-input v-model="searchForm.executorName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="商机名称:" label-width="7em" prop="tel">
-              <el-input v-model="searchForm.tel" placeholder="请输入" />
+            <el-form-item label="商机名称:" label-width="7em" prop="businessName">
+              <el-input v-model="searchForm.businessName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="销售订单:" label-width="7em" prop="tel">
-              <el-input v-model="searchForm.tel" placeholder="请输入" />
+            <el-form-item label="销售订单:" label-width="7em" prop="orderName">
+              <el-input v-model="searchForm.orderName" placeholder="请输入" />
             </el-form-item>
-            <el-form-item label="线索名称:" label-width="7em" prop="tel">
-              <el-input v-model="searchForm.tel" placeholder="请输入" />
+            <el-form-item label="线索名称:" label-width="7em" prop="clueName">
+              <el-input v-model="searchForm.clueName" placeholder="请输入" />
             </el-form-item>
             <el-form-item label="任务状态:" label-width="7em" prop="status">
               <el-select v-model="searchForm.status" placeholder="请选择">
@@ -51,7 +49,7 @@
         </div>
       </div>
     </div>
-    <div class="flex-1 p-5 overflow-auto" v-loading="loading">
+    <div class="flex-1 p-5 overflow-auto">
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
         <div class="ml-auto p-3">
           <el-button type="primary" @click="createTasks()">创建任务</el-Button>
@@ -59,8 +57,8 @@
           <el-button type="primary" @click="openImportModal()">导入</el-Button>
           <el-button type="primary" :loading="btnLoading" @click="exportTasks()">导出</el-Button>
         </div>
-        <div class="flex-1">
-          <el-table :data="tableData" style="width: 100%;height: 100%;" ref="tableRef">
+        <div class="flex-1 overflow-y-auto">
+          <el-table :data="tableData" style="width: 100%;height: 100%;" ref="tableRef" v-loading="loading">
             <el-table-column type="selection" width="55" />
             <el-table-column prop="taskName" label="任务名称" header-align="center" align="center" show-overflow-tooltip
               width="200" />
@@ -71,39 +69,70 @@
               </template>
             </el-table-column>
             <el-table-column prop="status" label="状态" width="100" header-align="center" align="center">
-
               <template #default="scope">
                 <el-text :type="STATUS[scope.row.status]?.type">
                   {{ STATUS[scope.row.status]?.label }}
                 </el-text>
               </template>
             </el-table-column>
-            <el-table-column prop="customerName" label="执行人" width="120" header-align="center" align="center" />
-            <el-table-column prop="startDate" label="开始时间" width="120" :sortable="true" header-align="center"
-              align="center" />
-            <el-table-column prop="endDate" label="截止时间" width="120" :sortable="true" header-align="center"
-              align="center" />
-            <el-table-column prop="contactsName" label="联系人" header-align="center" align="center" width="120" />
+            <el-table-column prop="customName" label="执行人" width="120" header-align="center" align="center" />
+            <el-table-column prop="startDate" label="开始时间" width="200" :sortable="true" header-align="center"
+              align="center" value-format="YYYY-MM-DD" />
+            <el-table-column prop="endDate" label="截止时间" width="200" :sortable="true" header-align="center"
+              align="center" value-format="YYYY-MM-DD" />
+            <el-table-column prop="contactsName" label="联系人" header-align="center" align="center" width="120">
+              <template #default="scope">
+                <el-link :underline="false" type="primary" @click="goDetail(scope.row, 'contacts', 'contactsId')">
+                  {{ scope.row.contactsName }}
+                </el-link>
+              </template>
+            </el-table-column>
             <el-table-column prop="contactsTel" label="联系人号码" header-align="center" align="center" width="140" />
-            <el-table-column prop="customerName" label="客户名称" header-align="center" align="center" width="120" />
-            <el-table-column prop="businessName" label="商机名称" header-align="center" align="center" width="200" />
-            <el-table-column prop="businessName" label="销售订单" header-align="center" align="center" width="200" />
-            <el-table-column prop="businessName" label="线索名称" header-align="center" align="center" width="200" />
+            <el-table-column prop="customName" label="客户名称" header-align="center" align="center" width="120">
+              <template #default="scope">
+                <el-link :underline="false" type="primary" @click="goDetail(scope.row, 'customer', 'customId')">
+                  {{ scope.row.customName }}
+                </el-link>
+              </template>
+            </el-table-column>
+            <el-table-column prop="businessName" label="商机名称" header-align="center" align="center" width="200">
+              <template #default="scope">
+                <el-link :underline="false" type="primary"
+                  @click="goDetail(scope.row, 'business', 'businessOpportunityId')">
+                  {{ scope.row.businessName }}
+                </el-link>
+              </template>
+            </el-table-column>
+            <el-table-column prop="orderName" label="销售订单" header-align="center" align="center" width="200">
+              <template #default="scope">
+                <el-link :underline="false" type="primary" @click="goDetail(scope.row, 'order', 'orderId')">
+                  {{ scope.row.orderName }}
+                </el-link>
+              </template>
+            </el-table-column>
+            <el-table-column prop="clueName" label="线索名称" header-align="center" align="center" width="200">
+              <template #default="scope">
+                <el-link :underline="false" type="primary" @click="goDetail(scope.row, 'thread', 'clueId')">
+                  {{ scope.row.clueName }}
+                </el-link>
+              </template>
+            </el-table-column>
+
             <el-table-column fixed="right" label="操作" header-align="center" align="center" width="150">
 
               <template #default="scope">
                 <el-button link type="primary" size="small" @click.prevent="editRow(scope.row)">
                   编辑
                 </el-button>
-                <el-button link type="primary" size="small" v-if="scope.row.status == '3'"
-                  @click.prevent="restart(scope.$index)">
+                <el-button link type="primary" size="small" v-if="scope.row.status == '2'"
+                  @click.prevent="restart(scope.row)">
                   重启
                 </el-button>
-                <el-button link type="primary" size="small" v-else @click.prevent="finishRow(scope.$index, scope)">
+                <el-button link type="primary" size="small" v-else @click.prevent="finishRow(scope.row)">
                   完成
                 </el-button>
 
-                <el-button link type="danger" size="small" @click.prevent="deleteRow(scope.$index)">
+                <el-button link type="danger" size="small" @click.prevent="deleteRow(scope.row)">
                   删除
                 </el-button>
               </template>
@@ -112,13 +141,12 @@
         </div>
         <div class="ml-auto">
           <el-pagination layout="total, prev, pager, next, sizes" :total="totalCount"
-            :current-page="searchForm.pageIndex" hide-on-single-page @size-change="sizeChage"
-            @current-change="currentChange" />
+            :current-page="searchForm.pageIndex" @size-change="sizeChage" @current-change="currentChange" />
         </div>
       </div>
     </div>
-    <TaskModal :visible="taskModalVisible" :title="taskForm ? '编辑任务' : '新建任务'" :save-loading="taskLoading"
-      :edit-form="taskForm" @close="closeTaskModal" @submit="submitForm" />
+    <TaskModal :visible="taskModalVisible" :title="isEdit ? '编辑任务' : '新建任务'" :save-loading="taskLoading"
+      :edit-form="taskForm" :show-log="isEdit" @close="closeTaskModal" @submit="submitForm" />
     <ImportModal :visible="importVisible" :save-loading="importLoading" @close="closeImportModal"
       @submit="importExcel" />
     <ExportModal :visible="exportVisible" :save-loading="exportLoading" @close="closeExportModal"
@@ -128,42 +156,59 @@
 
 <script lang="ts" setup>
 import { inject, onBeforeMount, onMounted, ref } from 'vue';
+import { useRouter } from 'vue-router';
 import { useStore } from '@/store';
-import { MOD, PRIORITY, STATUS, defaultSearchForm, PAGE_LIST } from './api';
-import { dayjs, ElTable } from 'element-plus';
+import { MOD, PRIORITY, STATUS, defaultSearchForm, PAGE_LIST, ADD_TASK, DELETE_TASKS, UPDATE_TASK, UPDATE_TASK_STATUS } from './api';
+import { ElTable, dayjs } from 'element-plus';
 import TaskModal from '@/components/TaskModal/index.vue';
 import ImportModal from './ImportModal.vue';
 import ExportModal from './ExportModal.vue';
-import { post, uploadFile } from '@/utils/request';
-import { getFromValue } from '@/utils/tools';
+import { get, post, uploadFile } from '@/utils/request';
+import { getFromValue, confirmAction } from '@/utils/tools';
+import { pushMap } from './type';
+const router = useRouter()
 const { getFunctionList } = useStore()
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const pagePermission = ref<any[]>();
 const taskModalVisible = ref(false);
 const taskForm = ref<any>();
+const isEdit = ref(false);
+
 const taskLoading = ref<saveLoadingType>("1");
 function closeTaskModal() {
   taskModalVisible.value = false;
   taskForm.value = null;
 }
 function submitForm(data: any, isClose: boolean) {
-  const { executorId } = data;
-  console.log("原有的数据", data, isClose);
+  const { executorId, startDate, endDate, repeatEndDate } = data;
   let params = {
-    ...data
+    ...data,
+    startDate: startDate && dayjs(startDate).format('YYYY-MM-DD 00:00:00'),
+    endDate: endDate && dayjs(endDate).format('YYYY-MM-DD 23:59:59'),
+    repeatEndDate: repeatEndDate && dayjs(repeatEndDate).format('YYYY-MM-DD 23:59:59')
   }
   if (executorId) {
     params = {
       ...params,
-      executorId: executorId.join(',')
+      executorId: executorId.join(','),
+      taskLogs: []
     }
   }
-  console.log("提交的数据水水水水", params, isClose);
+  // console.log("提交的数据", getFromValue(params));
+  // return;
   taskLoading.value = "2";
-  setTimeout(() => {
+  let url = isEdit.value ? UPDATE_TASK : ADD_TASK
+  let msg = isEdit.value ? "修改成功" : "新建成功"
+  post(url, getFromValue(params)).then(() => {
     taskLoading.value = "3";
     taskModalVisible.value = isClose;
-  }, 2000)
+
+    globalPopup?.showSuccess(msg)
+    search();
+  }).catch(err => {
+    taskLoading.value = "4"
+    globalPopup?.showError(err.message)
+  })
 
 }
 const searchForm = ref<any>();
@@ -174,13 +219,19 @@ const totalCount = ref<number>(0);
 const tableData = ref<any[]>([])
 function search() {
   loading.value = true;
-  post(PAGE_LIST, getFromValue(searchForm.value)).then(({ data }) => {
+  const { startDate, endDate } = searchForm.value;
+  let params = {
+    ...searchForm.value,
+    startDate: startDate && dayjs(startDate).format('YYYY-MM-DD 00:00:00'),
+    endDate: endDate && dayjs(endDate).format('YYYY-MM-DD 23:59:59')
+  }
+  post(PAGE_LIST, getFromValue(params)).then(({ data }) => {
     loading.value = false;
     const { total, record } = data;
     totalCount.value = total;
     tableData.value = record;
   }).catch(err => {
-    console.log("err", err);
+    globalPopup?.showError(err);
     loading.value = false;
   })
 }
@@ -188,7 +239,6 @@ function reset() {
   searchForm.value = { ...defaultSearchForm };
 }
 function sizeChage(currentSize: number): void {
-  console.log("object", currentSize);
   searchForm.value = {
     ...searchForm.value,
     pageSize: currentSize,
@@ -198,7 +248,6 @@ function sizeChage(currentSize: number): void {
 }
 
 function currentChange(currentPage: number): void {
-  console.log("object", currentPage);
   searchForm.value = {
     ...searchForm.value,
     pageIndex: currentPage
@@ -209,10 +258,20 @@ function currentChange(currentPage: number): void {
 function createTasks() {
   taskModalVisible.value = true;
   taskForm.value = null;
+  isEdit.value = false;
 }
 function deleteTasks() {
-  console.log("deleteTasks", searchForm.value);
-  console.log(dayjs().format('YYYY-MM-DD'));
+  confirmAction("确定删除所选内容吗?").then(() => {
+    const taskIds = tableRef.value?.getSelectionRows()?.map((item: any) => item.id).join(",")
+    post(DELETE_TASKS, {
+      taskIds
+    }).then(() => {
+      search();
+      globalPopup?.showSuccess("删除成功")
+    }).catch(err => {
+      globalPopup?.showError(err)
+    })
+  });
 }
 
 
@@ -267,17 +326,58 @@ function exportExcel(data: any) {
   }, 2000)
 }
 function editRow(row: any) {
+  isEdit.value = true;
   taskModalVisible.value = true;
-  taskForm.value = row;
+  let value = {
+    ...row
+  }
+  if (value.executorId) {
+    value.executorId = value.executorId.split(",")
+  }
+  taskForm.value = value;
 }
-function finishRow(index: any, scope: any) {
-  console.log("finishRow", index, scope);
+function finishRow(item: any) {
+  post(UPDATE_TASK_STATUS, {
+    id: item.id,
+    status: 2
+  }).then(() => {
+    search()
+    globalPopup?.showSuccess("操作成功")
+  }).catch(err => {
+    globalPopup?.showError(err)
+  })
+}
+function restart(item: any) {
+  post(UPDATE_TASK_STATUS, {
+    id: item.id,
+    status: 0
+  }).then(() => {
+    search()
+    globalPopup?.showSuccess("操作成功")
+  }).catch(err => {
+    globalPopup?.showError(err)
+  })
 }
-function restart(index: any) {
-  console.log("restart", index);
+function deleteRow(item: any) {
+  confirmAction("确定删除吗?").then(() => {
+    post(DELETE_TASKS, {
+      taskIds: item.id
+    }).then(() => {
+      search();
+      globalPopup?.showSuccess("删除成功")
+    }).catch(err => {
+      console.log("err", err);
+      globalPopup?.showError(err)
+    })
+  })
 }
-function deleteRow(index: any) {
-  console.log("deleteRow", index);
+function goDetail(item: any, path: keyof pushMap, typeId: pushMap[keyof pushMap]) {
+  router.push({
+    path: `/${path}/detail`,
+    query: {
+      id: item[typeId]
+    }
+  })
 }
 onBeforeMount(() => {
   pagePermission.value = getFunctionList(MOD);

+ 7 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/type.d.ts

@@ -21,3 +21,10 @@ export interface Emits {
    */
   (event: "submit", submitData: Object): void;
 }
+export type pushMap = {
+  contacts: "contactsId"; //联系人
+  customer: "customId"; //客户
+  business: "businessOpportunityId"; //商机
+  order: "orderId"; //订单
+  thread: "clueId"; //线索
+};

+ 45 - 40
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts

@@ -1,6 +1,6 @@
-import { defalutModalForm } from '@/components/TaskModal/api'
-import { ElMessageBox } from 'element-plus';
-import { get } from './request';
+import { defalutModalForm } from "@/components/TaskModal/api";
+import { ElMessageBox } from "element-plus";
+import { get } from "./request";
 /**
  * 判断值是否为空
  * @param value 值
@@ -49,7 +49,7 @@ export function resetFromValue<T>(formData: T, resetForm: any = {}) {
     result[key] = "";
   }
   // return result;
-  return { ...result, ...resetForm }
+  return { ...result, ...resetForm };
 }
 
 /**
@@ -113,34 +113,34 @@ export function getAllListByCode(arr: ListByCodeType) {
 /**
  * 获取当月第一天
  * @param date 日期 new Date()
- * @returns 
+ * @returns
  */
-export function getFirstDayOfMonth(date: Date) {  
-  const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);  
-  return formatDate(firstDay);  
-}  
+export function getFirstDayOfMonth(date: Date) {
+  const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
+  return formatDate(firstDay);
+}
 
 /**
  * 获取当月最后一天
  * @param date 日期 new Date()
- * @returns 
+ * @returns
  */
-export function getLastDayOfMonth(date: Date) {  
-  const nextMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0);  
-  return formatDate(nextMonth);  
-}  
+export function getLastDayOfMonth(date: Date) {
+  const nextMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0);
+  return formatDate(nextMonth);
+}
 
 /**
  * 将 Date 对象格式化为 "YYYY-MM-DD" 的形式
  * @param date 日期 new Date()
- * @returns 
+ * @returns
  */
-export function formatDate(date: Date) {  
-  const year = date.getFullYear();  
-  const month = (1 + date.getMonth()).toString().padStart(2, '0');  
-  const day = date.getDate().toString().padStart(2, '0');  
-  return `${year}-${month}-${day}`;  
-}  
+export function formatDate(date: Date) {
+  const year = date.getFullYear();
+  const month = (1 + date.getMonth()).toString().padStart(2, "0");
+  const day = date.getDate().toString().padStart(2, "0");
+  return `${year}-${month}-${day}`;
+}
 
 /**
  * 获取创建任务的 form
@@ -150,8 +150,8 @@ export function formatDate(date: Date) {
 export function createTaskFromType(taskType: TASK_VALUE_TYPE) {
   return {
     ...defalutModalForm,
-    taskType
-  }
+    taskType,
+  };
 }
 
 /**
@@ -160,14 +160,14 @@ export function createTaskFromType(taskType: TASK_VALUE_TYPE) {
  * @param fileName 文件名称
  */
 export async function downloadFile(fileData: any, fileName: string) {
-  const url=fileData;
-  const link = document.createElement('a');
+  const url = fileData;
+  const link = document.createElement("a");
   link.href = url;
-  link.setAttribute('download', fileName);
+  link.setAttribute("download", fileName);
   document.body.appendChild(link);
   link.click();
   document.body.removeChild(link);
-};
+}
 
 /**
  * 消息弹窗框
@@ -177,19 +177,24 @@ export async function downloadFile(fileData: any, fileName: string) {
  * @param options 消息弹窗框其他配置
  * @returns promise
  */
-export function confirmAction(message: string, title = '', type: componentType = 'warning', options = {}) {  
-  return new Promise<void>((resolve, reject) => {  
-    ElMessageBox.confirm(message, title, {  
-      ...{  
-        confirmButtonText: '确定',  
-        cancelButtonText: '取消',  
-        type: type,  
-      },  
-      ...options,  
-    })  
-      .then(() => resolve())  
-      .catch(() => reject());  
-  });  
+export function confirmAction(
+  message: string,
+  title = "",
+  type: componentType = "warning",
+  options = {}
+) {
+  return new Promise<void>((resolve, reject) => {
+    ElMessageBox.confirm(message, title, {
+      ...{
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: type,
+      },
+      ...options,
+    })
+      .then(() => resolve())
+      .catch(() => reject());
+  });
 }
 
 /**

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/DingDingController.java

@@ -8,7 +8,7 @@ import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
 import com.management.platform.service.CompanyDingdingService;
 import com.management.platform.service.DingDingService;
-import com.management.platform.service.impl.DingDingServiceImpl;
+import com.management.platform.service.impl.*;
 import com.management.platform.util.*;
 import com.taobao.api.ApiException;
 import org.slf4j.Logger;

+ 6 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ExpenseItemController.java

@@ -3,9 +3,11 @@ package com.management.platform.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.CompanyDingding;
 import com.management.platform.entity.ExpenseItem;
 import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.entity.vo.ExpenseItemVO;
+import com.management.platform.mapper.CompanyDingdingMapper;
 import com.management.platform.mapper.ExpenseItemMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.mapper.WxCorpInfoMapper;
@@ -44,6 +46,8 @@ public class ExpenseItemController {
     @Resource
     private WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
+    @Resource
     private ExcelExportService excelExportService;
     @Value(value = "${upload.path}")
     private String path;
@@ -61,6 +65,7 @@ public class ExpenseItemController {
         HttpRespMsg msg = new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId,companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId,companyId));
         HttpRespMsg data = list(projectId);
         List<ExpenseItemVO> itemVOS = (List<ExpenseItemVO>) data.getData();
         List<List<String>> dataList=new ArrayList<>();
@@ -99,7 +104,7 @@ public class ExpenseItemController {
         }
         String fileUrlSuffix = "费用报销明细表_" + System.currentTimeMillis();
         try {
-           return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileUrlSuffix, dataList, path);
+           return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileUrlSuffix, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java

@@ -166,7 +166,7 @@ public class FinanceController {
         //String fileName = company.getCompanyName()+"_财务人员成本模板";
         String fileName = MessageUtils.message("fileName.financialCost",company.getCompanyName());
         //导出模板不需要转译,不传wxCorpInfo
-        return excelExportService.exportGeneralExcelByTitleAndList(null, fileName, allList, path);
+        return excelExportService.exportGeneralExcelByTitleAndList(null,null, fileName, allList, path);
     }
     @RequestMapping("/batchRemove")
     public HttpRespMsg batchRemove(String ids){

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/GroupBudgetReviewController.java

@@ -65,6 +65,8 @@ public class GroupBudgetReviewController {
     private TimeTypeMapper timeTypeMapper;
     @Resource
     private InformationMapper informationMapper;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @RequestMapping("/add")
     public HttpRespMsg add(Integer groupId,Integer oldManDay,Integer changeManDay,Integer nowManDay,String remark){
@@ -216,6 +218,7 @@ public class GroupBudgetReviewController {
         LocalDateTime localDateTimesStart = LocalDate.parse(startDate, df).atTime(LocalTime.MIN);
         LocalDateTime localDateTimesEnd = LocalDate.parse(endDate, df).atTime(LocalTime.MAX);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
         LambdaQueryWrapper<GroupBudgetReview> queryWrapper = new LambdaQueryWrapper<GroupBudgetReview>().eq(GroupBudgetReview::getCompanyId, companyId).orderByDesc(GroupBudgetReview::getCreateTime);
         if(startDate!=null && endDate!=null){
@@ -267,7 +270,7 @@ public class GroupBudgetReviewController {
         }
         String fileUrlSuffix = "预估工时审核表_" + System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileUrlSuffix,dataList,path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileUrlSuffix,dataList,path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectRequirementController.java

@@ -64,6 +64,8 @@ public class ProjectRequirementController {
     private WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
     private ExcelExportService excelExportService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
     @RequestMapping("/addOrMod")
     public HttpRespMsg addOrMod(ProjectRequirement record) {
         HttpRespMsg msg = new HttpRespMsg();
@@ -124,6 +126,7 @@ public class ProjectRequirementController {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("TOKEN")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         LocalDate now = LocalDate.now();
         now = now.minusDays(7);
         String startDate = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(now);
@@ -198,7 +201,7 @@ public class ProjectRequirementController {
         //生成excel文件导出
         //String fileName = "资源需求统计报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.resourceDemand",System.currentTimeMillis());
-        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
     }
     @RequestMapping("/importData")
     public HttpRespMsg importData(MultipartFile multipartFile){

+ 217 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -14,6 +14,7 @@ import com.management.platform.mapper.*;
 import com.management.platform.service.*;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
+import org.apache.poi.hssf.usermodel.*;
 import org.assertj.core.util.Lists;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.transaction.annotation.Transactional;
@@ -25,6 +26,8 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.time.Duration;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -101,9 +104,17 @@ public class TaskController {
     private SapProjectServiceService sapProjectServiceService;
     @Resource
     private ExcelExportService excelExportService;
+    @Resource
+    private ProjectMapper projectMapper;
+    @Resource
+    private DingDingService dingDingService;
     @Value(value = "${upload.path}")
     private String path;
 
+    //用于控制线程锁
+    public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
+    public static HashMap<String, Integer> corpddJobCenter = new HashMap();
+
     @RequestMapping("/save")
     @Transactional
     public HttpRespMsg save(Task task) throws Exception {
@@ -968,7 +979,195 @@ public class TaskController {
 
     @RequestMapping("exportTask")
     public HttpRespMsg exportTask(Integer projectId, Integer taskType) {
-        return taskService.exportTask(projectId, taskType);
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        List<TimeTask> list= taskMapper.getTaskWithWorktime(projectId, taskType);
+        Project project = projectMapper.selectById(projectId);
+        User user = userMapper.selectById(request.getHeader("token"));
+        Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
+        try {
+            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+            //准备导出
+            HSSFWorkbook workbook = new HSSFWorkbook();
+            //HSSFSheet sheet = workbook.createSheet("任务数据");
+            HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.taskData"));
+            //创建表头
+            HSSFRow headRow = sheet.createRow(0);
+            //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
+            sheet.setColumnWidth(0, 50 * 256);
+            sheet.setColumnWidth(1, 20 * 256);
+            sheet.setColumnWidth(2, 20 * 256);
+            sheet.setColumnWidth(3, 20 * 256);
+            sheet.setColumnWidth(4, 20 * 256);
+            sheet.setColumnWidth(5, 20 * 256);
+            sheet.setColumnWidth(6, 20 * 256);
+            sheet.setColumnWidth(7, 20 * 256);
+            sheet.setColumnWidth(8, 20 * 256);
+            sheet.setColumnWidth(9, 20 * 256);
+            //设置为居中加粗
+            HSSFCellStyle headStyle = workbook.createCellStyle();
+            HSSFFont font = workbook.createFont();
+            font.setBold(true);
+            headStyle.setFont(font);
+            HSSFFont redFont = workbook.createFont();
+            redFont.setColor(HSSFFont.COLOR_RED);
+            HSSFCellStyle redStyle = workbook.createCellStyle();
+            redStyle.setFont(redFont);
+            //表头
+            HSSFCell headCell;
+            headCell = headRow.createCell(0);
+            //headCell.setCellValue("任务内容");
+            headCell.setCellValue(MessageUtils.message("excel.taskContent"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(1);
+            //headCell.setCellValue("项目");
+            headCell.setCellValue(MessageUtils.message("entry.project"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(2);
+            //headCell.setCellValue("执行人");
+            headCell.setCellValue(MessageUtils.message("excel.executor"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(3);
+            //headCell.setCellValue("创建时间");
+            headCell.setCellValue(MessageUtils.message("excel.creatTime"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(4);
+            //headCell.setCellValue("截止时间");
+            headCell.setCellValue(MessageUtils.message("excel.deadline"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(5);
+            //headCell.setCellValue("完成时间");
+            headCell.setCellValue(MessageUtils.message("excel.comTime"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(6);
+            //headCell.setCellValue("是否完成");
+            headCell.setCellValue(MessageUtils.message("excel.whetherCom"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(7);
+            //headCell.setCellValue("是否逾期");
+            headCell.setCellValue(MessageUtils.message("excel.overdueNot"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(8);
+            //headCell.setCellValue("计划工时(h)");
+            headCell.setCellValue(MessageUtils.message("excel.plannedWork"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(9);
+            //headCell.setCellValue("实际工时(h)");
+            headCell.setCellValue(MessageUtils.message("excel.actualWork"));
+            headCell.setCellStyle(headStyle);
+            int rowNum = 1;
+            for (TimeTask task : list) {
+                HSSFRow row = sheet.createRow(rowNum);
+                row.createCell(0).setCellValue(task.getName());
+                row.createCell(1).setCellValue(project.getProjectName());
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(task.getExecutorId())).findFirst();
+                    if(first.isPresent()){
+                        row.createCell(2).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?"":first.get().getCorpwxUserid())+"$");
+                    }else {
+                        row.createCell(2).setCellValue("");
+                    }
+                }else {
+                    row.createCell(2).setCellValue(task.getExecutorName());
+                }
+                row.createCell(3).setCellValue(dateTimeFormatter.format(task.getCreateDate()));
+                row.createCell(4).setCellValue(task.getEndDate() != null?dateTimeFormatter.format(task.getEndDate()):"");
+                row.createCell(5).setCellValue(task.getFinishDate() !=null?dateTimeFormatter.format(task.getFinishDate()):"");
+                row.createCell(6).setCellValue(task.getTaskStatus() == 1?"Y":"N");
+                boolean isExpired = false;
+                if (task.getTaskStatus() == 0 && task.getEndDate() !=null&& !task.getEndDate().isAfter(LocalDate.now())) {
+                    isExpired = true;
+                }
+                row.createCell(7).setCellValue(isExpired?"Y":"N");
+                row.createCell(8).setCellValue(task.getPlanHours()==null?"": task.getPlanHours().toString());
+                row.createCell(9).setCellValue(task.getWorkHours());
+                rowNum++;
+            }
+            //生成Excel文件
+            //String fileUrlSuffix = "【"+project.getProjectName()+"】任务数据" + System.currentTimeMillis() + ".xls";
+            String fileUrlSuffix = "【"+project.getProjectName()+"】"+MessageUtils.message("excel.taskData") + System.currentTimeMillis() + ".xls";
+            FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
+            workbook.write(fos);
+            fos.flush();
+            fos.close();
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
+                String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
+                    if (corpwxJobResult != null) {
+                        if (corpwxJobResult.getErrCode() == 0) {
+                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
+                            corpwxJobCenter.remove(jobId);
+                        } else {
+                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
+                            return httpRespMsg;
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    httpRespMsg.data = syncTranslationResult;
+                } else {
+                    //httpRespMsg.setError("处理超时...");
+                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                }
+            }else if(dingding!=null&&dingding.getSyncContact()==1){
+                String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+                String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(),dingding);
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    Integer status = corpddJobCenter.get(jobId);
+                    if (status != null) {
+                        if (status==1) {
+                            syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                            corpddJobCenter.remove(jobId);
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    httpRespMsg.data = syncTranslationResult;
+                } else {
+                    //httpRespMsg.setError("处理超时...");
+                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                }
+            }else {
+                httpRespMsg.data = "/upload/" + fileUrlSuffix;
+            }
+        } catch (NullPointerException e) {
+            e.printStackTrace();
+            //httpRespMsg.setError("验证失败或缺少数据");
+            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
+            return httpRespMsg;
+        } catch (IOException e) {
+            e.printStackTrace();
+            //httpRespMsg.setError("文件生成错误");
+            httpRespMsg.setError(MessageUtils.message("file.generateError"));
+            return httpRespMsg;
+        }catch (Exception e){
+            e.printStackTrace();
+            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
+            return httpRespMsg;
+        }
+        return httpRespMsg;
     }
 
     @RequestMapping("/importTask")
@@ -1178,6 +1377,7 @@ public class TaskController {
         DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         List<Department> departmentList = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getCompanyId, companyId));
         WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         HttpRespMsg respMsg = listByPage(status, viewId, null, null, type, dateType, startDate, endDate, deptId, projectId, groupId, targetUserId);
         Map<String, Object> msgData = (Map<String, Object>) respMsg.getData();
         List<Task> taskList = (List<Task>) msgData.get("records");
@@ -1252,13 +1452,28 @@ public class TaskController {
         }
         String fileName = "待办任务导出_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
         return msg;
     }
 
+    @RequestMapping("/userTaskCompleteDetail")
+    public HttpRespMsg userTaskCompleteDetail(Integer pageIndex,Integer pageSize,String startDate,String endDate,String userId,Integer deptId){
+        return taskService.userTaskCompleteDetail(pageIndex,pageSize,startDate,endDate,userId,deptId);
+    }
+
+    @RequestMapping("/exportUserTaskCompleteDetail")
+    public HttpRespMsg exportUserTaskCompleteDetail(String startDate,String endDate,String userId,Integer deptId){
+        return taskService.exportUserTaskCompleteDetail(startDate,endDate,userId,deptId);
+    }
+
+    @RequestMapping("/getTaskByUserId")
+    public HttpRespMsg getTaskByUserId(String startDate,String endDate,String userId,Integer pageIndex,Integer pageSize){
+        return taskService.getTaskByUserId(startDate,endDate,userId,pageIndex,pageSize);
+    }
+
 
 }
 

+ 445 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -12,9 +12,13 @@ import com.management.platform.service.*;
 import com.management.platform.util.ColorUtil;
 import com.management.platform.util.HttpRespMsg;
 
+import com.management.platform.util.ListUtil;
+import com.management.platform.util.MessageUtils;
+import org.apache.poi.hssf.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.ldap.core.LdapTemplate;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -29,10 +33,12 @@ import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 import javax.naming.ldap.SortControl;
 import javax.servlet.http.HttpServletRequest;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -89,8 +95,28 @@ public class UserController {
     private String dcFirst;
     @Value("${spring.ldap.base.dcSecond}")
     private String dcSecond;
+    @Value(value = "${upload.path}")
+    private String path;
     @Resource
     private UserWithBeisenMapper userWithBeisenMapper;
+    @Resource
+    private SysFunctionService sysFunctionService;
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
+    @Resource
+    private WxCorpInfoMapper wxCorpInfoMapper;
+    @Resource
+    private CompanyDingdingService companyDingdingService;
+    @Resource
+    private DingDingService dingDingService;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private UserCertMapper userCertMapper;
+
+    public static HashMap<String, Integer> corpddJobCenter = new HashMap();
+    //用于控制线程锁
+    public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
 
     /**
      * 登录网页端
@@ -257,14 +283,431 @@ public class UserController {
 
     @RequestMapping("/exportUsers")
     public HttpRespMsg exportUsers(Integer containInvalid) {
-        return userService.exportUsers(containInvalid,request);
+            HttpRespMsg httpRespMsg = new HttpRespMsg();
+            try {
+                String userId = request.getHeader("Token");
+                User user = userService.getById(userId);
+                TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
+                WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+                CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
+                List<User> userList = userService.list(new LambdaQueryWrapper<User>().select(User::getId, User::getName, User::getCorpwxUserid).eq(User::getCompanyId, user.getCompanyId()));
+                List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", user.getCompanyId()));
+                //查看当前用户是否有人员成本的查看权限
+                boolean canViewCost = sysFunctionService.hasPriviledge(user.getRoleId(), "人员成本管理");
+                System.out.println("canViewCost=========="+canViewCost);
+                //准备导出
+                HSSFWorkbook workbook = new HSSFWorkbook();
+                //HSSFSheet sheet = workbook.createSheet("全部员工列表");
+                HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.allPeopleList"));
+                //创建表头
+                HSSFRow headRow = sheet.createRow(0);
+                //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
+                sheet.setColumnWidth(0, 5 * 256);
+                sheet.setColumnWidth(1, 10 * 256);
+                sheet.setColumnWidth(2, 20 * 256);
+                sheet.setColumnWidth(3, 20 * 256);
+                sheet.setColumnWidth(4, 20 * 256);
+                sheet.setColumnWidth(5, 10 * 256);
+
+                sheet.setColumnWidth(6, 10 * 256);
+                sheet.setColumnWidth(7, 10 * 256);
+                sheet.setColumnWidth(8, 10 * 256);
+                //设置为居中加粗
+                HSSFCellStyle headStyle = workbook.createCellStyle();
+                HSSFFont font = workbook.createFont();
+                font.setBold(true);
+                headStyle.setFont(font);
+                //表头
+                HSSFCell headCell;
+                headCell = headRow.createCell(0);
+                //headCell.setCellValue("序号");
+                headCell.setCellValue(MessageUtils.message("entry.serialNo"));
+                headCell.setCellStyle(headStyle);
+                headCell = headRow.createCell(1);
+                //headCell.setCellValue("姓名");
+                headCell.setCellValue(MessageUtils.message("entry.name"));
+                headCell.setCellStyle(headStyle);
+                headCell = headRow.createCell(2);
+                //headCell.setCellValue("角色");
+                headCell.setCellValue(MessageUtils.message("role.role"));
+                headCell.setCellStyle(headStyle);
+                headCell = headRow.createCell(3);
+                //headCell.setCellValue("手机号");
+                headCell.setCellValue(MessageUtils.message("excel.phoneNumber"));
+                headCell.setCellStyle(headStyle);
+                headCell = headRow.createCell(4);
+                //headCell.setCellValue("部门");
+                headCell.setCellValue(MessageUtils.message("excel.department"));
+                headCell.setCellStyle(headStyle);
+                int auditIndex = -1;
+                if(timeType.getReportAuditType() == 5 || timeType.getReportAuditType() == 6){
+                    headCell = headRow.createCell(5);
+                    headCell.setCellValue("直属审核人");
+                    headCell.setCellStyle(headStyle);
+                    auditIndex=0;
+                }
+
+                int minusIndex = -2;
+                if (canViewCost) {
+                    headCell = headRow.createCell(6+auditIndex);
+                    //headCell.setCellValue("月薪");
+                    headCell.setCellValue(MessageUtils.message("excel.MonSalary"));
+                    headCell.setCellStyle(headStyle);
+                    headCell = headRow.createCell(7+auditIndex);
+                    //headCell.setCellValue("时薪");
+                    headCell.setCellValue(MessageUtils.message("excel.hourlyWage"));
+                    headCell.setCellStyle(headStyle);
+                    minusIndex = 0;
+                }
+
+                headCell = headRow.createCell(8+minusIndex+auditIndex);
+                //headCell.setCellValue("证书");
+                headCell.setCellValue(MessageUtils.message("excel.certificate"));
+                headCell.setCellStyle(headStyle);
+                for (int i = 0; i < userCustomList.size(); i++) {
+                    headCell = headRow.createCell(minusIndex+9+i+auditIndex);
+                    headCell.setCellValue(userCustomList.get(i).getName());
+                    headCell.setCellStyle(headStyle);
+                }
+                headCell = headRow.createCell(minusIndex+9+userCustomList.size()+auditIndex);
+                //headCell.setCellValue("状态");
+                headCell.setCellValue(MessageUtils.message("leave.status"));
+                headCell.setCellStyle(headStyle);
+
+                //设置日期格式
+                HSSFCellStyle style = workbook.createCellStyle();
+                style.setDataFormat(HSSFDataFormat.getBuiltinFormat("yy/mm/dd hh:mm"));
+                //新增数据行 并且装填数据
+                int rowNum = 1;
+                QueryWrapper<User> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("company_id", user.getCompanyId());
+                if (containInvalid == 0) {
+                    queryWrapper.eq("is_active", 1);
+                }
+                List<User> data = userMapper.selectList(queryWrapper);
+                List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
+                List<String> collect = data.stream().map(da -> da.getId()).distinct().collect(Collectors.toList());
+                List<UserCert> userCertList=new ArrayList<>();
+                if(collect!=null&&!StringUtils.isEmpty(data)){
+                    userCertList = userCertMapper.selectList(new QueryWrapper<UserCert>().in("user_id", collect));
+                }
+                for (User item : data) {
+                    if (item.getDepartmentId() != 0) {
+                        Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(item.getDepartmentId())).findFirst();
+                        if(first.isPresent()){
+                            Department department =first.get();
+                            item.setDepartmentName(department.getDepartmentName());
+                        }
+                    }
+                    HSSFRow row = sheet.createRow(rowNum);
+                    row.createCell(0).setCellValue(rowNum);
+                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                        row.createCell(1).setCellValue("$userName="+(item.getCorpwxUserid()==null?" ":item.getCorpwxUserid())+"$");
+                    }else {
+                        row.createCell(1).setCellValue(item.getName());
+                    }
+                    row.createCell(2).setCellValue(item.getRoleName());
+                    row.createCell(3).setCellValue(item.getPhone());
+                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                        row.createCell(4).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?" ":item.getCorpwxDeptid())+"$");
+                    }else {
+                        row.createCell(4).setCellValue(item.getDepartmentName());
+                    }
+                    if(timeType.getReportAuditType()==5||timeType.getReportAuditType()==6){
+                        if(item.getSuperiorId()!=null){
+                            Optional<User> first = userList.stream().filter(u ->u.getId().equals(item.getSuperiorId())).findFirst();
+                            if(first.isPresent()){
+                                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                    row.createCell(5).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?" ":first.get().getCorpwxUserid())+"$");
+                                }else {
+                                    row.createCell(5).setCellValue(first.get().getName());
+                                }
+                            }else {
+                                row.createCell(5).setCellValue("");
+                            }
+                        }else {
+                            row.createCell(5).setCellValue("");
+                        }
+
+                    }
+                    if (canViewCost) {
+                        row.createCell(6+auditIndex).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
+                        row.createCell(7+auditIndex).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
+                    }
+                    List<UserCert> certList = userCertList.stream().distinct().filter(uc -> uc.getUserId().equals(item.getId())).collect(Collectors.toList());
+                    if(certList.size()>0){
+                        String s="";
+                        for (int i = 0; i < certList.size(); i++) {
+                            if(i<certList.size()-1){
+                                s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate()+",";
+                            }else {
+                                s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate();
+                            }
+                        }
+                        row.createCell(8+minusIndex+auditIndex).setCellValue(s);
+                    }else {
+                        row.createCell(8+minusIndex+auditIndex).setCellValue("");
+                    }
+                    for (int i = 0; i < userCustomList.size(); i++) {
+                        String value="";
+                        switch (i){
+                            case 0:value=item.getPlate1()==null?"":item.getPlate1();
+                                break;
+                            case 1:value=item.getPlate2()==null?"":item.getPlate2();
+                                break;
+                            case 2:value=item.getPlate3()==null?"":item.getPlate3();
+                                break;
+                            case 3:value=item.getPlate4()==null?"":item.getPlate4();
+                                break;
+                            case 4:value=item.getPlate5()==null?"":item.getPlate5();
+                                break;
+                        }
+                        row.createCell(9+i+minusIndex+auditIndex).setCellValue(value);
+                    }
+                    row.createCell(9+userCustomList.size()+minusIndex+auditIndex).setCellValue(item.getIsActive()==1?MessageUtils.message("excel.normal"):MessageUtils.message("access.deactivated"));
+                    rowNum++;
+                }
+                //生成Excel文件
+                //String fileUrlSuffix = "员工列表" + System.currentTimeMillis() + ".xls";
+                String fileUrlSuffix = MessageUtils.message("excel.peopleList") + System.currentTimeMillis() + ".xls";
+                FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
+                workbook.write(fos);
+                fos.flush();
+                fos.close();
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
+                    String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+            /*if(jobId!=null&&!jobId.equals("")){
+                File file=new File(path + fileUrlSuffix);
+                if(file.exists()){
+                    file.delete();
+                }
+            }*/
+                    int i = 0;
+                    String syncTranslationResult = null;
+                    /**
+                     * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                     * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                     */
+                    while (i < 10) {
+                        Thread.sleep(300);
+                        CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
+                        if (corpwxJobResult != null) {
+                            if (corpwxJobResult.getErrCode() == 0) {
+                                syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
+                                corpwxJobCenter.remove(jobId);
+                            } else {
+                                httpRespMsg.setError(corpwxJobResult.getErrMsg());
+                                return httpRespMsg;
+                            }
+                            break;
+                        }
+                        i++;
+                    }
+                    if (syncTranslationResult != null) {
+                        httpRespMsg.data = syncTranslationResult;
+                    } else {
+                        //httpRespMsg.setError("处理超时...");
+                        httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                    }
+                }else if(dingding!=null&&dingding.getSyncContact()==1){
+                    String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+                    String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
+                    int i = 0;
+                    String syncTranslationResult = null;
+                    /**
+                     * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                     * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                     */
+                    while (i < 10) {
+                        Thread.sleep(300);
+                        Integer status = corpddJobCenter.get(jobId);
+                        if (status != null) {
+                            if (status == 1) {
+                                syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                                corpddJobCenter.remove(jobId);
+                            }
+                            break;
+                        }
+                        i++;
+                    }
+                    if (syncTranslationResult != null) {
+                        httpRespMsg.data = syncTranslationResult;
+                    } else {
+                        //httpRespMsg.setError("处理超时...");
+                        httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                    }
+                }else {
+                    httpRespMsg.data = "/upload/" + fileUrlSuffix;
+                }
+            } catch (NullPointerException e) {
+                e.printStackTrace();
+                //httpRespMsg.setError("验证失败或缺少数据");
+                httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
+                return httpRespMsg;
+            } catch (IOException e) {
+                e.printStackTrace();
+                //httpRespMsg.setError("文件生成错误");
+                httpRespMsg.setError(MessageUtils.message("file.generateError"));
+                return httpRespMsg;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return httpRespMsg;
     }
 
     @RequestMapping("/pushFillReport")
     public HttpRespMsg pushFillReport(String ids, String date,Integer code) {return userService.pushFillReport(ids, request, date,code); }
 
     @RequestMapping("/exportMembList")
-    public HttpRespMsg exportMembList(boolean isFill, String ids, String date) {return userService.exportMembList(isFill, ids, request, date); }
+    public HttpRespMsg exportMembList(boolean isFill, String ids, String date) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        try {
+            String userId = request.getHeader("Token");
+            User user = userMapper.selectById(userId);
+            List<String> strings = ListUtil.convertLongIdsArrayToList(ids);
+            List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+            CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, user.getCompanyId()));
+            List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", strings));
+            userList.forEach(u->{
+                Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(u.getDepartmentId())).findFirst();
+                if (first.isPresent()) {
+                    u.setDepartmentName(first.get().getDepartmentName());
+                }
+            });
+            //准备导出
+            HSSFWorkbook workbook = new HSSFWorkbook();
+            //HSSFSheet sheet = workbook.createSheet("人员列表");
+            HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.perList"));
+            //创建表头
+            HSSFRow headRow = sheet.createRow(0);
+            //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
+            sheet.setColumnWidth(0, 5 * 256);
+            sheet.setColumnWidth(1, 10 * 256);
+            sheet.setColumnWidth(2, 20 * 256);
+            //设置为居中加粗
+            HSSFCellStyle headStyle = workbook.createCellStyle();
+            HSSFFont font = workbook.createFont();
+            font.setBold(true);
+            headStyle.setFont(font);
+            //表头
+            HSSFCell headCell;
+            headCell = headRow.createCell(0);
+            //headCell.setCellValue("序号");
+            headCell.setCellValue(MessageUtils.message("entry.serialNo"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(1);
+            //headCell.setCellValue("姓名");
+            headCell.setCellValue(MessageUtils.message("entry.name"));
+            headCell.setCellStyle(headStyle);
+            headCell = headRow.createCell(2);
+            //headCell.setCellValue("部门");
+            headCell.setCellValue(MessageUtils.message("excel.department"));
+            headCell.setCellStyle(headStyle);
+
+            //新增数据行 并且装填数据
+            int rowNum = 1;
+            for (User item : userList) {
+                HSSFRow row = sheet.createRow(rowNum);
+                row.createCell(0).setCellValue(rowNum);
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    row.createCell(1).setCellValue("$userName="+(item.getCorpwxUserid()==null?"":item.getCorpwxUserid())+"$");
+                    row.createCell(2).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?"":item.getCorpwxDeptid())+"$");
+                }else {
+                    row.createCell(1).setCellValue(item.getName());
+                    row.createCell(2).setCellValue(item.getDepartmentName());
+                }
+                rowNum++;
+            }
+            //生成Excel文件
+            //String fileUrlSuffix = date+(isFill?"已填":"未填")+"人员列表" + System.currentTimeMillis() + ".xls";
+            String fileUrlSuffix = date+(isFill?MessageUtils.message("excel.Filled"):MessageUtils.message("excel.notFilled"))+MessageUtils.message("excel.perList") + System.currentTimeMillis() + ".xls";
+            FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
+            workbook.write(fos);
+            fos.flush();
+            fos.close();
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
+                String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+            /*if(jobId!=null&&!jobId.equals("")){
+                File file=new File(path + fileUrlSuffix);
+                if(file.exists()){
+                    file.delete();
+                }
+            }*/
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
+                    if (corpwxJobResult != null) {
+                        if (corpwxJobResult.getErrCode() == 0) {
+                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
+                            corpwxJobCenter.remove(jobId);
+                        } else {
+                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
+                            return httpRespMsg;
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    httpRespMsg.data = syncTranslationResult;
+                } else {
+                    //httpRespMsg.setError("处理超时...");
+                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                }
+            }else if(dingding!=null&&dingding.getSyncContact()==1){
+                String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+                String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    Integer status = corpddJobCenter.get(jobId);
+                    if (status != null) {
+                        if (status == 1) {
+                            syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                            corpddJobCenter.remove(jobId);
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    httpRespMsg.data = syncTranslationResult;
+                } else {
+                    //httpRespMsg.setError("处理超时...");
+                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
+                }
+            }else {
+                httpRespMsg.data = "/upload/" + fileUrlSuffix;
+            }
+        } catch (NullPointerException e) {
+            //httpRespMsg.setError("验证失败或缺少数据");
+            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
+            return httpRespMsg;
+        } catch (IOException e) {
+            //httpRespMsg.setError("文件生成错误");
+            httpRespMsg.setError(MessageUtils.message("file.generateError"));
+            return httpRespMsg;
+        }catch (Exception e){
+            e.printStackTrace();
+            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
+            return httpRespMsg;
+        }
+        return httpRespMsg;
+    }
 
     @RequestMapping("/getHRList")
     public HttpRespMsg getHRList() {return userService.getHRList(request); }

+ 7 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -3,6 +3,7 @@ package com.management.platform.controller;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.SysRichFunction;
@@ -79,6 +80,8 @@ public class UserCorpwxTimeController {
     WxCorpInfoService wxCorpInfoService;
     @Resource
     UserCorpwxTimeService userCorpwxTimeService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @RequestMapping("/getMyDeptMembsData")
     public HttpRespMsg getMyDeptMembsData(String startDate, String endDate) {
@@ -245,6 +248,7 @@ public class UserCorpwxTimeController {
         User user = userMapper.selectById(token);
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         Integer manageDeptId = user.getManageDeptId();
 
         HttpRespMsg ret = getMyDeptMembsData(startDate, endDate);
@@ -320,7 +324,7 @@ public class UserCorpwxTimeController {
         }
         //fileName += "_人员工时统计模板"+startDate+"至"+endDate;
         fileName += MessageUtils.message("fileName.workHour",startDate,endDate);
-        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, allData, path);
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, allData, path);
     }
 
     //导出填报工时在考勤工时的占比
@@ -330,6 +334,7 @@ public class UserCorpwxTimeController {
         User user = userMapper.selectById(token);
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Integer manageDeptId = user.getManageDeptId();
 
         List<Map> list = new ArrayList<Map>();
@@ -400,7 +405,7 @@ public class UserCorpwxTimeController {
         //fileName += "_人员工时统计模板"+startDate+"至"+endDate;
         fileName = ymonth + fileName;
         fileName += "项目工时占比_" + System.currentTimeMillis();
-        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, allData, path);
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, allData, path);
     }
     @RequestMapping("/getPunchRecordBySelf")
     public HttpRespMsg getUserPunchRecord(String date, String userId){

+ 5 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserYearleaveSettingController.java

@@ -17,6 +17,7 @@ import com.management.platform.service.impl.ProjectServiceImpl;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.ListUtil;
 import com.management.platform.util.MessageUtils;
+import org.hibernate.validator.constraints.pl.REGON;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -68,6 +69,8 @@ public class UserYearleaveSettingController {
     private WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
     private DepartmentService departmentService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -218,6 +221,7 @@ public class UserYearleaveSettingController {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         Integer companyId = ddLeaveQtVo.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id",companyId));
         List<String> headList = new ArrayList<>();
         List<List<String>> allList = new ArrayList<>();
         HttpRespMsg dingDingLeaveQt = getDingDingLeaveQt(ddLeaveQtVo, 1);
@@ -284,7 +288,7 @@ public class UserYearleaveSettingController {
         //String fileName = "假期剩余表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.leaveRemaining")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList,path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList,path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -824,8 +824,8 @@ public class WeiXinCorpController {
                     corpwxJobResultMapper.insert(result);
                     ExcelExportServiceImpl.corpwxJobCenter.put(jobId, result);
                     ReportServiceImpl.corpwxJobCenter.put(jobId, result);
-                    UserServiceImpl.corpwxJobCenter.put(jobId, result);
-                    TaskServiceImpl.corpwxJobCenter.put(jobId, result);
+                    UserController.corpwxJobCenter.put(jobId, result);
+                    TaskController.corpwxJobCenter.put(jobId, result);
                 } else if ("auto_activate".equals(infoType)) {
                     //被邀请的同事自动激活使用
                     //{"xml":{"Scene":1,"InfoType":"auto_activate",

+ 8 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/TaskMapper.java

@@ -53,4 +53,12 @@ public interface TaskMapper extends BaseMapper<Task> {
     void updateEndDate(Integer id);
     @Update("update task set finish_date =null where id=#{id}")
     void updateFinishDate(Integer id);
+
+    List<Map<String,Object>>  userTaskCompleteDetail(Integer pageStart, Integer pageSize, String startDate, String endDate, String userId, Integer deptId,@Param("list") List<Integer> deptIds, Integer companyId);
+
+    Integer userTaskCompleteDetailCount(String startDate, String endDate, String userId, Integer deptId,@Param("list") List<Integer> deptIds, Integer companyId);
+
+    List<Map<String, Object>> getTaskByUserId(String startDate, String endDate, String userId, Integer pageStart, Integer pageSize);
+
+    Integer getTaskByUserIdCount(String startDate, String endDate, String userId);
 }

+ 6 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ExcelExportService.java

@@ -1,5 +1,6 @@
 package com.management.platform.service;
 
+import com.management.platform.entity.CompanyDingding;
 import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.util.HttpRespMsg;
 
@@ -8,11 +9,10 @@ import java.util.Map;
 
 public interface ExcelExportService {
     public void testRead(String jobId);
-    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception;
-    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception;
-    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
-    public HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo,String title) throws Exception;
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception;
+    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception;
+    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
+    public HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title) throws Exception;
     void testAdd(String jobId);
-
-    HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, String fileName, List<List<String>> allList, List<Map> mapList, String path) throws Exception;
+    HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String fileName, List<List<String>> allList, List<Map> mapList, String path) throws Exception;
 }

+ 6 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/TaskService.java

@@ -35,8 +35,6 @@ public interface TaskService extends IService<Task> {
     HttpRespMsg getTaskTimeCompare(Integer projectId,Integer deptId);
     HttpRespMsg exportTaskTimeCompare(Integer projectId,Integer deptId);
 
-    HttpRespMsg exportTask(Integer projectId, Integer taskType);
-
     HttpRespMsg importTask(Integer isMultiProject, Integer projectId, Integer groupId, MultipartFile file, HttpServletRequest request) throws Exception;
 
     HttpRespMsg delete(TaskGroup item);
@@ -50,4 +48,10 @@ public interface TaskService extends IService<Task> {
     public void notifyMileStoneFinish(Integer companyId, List<Task> taskList);
 
     HttpRespMsg getExecutorPlanHour(Integer projectId);
+
+    HttpRespMsg userTaskCompleteDetail(Integer pageIndex, Integer pageSize, String startDate, String endDate, String userId, Integer deptId);
+
+    HttpRespMsg exportUserTaskCompleteDetail(String startDate, String endDate, String userId, Integer deptId);
+
+    HttpRespMsg getTaskByUserId(String startDate, String endDate, String userId, Integer pageIndex, Integer pageSize);
 }

+ 0 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserService.java

@@ -54,14 +54,11 @@ public interface UserService extends IService<User> {
 
     HttpRespMsg bindWeiXin2(String code, String userId, Integer state);
 
-    HttpRespMsg exportUsers(Integer containInvalid, HttpServletRequest request);
 
     HttpRespMsg sendVcode(String mobile);
 
     HttpRespMsg pushFillReport(String ids, HttpServletRequest request, String date,Integer code);
 
-    HttpRespMsg exportMembList(boolean isFill, String ids, HttpServletRequest request, String date);
-
     HttpRespMsg getHRList(HttpServletRequest request);
 
     HttpRespMsg changeSysManager(String toUserId, Integer myRoleId, HttpServletRequest request);

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -71,6 +71,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     private ContractLogMapper contractLogMapper;
     @Resource
     private InformationMapper informationMapper;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
     @Value(value = "${upload.path}")
     private String path;
 
@@ -226,6 +228,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             return httpRespMsg;
         }
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate);
         HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
         List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
@@ -289,7 +292,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         }
         String fileName = MessageUtils.message("contract.export")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 8 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -75,6 +75,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
     private ExcelExportService excelExportService;
     @Resource
     private WxCorpInfoService wxCorpInfoService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Value("${corpId}")
     private String corpId;
@@ -670,6 +672,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -908,7 +911,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //String fileName = "人员成本统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.costStatistics",System.currentTimeMillis());
             try {
-                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -1174,6 +1177,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             HttpRespMsg msg = getUserCustomDataStatistic(startDate, endDate, null, request);
             Map<String, Object> map = (Map<String, Object>) msg.data;
             List<HashMap> itemList = (List<HashMap>) map.get("list");
@@ -1215,7 +1219,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //String fileName = timeType.getCustomDataName() + "统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.statistics",timeType.getCustomDataName(),System.currentTimeMillis());
             try {
-                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, allList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, allList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -1359,6 +1363,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         try {
             Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             HttpRespMsg msg = getDepartmentStatistics(null, startDate, endDate, request);
             Map<String,Object> mapData = (Map<String, Object>) msg.data;
             List<DepartmentMasterVO> costList = (List<DepartmentMasterVO>) mapData.get("costList");
@@ -1407,7 +1412,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //String fileName = "部门工时统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.depHours",System.currentTimeMillis());
             try {
-                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }

+ 14 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DingDingServiceImpl.java

@@ -16,6 +16,8 @@ import com.dingtalk.api.DingTalkClient;
 import com.dingtalk.api.request.*;
 import com.dingtalk.api.response.*;
 import com.management.platform.constant.Constant;
+import com.management.platform.controller.TaskController;
+import com.management.platform.controller.UserController;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.UserVO;
 import com.management.platform.mapper.*;
@@ -1364,6 +1366,18 @@ public class DingDingServiceImpl implements DingDingService {
                                         }
                                     }
                                 }
+                            }else if(139 == bizType){
+                                JSONObject actionBizData = JSONObject.parseObject(bizItem.getString("biz_data"));
+                                String syncAction = actionBizData.getString("syncAction");
+                                if("transfer_contact_id_job_result".equals(syncAction)){
+                                    bizLogger.info("异步转译通讯录id任务完成通知");
+                                    String jobId = actionBizData.getString("jobId");
+                                    Integer status = actionBizData.getInteger("status");
+                                    ExcelExportServiceImpl.corpddJobCenter.put(jobId, status);
+                                    ReportServiceImpl.corpddJobCenter.put(jobId, status);
+                                    UserController.corpddJobCenter.put(jobId, status);
+                                    TaskController.corpddJobCenter.put(jobId, status);
+                                }
                             }
                         }
                     }

+ 168 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -1,8 +1,12 @@
 package com.management.platform.service.impl;
 
+import com.management.platform.entity.CompanyDingding;
 import com.management.platform.entity.CorpwxJobResult;
+import com.management.platform.entity.User;
 import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.mapper.CorpwxJobResultMapper;
+import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.DingDingService;
 import com.management.platform.service.ExcelExportService;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.util.ExcelUtil;
@@ -19,6 +23,7 @@ import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.time.LocalDateTime;
@@ -30,8 +35,15 @@ import java.util.Map;
 public class ExcelExportServiceImpl implements ExcelExportService {
     //用于控制线程锁
     public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
+    public static HashMap<String, Integer> corpddJobCenter = new HashMap();
     @Resource
     private WxCorpInfoService wxCorpInfoService;
+    @Resource
+    private DingDingService dingDingService;
+    @Resource
+    private HttpServletRequest request;
+    @Resource
+    private UserMapper userMapper;
 
     @Resource
     private CorpwxJobResultMapper corpwxJobResultMapper;
@@ -64,7 +76,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
         }
     }
 
-    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -119,13 +131,52 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
+        }else if(dingding != null && dingding.getSyncContact() == 1){
+            User user = userMapper.selectById(request.getHeader("token"));
+            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
+            System.out.println("上传待转译文件到钉钉, jobId==" + jobId);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            long t = System.currentTimeMillis();
+            while (i < 30) {
+                if (i < 10) {
+                    Thread.sleep(300);
+                } else if (i < 20){
+                    Thread.sleep(1000);
+                } else {
+                    Thread.sleep(3000);
+                }
+                System.out.println("i=="+i+", "+LocalDateTime.now());
+                Integer status = corpddJobCenter.get(jobId);
+                if (status != null) {
+                    if (status == 1) {
+                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                        corpddJobCenter.remove(jobId);
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                long t2 = System.currentTimeMillis();
+                System.out.println("钉钉转译文件后地址是:"+syncTranslationResult+",耗时:" + (t2 - t) + "ms");
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                //httpRespMsg.setError("处理超时...");
+                httpRespMsg.setError(MessageUtils.message("request.outTime"));
+            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, List<Map> mapList, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, List<Map> mapList, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -167,13 +218,41 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
+        }else if(dingding != null && dingding.getSyncContact() == 1){
+            User user = userMapper.selectById(request.getHeader("token"));
+            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            while (i < 10) {
+                Thread.sleep(300);
+                Integer status = corpddJobCenter.get(jobId);
+                if (status != null) {
+                    if (status == 1) {
+                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                        corpddJobCenter.remove(jobId);
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                //httpRespMsg.setError("处理超时...");
+                httpRespMsg.setError(MessageUtils.message("request.outTime"));
+            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String resp = ExcelUtil.exportGeneralExcelByTitleAndList2(title, list, downloadPath);
         if (title.contains("/")) {
@@ -215,6 +294,34 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
+        }else if(dingding != null && dingding.getSyncContact() == 1){
+            User user = userMapper.selectById(request.getHeader("token"));
+            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            while (i < 10) {
+                Thread.sleep(300);
+                Integer status = corpddJobCenter.get(jobId);
+                if (status != null) {
+                    if (status == 1) {
+                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                        corpddJobCenter.remove(jobId);
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                //httpRespMsg.setError("处理超时...");
+                httpRespMsg.setError(MessageUtils.message("request.outTime"));
+            }
         }else {
             httpRespMsg.data = resp;
         }
@@ -222,7 +329,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
     }
 
 
-    public  HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception {
+    public  HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String resp = ExcelUtil.exportMultiSheetGeneralExcelByTitleAndList(title,multiSheetList, downloadPath,sheetsName);
         if (title.contains("/")) {
@@ -264,13 +371,41 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
+        }else if(dingding != null && dingding.getSyncContact() == 1){
+            User user = userMapper.selectById(request.getHeader("token"));
+            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            while (i < 10) {
+                Thread.sleep(300);
+                Integer status = corpddJobCenter.get(jobId);
+                if (status != null) {
+                    if (status == 1) {
+                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                        corpddJobCenter.remove(jobId);
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                //httpRespMsg.setError("处理超时...");
+                httpRespMsg.setError(MessageUtils.message("request.outTime"));
+            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public  HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo,String title) throws Exception {
+    public  HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -311,6 +446,34 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
+        }else if(dingding != null && dingding.getSyncContact() == 1){
+            User user = userMapper.selectById(request.getHeader("token"));
+            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
+            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            while (i < 10) {
+                Thread.sleep(300);
+                Integer status = corpddJobCenter.get(jobId);
+                if (status != null) {
+                    if (status == 1) {
+                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
+                        corpddJobCenter.remove(jobId);
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                //httpRespMsg.setError("处理超时...");
+                httpRespMsg.setError(MessageUtils.message("request.outTime"));
+            }
         }
         return httpRespMsg;
     }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -95,6 +95,8 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
 
     @Resource
     private ExpenseAuditSettingMapper expenseAuditSettingMapper;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
 
     @Override
@@ -1097,6 +1099,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
     @Override
     public HttpRespMsg exportList(ExpenseSheet sheet,Integer projectId, String startDate, String endDate) {
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", sheet.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", sheet.getCompanyId()));
         QueryWrapper<ExpenseSheet> queryWrapper = new QueryWrapper<ExpenseSheet>();
         queryWrapper.eq("company_id", sheet.getCompanyId()).orderByDesc("id");
         List<ExpenseMainType> mainTypes = expenseMainTypeService.list(new QueryWrapper<ExpenseMainType>().eq("company_id", sheet.getCompanyId()));
@@ -1238,7 +1241,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
         //String fileName = "费用报销单据列表"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.expense")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelForExpense(wxCorpInfo,fileName , allList,mapList, path);
+            return excelExportService.exportGeneralExcelForExpense(wxCorpInfo,dingding,fileName , allList,mapList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 6 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -86,6 +86,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
     UserCustomMapper userCustomMapper;
     @Resource
     WxCorpInfoService wxCorpInfoService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Resource
     private ProjectMapper projectMapper;
@@ -625,6 +627,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             TimeType timeType = timeTypeMapper.selectById(companyId);
             boolean isSecret = timeType.getIsSecretSalary()==1?true:false;
             final List<FinanceTblcuscol> cusColList = financeTblcuscolMapper.selectList(new QueryWrapper<FinanceTblcuscol>().eq("company_id", companyId));
@@ -1518,9 +1521,9 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                             multiSheetDataList[i].add(newRow);
                         }
                     }
-                    return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
+                    return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
                 } else {
-                    return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+                    return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
                 }
             } catch (Exception e) {
                 e.printStackTrace();
@@ -2052,7 +2055,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             String fileName = MessageUtils.message("fileName.perSal")+company.getCompanyName()+yearMonth+"_"+System.currentTimeMillis();
             try {
                 //不需要转译
-                return excelExportService.exportGeneralExcelByTitleAndList(null,fileName , allList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(null,null,fileName , allList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }

+ 5 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java

@@ -2,6 +2,7 @@ package com.management.platform.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -75,6 +76,8 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
     WxCorpInfoService wxCorpInfoService;
     @Resource
     InformationMapper informationMapper;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -526,6 +529,7 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         Integer companyId = userMapper.selectById(userId).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId).select("id","name","corpwx_userid"));
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
@@ -677,7 +681,7 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
         //String fileName = "请假信息_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.leaveInfo")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectApprovalServiceImpl.java

@@ -96,6 +96,8 @@ public class ProjectApprovalServiceImpl extends ServiceImpl<ProjectApprovalMappe
     private WxCorpTemplateService wxCorpTemplateService;
     @Resource
     private ReportService reportService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
     @Value(value = "${upload.path}")
     private String path;
 
@@ -725,6 +727,7 @@ public class ProjectApprovalServiceImpl extends ServiceImpl<ProjectApprovalMappe
         String[] arr=new String[]{"正常","紧急","重要","重要且紧急","低风险","中风险","高风险"};
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         titleList.add("项目编号");
         titleList.add("项目名称");
         titleList.add("项目分类");
@@ -754,7 +757,7 @@ public class ProjectApprovalServiceImpl extends ServiceImpl<ProjectApprovalMappe
         }
         String title="立项导出_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,title,dataList,path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,title,dataList,path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 63 - 31
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -240,6 +240,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     private SapProjectServiceService sapProjectServiceService;
     @Resource
     private HolidaySettingService holidaySettingService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -1656,6 +1658,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId = targetUser.getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
             Map<String, Object> resultMap = new HashMap<>();
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -2174,7 +2177,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 fileName = MessageUtils.message("fileName.projectCost")+System.currentTimeMillis();
             }
 
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
         } catch (NullPointerException e) {
             e.printStackTrace();
             //httpRespMsg.setError("验证失败");
@@ -2743,6 +2746,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         //判断用户的角色,如果是管理员和负责人,查看全部的。如果是普通员工,只能是看到参与的项目
         QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -2792,7 +2796,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectReport")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -2856,6 +2860,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
         QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -2945,7 +2950,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目任务报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectTaskReport")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -2959,6 +2964,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
 
 
         //该公司下的allday
@@ -3055,7 +3061,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目任务报表_"+System.currentTimeMillis();
         String fileName = "预估工时表"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
             httpRespMsg.setError(e.getMessage());
@@ -3144,6 +3150,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
         List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
@@ -3209,7 +3216,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目成本报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectCostReport")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -3297,6 +3304,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         Integer companyId = user.getCompanyId();
         Company company = companyMapper.selectById(companyId);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
         List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
@@ -3397,7 +3405,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目收支平衡报表(利润表)_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.profitSta")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -3412,6 +3420,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         List<CustomerProject> projectList = projectMapper.getCustomerProjectInAndOut(companyId, null, null,null,null);
         List<List<String>> exportList = new ArrayList<>();
         //String[] titles = {"客户名称", "相关项目", "合同金额", "人工成本", "一般费用", "差旅费用","外包费用", "总费用", "利润", "利润率"};
@@ -3470,7 +3479,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "客户项目利润报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.cusPro")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -4014,7 +4023,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目阶段工时报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.ProPeriodWork")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList2(null,fileName, dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList2(null,null,fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -4094,6 +4103,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             String token = request.getHeader("TOKEN");
             User user = userMapper.selectById(token);
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id",user.getCompanyId()));
             TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全公司加班情况");
             List<SysRichFunction> functionDeptList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责部门加班情况");
@@ -4345,7 +4355,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             sheetNames[1] = MessageUtils.message("Statistics.ByPro");
             sheetNames[2] = MessageUtils.message("Statistics.ByPeople");
             try {
-                return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,fileName , totalList, path, sheetNames);
+                return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , totalList, path, sheetNames);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -6394,6 +6404,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<String> nameList= (List<String>) resultMap.get("nameList");
         Company company = companyMapper.selectById(user.getCompanyId());
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", company.getId()));
         List<ProjectCustom> projectCustomList = projectCustomMapper.selectList(new QueryWrapper<ProjectCustom>().eq("company_id", company.getId()));
         List<ProjectCustom> customList = projectCustomList.stream().filter(pl -> pl.getCustomType() != 1).collect(Collectors.toList());
         TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
@@ -6695,7 +6706,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目导出_"+company.getCompanyName()+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.proExport")+company.getCompanyName()+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList,path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList,path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -6707,6 +6718,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         //获取全部用户
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").eq("company_id", user.getCompanyId()));
         String  projectCategorySub=null;
@@ -6799,7 +6811,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目分组_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.proGroup")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -6845,6 +6857,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
             TimeType timeType = timeTypeMapper.selectById(companyId);
             List<String> headList = new ArrayList<String>();
@@ -6936,7 +6949,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //String fileName = timeType.getCustomDataName() + "统计_"+System.currentTimeMillis();
             String fileName = timeType.getCustomDataName() + MessageUtils.message("Statistics.tj")+"_"+System.currentTimeMillis();
             try {
-                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -7243,6 +7256,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         boolean viewAll = sysFunctionService.hasPriviledge(user.getRoleId(), "全部工时成本预警表");
         boolean incharger = sysFunctionService.hasPriviledge(user.getRoleId(), "负责项目工时成本预警表");
         List<HashMap> projectList=new ArrayList();
@@ -7348,7 +7362,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "工时成本预警表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.hourCostAlert")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, exportList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -7558,6 +7572,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             Map<String, Object> resultMap = new HashMap<>();
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -7784,7 +7799,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //String fileName = "项目分类工时成本统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.proClassLaborCost")+System.currentTimeMillis();
             try {
-                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+                return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -8022,6 +8037,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         HttpRespMsg userWorkingTimeList = getUserWorkingTimeList(userId,projectId,startDate, endDate, null,null,request,departmentId);
         HashMap result = (HashMap) userWorkingTimeList.data;
         List<Map<String, Object>> resultList = (List<Map<String, Object>>) result.get("result");
@@ -8090,7 +8106,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "人员工时分配统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perHoursAllSta")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -8450,6 +8466,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
         HashMap map= (HashMap) msg.data;
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
@@ -8479,7 +8496,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "人员填报及时率统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.timePerFill")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -8550,6 +8567,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg = getWaitingReviewList(request, stateKey, userId, null, null,startDate,endDate,null);
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
         HashMap resultmap= (HashMap) msg.data;
         List<Map<String,Object>> list= (List<Map<String, Object>>) resultmap.get("result");
@@ -8584,7 +8602,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "人员待审核统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perReviewed")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -8704,6 +8722,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HttpRespMsg httpRespMsg = getUserWorkingTimeStatic(startDate, endDate, null, null, request, userId, departmentId);
         Map<String,Object> data = (Map<String, Object>) httpRespMsg.data;
         List<Map<String,Object>> resultList= (List<Map<String, Object>>) data.get("result");
@@ -8742,7 +8761,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "人员工时统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perHoursSta")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -9245,6 +9264,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg projectBaseCost = getProjectBaseCost(null, request, null, null);
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HashMap map= (HashMap) projectBaseCost.data;
         List<Project> resultProjectList= (List<Project>) map.get("result");
         List<List<String>> dataList=new ArrayList<>();
@@ -9276,7 +9296,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "项目成本基线表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("Statistics.ProjectCostBase")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -9348,6 +9368,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         User targetUser = userMapper.selectById(request.getHeader("token"));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", targetUser.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", targetUser.getCompanyId()));
         List<SysRichFunction> functionTimeList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看工时统计");
         List<SysRichFunction> functionCostList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看成本统计");
         HttpRespMsg msg = getTimeCostByUserCustom(startDate, endDate, null, customId, request, fieldName);
@@ -9381,7 +9402,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = userCustom.getName()+"工时成本统计_"+System.currentTimeMillis();
         String fileName = userCustom.getName()+MessageUtils.message("fileName.hourCost")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -10180,6 +10201,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         LocalDate time = LocalDate.parse(month, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HttpRespMsg httpRespMsg = getEmpMonthHours(null, null,month,departmentId,userId,whether,request);
         Map<String,Object> data = (Map<String, Object>) httpRespMsg.data;
         List<Map<String,Object>> resultList= (List<Map<String, Object>>) data.get("result");
@@ -10226,7 +10248,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "人员"+time.getMonthValue()+"月度工时表"+System.currentTimeMillis();
         String fileName = MessageUtils.message("entry.personnel") +time.getMonthValue()+MessageUtils.message("fileName.monthWork")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -10369,6 +10391,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         String token = request.getHeader("token");
         User user = userMapper.selectById(token);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         HttpRespMsg httpRespMsg = deptPartInProjects(null, null, month, departmentId, request);
         Map<String, Object> data = (Map<String, Object>) (Map<String, Object>) httpRespMsg.data;
         List<Map<String, Object>> resultList = (List<Map<String, Object>>) data.get("resultList");
@@ -10404,7 +10427,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = "部门参与项目情况表"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.deptJoinPro")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -10418,6 +10441,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         String startDate=null;
         String endDate=null;
         LocalDate date1;
@@ -10531,7 +10555,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //String fileName = year+"人员填报及时率统计_"+System.currentTimeMillis();
         String fileName = year+"_"+quarter+MessageUtils.message("fileName.quarter")+MessageUtils.message("fileName.timePerFill")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -11154,6 +11178,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             Map<String, Object> resultMap = new HashMap<>();
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -11321,7 +11346,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //生成excel文件导出
             //String fileName = "维度成本工时统计_"+System.currentTimeMillis();
             String fileName = timeType.getCustomDegreeName() + MessageUtils.message("fileName.degreeCost")+System.currentTimeMillis();
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
         } catch (NullPointerException e) {
             e.printStackTrace();
             //httpRespMsg.setError("验证失败");
@@ -11472,6 +11497,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         List<UserCustom> userCustoms = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", user.getCompanyId()).orderByAsc("id"));
         String customName = "";
         if (userCustoms.size() != 0){
@@ -11605,7 +11631,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         String fileName = "FTE报表"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -12190,6 +12216,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<LaborHourRateVo> resultList= (List<LaborHourRateVo>) msgData.getData();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Company company = companyMapper.selectById(companyId);
         //1.创建一个workbook,对应一个excel文件
         SXSSFWorkbook workBook = new SXSSFWorkbook();
@@ -12352,7 +12379,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
             try {
-                return excelExportService.exportTranForwx(wxCorpInfo, title);
+                return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -12489,6 +12516,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HttpRespMsg respMsg = getMembProjectCateRatio(startDate, endDate,departmentId,subUserCustomName, onlyShowWarning);
         Map<String,Object> resultMap= (Map<String, Object>) respMsg.getData();
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) resultMap.get("userList");
@@ -12530,7 +12558,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         String title= "项目分类工时占比表_"+System.currentTimeMillis();
         String fileName= title+".xlsx";
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,dataList,path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -12634,6 +12662,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Company company = companyMapper.selectById(companyId);
         //1.创建一个workbook,对应一个excel文件
         SXSSFWorkbook workBook = new SXSSFWorkbook();
@@ -12808,7 +12837,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
 
             try {
-                return excelExportService.exportTranForwx(wxCorpInfo, title);
+                return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -13098,6 +13127,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Company company = companyMapper.selectById(companyId);
         //1.创建一个workbook,对应一个excel文件
         SXSSFWorkbook workBook = new SXSSFWorkbook();
@@ -13293,7 +13323,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
 
             try {
-                return excelExportService.exportTranForwx(wxCorpInfo, title);
+                return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
             } catch (Exception e) {
                 e.printStackTrace();
             }
@@ -13398,6 +13428,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         percentFormat.setMaximumFractionDigits(2);
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HttpRespMsg resultMsg = projectExpendProcessList(startDate,endDate,projectId,categoryId,userId,null,null);
         Map<String, Object> msgData = (Map<String, Object>) resultMsg.getData();
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
@@ -13468,7 +13499,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         String fileName = "项目耗用进度表_"+System.currentTimeMillis();
         try {
-           return   excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+           return   excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -13547,6 +13578,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) msgData.get("record");
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Company company = companyMapper.selectById(companyId);
         //1.创建一个workbook,对应一个excel文件
         SXSSFWorkbook workBook = new SXSSFWorkbook();
@@ -13736,7 +13768,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
 
             try {
-                return excelExportService.exportTranForwx(wxCorpInfo, title);
+                return excelExportService.exportTranForwx(wxCorpInfo,dingding, title);
             } catch (Exception e) {
                 e.printStackTrace();
             }

+ 6 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProviderInfoServiceImpl.java

@@ -2,9 +2,8 @@ package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.entity.ProviderInfo;
-import com.management.platform.entity.User;
-import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.CompanyDingdingMapper;
 import com.management.platform.mapper.ProviderInfoMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.mapper.WxCorpInfoMapper;
@@ -50,6 +49,8 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
     WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
     ExcelExportService excelExportService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
     @Value(value = "${upload.path}")
     String path;
     @Override
@@ -166,6 +167,7 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
     public HttpRespMsg exportData(HttpServletRequest request) {
         User user = userMapper.selectById(request.getHeader("token"));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         List<List<String>> dataList=new ArrayList<>();
         //String[] titleString=new String[]{"供应商编号","供应商名称","分类","联系人","联系电话","邮箱","地址","备注"};
         String[] titleString=new String[]{MessageUtils.message("excel.supplierNo"),MessageUtils.message("excel.supplierName"),MessageUtils.message("excel.classification"),MessageUtils.message("excel.contacts"),MessageUtils.message("excel.phone"),MessageUtils.message("excel.email"),MessageUtils.message("excel.address"),MessageUtils.message("excel.remarks")};
@@ -188,7 +190,7 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
         //String fileName = "供应商统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.supStat")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 6 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportExtraDegreeServiceImpl.java

@@ -2,14 +2,12 @@ package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.entity.ReportExtraDegree;
-import com.management.platform.entity.TimeType;
-import com.management.platform.entity.User;
-import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.entity.*;
 import com.management.platform.mapper.ReportExtraDegreeMapper;
 import com.management.platform.mapper.TimeTypeMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.mapper.WxCorpInfoMapper;
+import com.management.platform.service.CompanyDingdingService;
 import com.management.platform.service.ExcelExportService;
 import com.management.platform.service.ReportExtraDegreeService;
 import com.management.platform.util.ExcelUtil;
@@ -57,6 +55,8 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
     WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
     ExcelExportService excelExportService;
+    @Resource
+    private CompanyDingdingService companyDingdingService;
     @Override
     public HttpRespMsg importData(HttpServletRequest request, MultipartFile multipartFile) {
         HttpRespMsg msg=new HttpRespMsg();
@@ -161,6 +161,7 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         List<ReportExtraDegree> reportExtraDegreeList = reportExtraDegreeMapper.selectList(new QueryWrapper<ReportExtraDegree>().eq("company_id", user.getCompanyId()));
         TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
         List<String> titleList=new ArrayList<>();
@@ -175,7 +176,7 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
         //生成excel文件导出
         String fileName = timeType.getCustomDegreeName()+"_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 14 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -13,6 +13,7 @@ import com.management.platform.service.*;
 import com.management.platform.util.*;
 import com.management.platform.webservice.po.*;
 import com.management.platform.webservice.po.SapPeriod;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import lombok.SneakyThrows;
 import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
 import me.chanjar.weixin.mp.api.WxMpService;
@@ -74,6 +75,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     private final static Executor executor = Executors.newFixedThreadPool(3);//启用多线程
     //用于控制线程锁
     public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
+    public static HashMap<String, Integer> corpddJobCenter=new HashMap<>();
     @Value("${wx.template_report_pass}")
     public String TEMPLATE_REPORT_PASS;
     @Value("${wx.template_report_reject}")
@@ -4496,6 +4498,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg msg = getUserDailyWorkTime(request, startDate, endDate);
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         //String[] weekDayCHN = {"周一","周二","周三","周四","周五","周六","周日"};
         String[] weekDayCHN = {MessageUtils.message("week.Monday"),MessageUtils.message("week.Tuesday"),MessageUtils.message("week.Wednesday"),MessageUtils.message("week.Thursday"),MessageUtils.message("week.Friday"),MessageUtils.message("week.Saturday"),MessageUtils.message("week.Sunday")};
         HashMap map = (HashMap) msg.data;
@@ -4554,7 +4557,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         //String fileName = "人员每日工时统计_"+startDate+"至"+endDate+"_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.dailyManHour",startDate,endDate)+"_"+System.currentTimeMillis();
         try {
-             return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+             return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -5247,6 +5250,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             Integer companyId = company.getId();
             List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
             boolean needCorpWxTranslate = (wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1);
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
             List<List<String>> dataList=new ArrayList<>();
@@ -5821,7 +5825,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }
             //生成Excel文件
             String fileUrlSuffix = (startDate==null?"":(startDate+MessageUtils.message("leave.to")+endDate))+MessageUtils.message("excel.workReport") + System.currentTimeMillis();
-            httpRespMsg = excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileUrlSuffix,dataList,path);
+            httpRespMsg = excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileUrlSuffix,dataList,path);
         } catch (NullPointerException e) {
             //httpRespMsg.setError("验证失败或缺少数据");
             httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
@@ -6240,7 +6244,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg msg = getNoReportUserList(request, startDate, endDate,noReportDeptId);
         String token = request.getHeader("TOKEN");
         TimeType timeType = timeTypeMapper.selectById(userMapper.selectById(token).getCompanyId());
-        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", userMapper.selectById(token).getCompanyId()));
+        Integer companyId = userMapper.selectById(token).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         //String[] weekDayCHN = {"周一","周二","周三","周四","周五","周六","周日"};
         String[] weekDayCHN = {MessageUtils.message("week.Monday"),MessageUtils.message("week.Tuesday"),MessageUtils.message("week.Wednesday"),MessageUtils.message("week.Thursday"),MessageUtils.message("week.Friday"),MessageUtils.message("week.Saturday"),MessageUtils.message("week.Sunday")};
         List<UserDailyWorkItem> dailyWorkItems = (List<UserDailyWorkItem>) msg.data;
@@ -6283,7 +6289,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         //String fileName = "未填人员统计_"+startDate+"至"+endDate+"_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perNoFill")+startDate+MessageUtils.message("leave.to")+endDate+"_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -8704,6 +8710,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
 
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         DateTimeFormatter dtf=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         List<LocalDate> dates = getDays(LocalDate.parse(startDate, dtf), LocalDate.parse(endDate, dtf));
         List<UserCustom> userCustomList = userCustomMapper.selectList(new LambdaQueryWrapper<UserCustom>().eq(UserCustom::getCompanyId, companyId));
@@ -8775,7 +8782,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         String fileName = "分类工时明细表"+"_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding, fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -9005,6 +9012,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg timeReminder = getUserDailyWorkTimeReminder(request, startDate, endDate);
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         Map<String, Object> data = (Map<String, Object>) timeReminder.getData();
         List<Map<String, Object>> mapList = (List<Map<String, Object>>) data.get("list");
         List<List<String>> dataList=new ArrayList<>();
@@ -9032,6 +9040,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             dataList.add(item);
         }
         String fileName="工时异常表"+System.currentTimeMillis();
-        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,dataList,path);
     }
 }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SimpleReportServiceImpl.java

@@ -71,6 +71,8 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
     UserMapper userMapper;
     @Resource
     WxCorpInfoMapper wxCorpInfoMapper;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
     @Value(value = "${upload.path}")
     private String path;
 
@@ -396,6 +398,7 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
     public HttpRespMsg exportData(String yearMonth, Integer companyId, String type, HttpServletRequest request) {
         HttpRespMsg timeCost = getTimeCost(yearMonth, companyId, type, request);
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         HashMap map = (HashMap)timeCost.data;
         List<HashMap> costList = (List<HashMap>)map.get("costList");
         List<List<String>> dataList = new ArrayList<>();
@@ -444,7 +447,7 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
         //生成excel文件导出
         String fileName = yearMonth+"_"+type+MessageUtils.message("report.report")+"_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 6 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskRestartServiceImpl.java

@@ -1,16 +1,11 @@
 package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.management.platform.entity.TaskRestart;
-import com.management.platform.entity.User;
-import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.entity.*;
 import com.management.platform.entity.vo.ProjectWithStage;
 import com.management.platform.entity.vo.StageCost;
 import com.management.platform.entity.vo.SysRichFunction;
-import com.management.platform.mapper.SysFunctionMapper;
-import com.management.platform.mapper.TaskRestartMapper;
-import com.management.platform.mapper.UserMapper;
-import com.management.platform.mapper.WxCorpInfoMapper;
+import com.management.platform.mapper.*;
 import com.management.platform.service.ExcelExportService;
 import com.management.platform.service.TaskRestartService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -50,6 +45,8 @@ public class TaskRestartServiceImpl extends ServiceImpl<TaskRestartMapper, TaskR
     private SysFunctionMapper sysFunctionMapper;
     @Resource
     private ExcelExportService excelExportService;
+    @Resource
+    private CompanyDingdingMapper companyDingdingMapper;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -113,6 +110,7 @@ public class TaskRestartServiceImpl extends ServiceImpl<TaskRestartMapper, TaskR
         User user = userMapper.selectById(token);
         Integer companyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", companyId));
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
         DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         DateTimeFormatter df2=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
@@ -167,7 +165,7 @@ public class TaskRestartServiceImpl extends ServiceImpl<TaskRestartMapper, TaskR
         }
         String fileName = "任务重启报表_"+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList2(wxCorpInfo,fileName, dataList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList2(wxCorpInfo,dingding,fileName, dataList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 129 - 177
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -2,18 +2,17 @@ package com.management.platform.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.util.StringUtil;
 import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
-import com.management.platform.service.CompanyDingdingService;
-import com.management.platform.service.TaskExecutorService;
-import com.management.platform.service.TaskService;
-import com.management.platform.service.WxCorpInfoService;
+import com.management.platform.service.*;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.xssf.usermodel.XSSFCell;
@@ -47,9 +46,6 @@ import java.util.stream.Collectors;
 @Transactional
 public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
 
-    //用于控制线程锁
-    public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
-
     @Value(value = "${upload.path}")
     private String path;
     @Resource
@@ -80,6 +76,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
     private WxCorpInfoService wxCorpInfoService;
     @Resource
     private WxCorpInfoMapper wxCorpInfoMapper;
+    @Resource
+    private SysFunctionService sysFunctionService;
+    @Resource
+    private DepartmentService departmentService;
+    @Resource
+    private DepartmentOtherManagerMapper departmentOtherManagerMapper;
+    @Resource
+    private ExcelExportService excelExportService;
 
     @Override
     public HttpRespMsg getExecutorPanel(Integer projectId) {
@@ -216,176 +220,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
     }
 
 
-    @Override
-    public HttpRespMsg exportTask(Integer projectId, Integer taskType) {
-        HttpRespMsg httpRespMsg = new HttpRespMsg();
-        List<TimeTask> list= taskMapper.getTaskWithWorktime(projectId, taskType);
-        Project project = projectMapper.selectById(projectId);
-        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
-        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
-        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
-        try {
-            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-            //准备导出
-            HSSFWorkbook workbook = new HSSFWorkbook();
-            //HSSFSheet sheet = workbook.createSheet("任务数据");
-            HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.taskData"));
-            //创建表头
-            HSSFRow headRow = sheet.createRow(0);
-            //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
-            sheet.setColumnWidth(0, 50 * 256);
-            sheet.setColumnWidth(1, 20 * 256);
-            sheet.setColumnWidth(2, 20 * 256);
-            sheet.setColumnWidth(3, 20 * 256);
-            sheet.setColumnWidth(4, 20 * 256);
-            sheet.setColumnWidth(5, 20 * 256);
-            sheet.setColumnWidth(6, 20 * 256);
-            sheet.setColumnWidth(7, 20 * 256);
-            sheet.setColumnWidth(8, 20 * 256);
-            sheet.setColumnWidth(9, 20 * 256);
-            //设置为居中加粗
-            HSSFCellStyle headStyle = workbook.createCellStyle();
-            HSSFFont font = workbook.createFont();
-            font.setBold(true);
-            headStyle.setFont(font);
-            HSSFFont redFont = workbook.createFont();
-            redFont.setColor(HSSFFont.COLOR_RED);
-            HSSFCellStyle redStyle = workbook.createCellStyle();
-            redStyle.setFont(redFont);
-            //表头
-            HSSFCell headCell;
-            headCell = headRow.createCell(0);
-            //headCell.setCellValue("任务内容");
-            headCell.setCellValue(MessageUtils.message("excel.taskContent"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(1);
-            //headCell.setCellValue("项目");
-            headCell.setCellValue(MessageUtils.message("entry.project"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(2);
-            //headCell.setCellValue("执行人");
-            headCell.setCellValue(MessageUtils.message("excel.executor"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(3);
-            //headCell.setCellValue("创建时间");
-            headCell.setCellValue(MessageUtils.message("excel.creatTime"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(4);
-            //headCell.setCellValue("截止时间");
-            headCell.setCellValue(MessageUtils.message("excel.deadline"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(5);
-            //headCell.setCellValue("完成时间");
-            headCell.setCellValue(MessageUtils.message("excel.comTime"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(6);
-            //headCell.setCellValue("是否完成");
-            headCell.setCellValue(MessageUtils.message("excel.whetherCom"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(7);
-            //headCell.setCellValue("是否逾期");
-            headCell.setCellValue(MessageUtils.message("excel.overdueNot"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(8);
-            //headCell.setCellValue("计划工时(h)");
-            headCell.setCellValue(MessageUtils.message("excel.plannedWork"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(9);
-            //headCell.setCellValue("实际工时(h)");
-            headCell.setCellValue(MessageUtils.message("excel.actualWork"));
-            headCell.setCellStyle(headStyle);
-            int rowNum = 1;
-            for (TimeTask task : list) {
-                HSSFRow row = sheet.createRow(rowNum);
-                row.createCell(0).setCellValue(task.getName());
-                row.createCell(1).setCellValue(project.getProjectName());
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(task.getExecutorId())).findFirst();
-                    if(first.isPresent()){
-                        row.createCell(2).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?"":first.get().getCorpwxUserid())+"$");
-                    }else {
-                        row.createCell(2).setCellValue("");
-                    }
-                }else {
-                    row.createCell(2).setCellValue(task.getExecutorName());
-                }
-                row.createCell(3).setCellValue(dateTimeFormatter.format(task.getCreateDate()));
-                row.createCell(4).setCellValue(task.getEndDate() != null?dateTimeFormatter.format(task.getEndDate()):"");
-                row.createCell(5).setCellValue(task.getFinishDate() !=null?dateTimeFormatter.format(task.getFinishDate()):"");
-                row.createCell(6).setCellValue(task.getTaskStatus() == 1?"Y":"N");
-                boolean isExpired = false;
-                if (task.getTaskStatus() == 0 && task.getEndDate() !=null&& !task.getEndDate().isAfter(LocalDate.now())) {
-                    isExpired = true;
-                }
-                row.createCell(7).setCellValue(isExpired?"Y":"N");
-                row.createCell(8).setCellValue(task.getPlanHours()==null?"": task.getPlanHours().toString());
-                row.createCell(9).setCellValue(task.getWorkHours());
-                rowNum++;
-            }
-            //生成Excel文件
-            //String fileUrlSuffix = "【"+project.getProjectName()+"】任务数据" + System.currentTimeMillis() + ".xls";
-            String fileUrlSuffix = "【"+project.getProjectName()+"】"+MessageUtils.message("excel.taskData") + System.currentTimeMillis() + ".xls";
-            FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
-            workbook.write(fos);
-            fos.flush();
-            fos.close();
-            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
-                String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
-            /*if(jobId!=null&&!jobId.equals("")){
-                File file=new File(path + fileUrlSuffix);
-                if(file.exists()){
-                    file.delete();
-                }
-            }*/
-                int i = 0;
-                String syncTranslationResult = null;
-                /**
-                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
-                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-                 */
-                while (i < 10) {
-                    Thread.sleep(300);
-                    CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
-                    if (corpwxJobResult != null) {
-                        if (corpwxJobResult.getErrCode() == 0) {
-                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
-                            corpwxJobCenter.remove(jobId);
-                        } else {
-                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
-                            return httpRespMsg;
-                        }
-                        break;
-                    }
-                    i++;
-                }
-                if (syncTranslationResult != null) {
-                    httpRespMsg.data = syncTranslationResult;
-                } else {
-                    //httpRespMsg.setError("处理超时...");
-                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
-                }
-            }else {
-                httpRespMsg.data = "/upload/" + fileUrlSuffix;
-            }
-        } catch (NullPointerException e) {
-            e.printStackTrace();
-            //httpRespMsg.setError("验证失败或缺少数据");
-            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
-            return httpRespMsg;
-        } catch (IOException e) {
-            e.printStackTrace();
-            //httpRespMsg.setError("文件生成错误");
-            httpRespMsg.setError(MessageUtils.message("file.generateError"));
-            return httpRespMsg;
-        }catch (Exception e){
-            e.printStackTrace();
-            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
-            return httpRespMsg;
-        }
-        return httpRespMsg;
-    }
-
     @Override
     public HttpRespMsg importTask(Integer isMultiProject, Integer projectId, Integer groupId, MultipartFile multipartFile, HttpServletRequest request) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
@@ -798,4 +632,122 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
         httpRespMsg.data=list;
         return httpRespMsg;
     }
+
+    @Override
+    public HttpRespMsg userTaskCompleteDetail(Integer pageIndex, Integer pageSize, String startDate, String endDate, String userId, Integer deptId) {
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer pageStart=null;
+        User user = userMapper.selectById(request.getHeader("token"));
+        Integer companyId = user.getCompanyId();
+        List<Department> departmentList = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getCompanyId, companyId));
+        boolean viewAll = sysFunctionService.hasPriviledge(user.getRoleId(), "全部员工任务完成情况表");
+        boolean viewDept = sysFunctionService.hasPriviledge(user.getRoleId(), "负责部门员工任务完成情况表");
+        List<Map<String, Object>> resultMaps;
+        Integer total;
+        if(pageIndex!=null&&pageSize!=null){
+            pageStart = (pageIndex - 1) * pageSize;
+        }
+        if(!viewAll){
+            if(viewDept){
+                //获取负责部门数据
+                List<Integer> deptIds = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getManagerId, user.getId())).stream().map(Department::getDepartmentId).distinct().collect(Collectors.toList());
+                List<Integer> targetDeptIds=new ArrayList<>();
+                targetDeptIds.addAll(deptIds);
+                for (Integer id : deptIds) {
+                    List<Integer> branchDepartment = getBranchDepartment(id, departmentList);
+                    targetDeptIds.addAll(branchDepartment);
+                }
+                resultMaps = taskMapper.userTaskCompleteDetail(pageStart, pageSize, startDate, endDate, userId, deptId,targetDeptIds, companyId);
+                total = taskMapper.userTaskCompleteDetailCount(startDate, endDate, userId, deptId, targetDeptIds, companyId);
+            }else {
+                //只能看自己的
+                resultMaps = taskMapper.userTaskCompleteDetail(pageStart, pageSize, startDate, endDate, user.getId(), deptId,null, companyId);
+                total = taskMapper.userTaskCompleteDetailCount( startDate, endDate, user.getId(), deptId, null, companyId);
+            }
+        }else {
+            resultMaps = taskMapper.userTaskCompleteDetail(pageStart, pageSize, startDate, endDate, userId, deptId,null, companyId);
+            total = taskMapper.userTaskCompleteDetailCount(startDate, endDate, userId, deptId, null, companyId);
+        }
+        Map<String,Object> map=new HashMap<>();
+        map.put("records",resultMaps);
+        map.put("total",total);
+        msg.setData(map);
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg exportUserTaskCompleteDetail(String startDate, String endDate, String userId, Integer deptId) {
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        CompanyDingding dingding = companyDingdingService.getOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, companyId));
+        HttpRespMsg respMsg = userTaskCompleteDetail(null, null, startDate, endDate, userId, deptId);
+        Map<String, Object> data = (Map<String, Object>) respMsg.getData();
+        List<Map<String, Object>> mapList = (List<Map<String, Object>>) data.get("records");
+        List<List<String>> dataList=new ArrayList<>();
+        List<String> titleList=new ArrayList<>();
+        titleList.add("员工");
+        titleList.add("部门");
+        titleList.add("任务总数量");
+        titleList.add("已完成数量");
+        titleList.add("未完成数量");
+        titleList.add("未完成率");
+        titleList.add("按时完成数量");
+        titleList.add("延迟完成数量");
+        titleList.add("按时完成率");
+        dataList.add(titleList);
+        for (Map<String, Object> map : mapList) {
+            List<String> item=new ArrayList<>();
+            if((wxCorpInfo!=null && wxCorpInfo.getSaasSyncContact()==1)||(dingding!=null&&dingding.getSyncContact()==1)){
+                item.add("$userName="+String.valueOf(map.get("userName"))+"$");
+                item.add("$departmentName="+String.valueOf(map.get("deptName"))+"$");
+            }else {
+                item.add(String.valueOf(map.get("userName")));
+                item.add(String.valueOf(map.get("deptName")));
+            }
+            item.add(String.valueOf(map.get("allNum")));
+            item.add(String.valueOf(map.get("completedNum")));
+            item.add(String.valueOf(map.get("noCompletedNum")));
+            item.add(String.valueOf(map.get("noCompletedPercent")));
+            item.add(String.valueOf(map.get("onTimeNum")));
+            item.add(String.valueOf(map.get("noOnTimeNum")));
+            item.add(String.valueOf(map.get("onTimePercent")));
+            dataList.add(item);
+        }
+        String fileName="员工任务完成情况表_"+System.currentTimeMillis();
+        try {
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,dataList,path);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg getTaskByUserId(String startDate, String endDate, String userId, Integer pageIndex, Integer pageSize) {
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer pageStart=null;
+        if(pageIndex!=null&&pageSize!=null){
+            pageStart = (pageIndex - 1) * pageSize;
+        }
+        List<Map<String,Object>> mapList=taskMapper.getTaskByUserId(startDate,endDate,userId,pageStart,pageSize);
+        Integer total=taskMapper.getTaskByUserIdCount(startDate,endDate,userId);
+        Map<String,Object> map=new HashMap<>();
+        map.put("records",mapList);
+        map.put("total",total);
+        msg.setData(map);
+        return msg;
+    }
+
+    private List<Integer> getBranchDepartment(Integer departmentId, List<Department> departmentList) {
+        List<Integer> list = new ArrayList<>();
+        list.add(departmentId);
+        //搜到子部门进行添加
+        for (Department department : departmentList) {
+            if (departmentId.equals(department.getSuperiorId())) {
+                list.addAll(getBranchDepartment(department.getDepartmentId(), departmentList));
+            }
+        }
+        return list;
+    }
 }

+ 1 - 370
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -15,6 +15,7 @@ import com.management.platform.entity.vo.UserVO;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
 import com.management.platform.util.*;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
 import me.chanjar.weixin.mp.api.WxMpService;
 import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
@@ -105,8 +106,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     public static final String GET_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=accessToken&openid=openId&lang=zh_CN";
     public static final String[] MATCHING_FILED = {"corpwx_userid","phone","job_number"};
 
-    //用于控制线程锁
-    public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
     @Resource
     private RedisUtil redisUtil;
 
@@ -1996,252 +1995,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         return respMsg;
     }
 
-    @Override
-    public HttpRespMsg exportUsers(Integer containInvalid, HttpServletRequest request) {
-        HttpRespMsg httpRespMsg = new HttpRespMsg();
-        try {
-            String userId = request.getHeader("Token");
-            User user = userMapper.selectById(userId);
-            TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
-            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
-            List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().select(User::getId, User::getName, User::getCorpwxUserid).eq(User::getCompanyId, user.getCompanyId()));
-            List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", user.getCompanyId()));
-            //查看当前用户是否有人员成本的查看权限
-            boolean canViewCost = sysFunctionService.hasPriviledge(user.getRoleId(), "人员成本管理");
-            System.out.println("canViewCost=========="+canViewCost);
-            //准备导出
-            HSSFWorkbook workbook = new HSSFWorkbook();
-            //HSSFSheet sheet = workbook.createSheet("全部员工列表");
-            HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.allPeopleList"));
-            //创建表头
-            HSSFRow headRow = sheet.createRow(0);
-            //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
-            sheet.setColumnWidth(0, 5 * 256);
-            sheet.setColumnWidth(1, 10 * 256);
-            sheet.setColumnWidth(2, 20 * 256);
-            sheet.setColumnWidth(3, 20 * 256);
-            sheet.setColumnWidth(4, 20 * 256);
-            sheet.setColumnWidth(5, 10 * 256);
-
-            sheet.setColumnWidth(6, 10 * 256);
-            sheet.setColumnWidth(7, 10 * 256);
-            sheet.setColumnWidth(8, 10 * 256);
-            //设置为居中加粗
-            HSSFCellStyle headStyle = workbook.createCellStyle();
-            HSSFFont font = workbook.createFont();
-            font.setBold(true);
-            headStyle.setFont(font);
-            //表头
-            HSSFCell headCell;
-            headCell = headRow.createCell(0);
-            //headCell.setCellValue("序号");
-            headCell.setCellValue(MessageUtils.message("entry.serialNo"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(1);
-            //headCell.setCellValue("姓名");
-            headCell.setCellValue(MessageUtils.message("entry.name"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(2);
-            //headCell.setCellValue("角色");
-            headCell.setCellValue(MessageUtils.message("role.role"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(3);
-            //headCell.setCellValue("手机号");
-            headCell.setCellValue(MessageUtils.message("excel.phoneNumber"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(4);
-            //headCell.setCellValue("部门");
-            headCell.setCellValue(MessageUtils.message("excel.department"));
-            headCell.setCellStyle(headStyle);
-            int auditIndex = -1;
-            if(timeType.getReportAuditType() == 5 || timeType.getReportAuditType() == 6){
-                headCell = headRow.createCell(5);
-                headCell.setCellValue("直属审核人");
-                headCell.setCellStyle(headStyle);
-                auditIndex=0;
-            }
-
-            int minusIndex = -2;
-            if (canViewCost) {
-                headCell = headRow.createCell(6+auditIndex);
-                //headCell.setCellValue("月薪");
-                headCell.setCellValue(MessageUtils.message("excel.MonSalary"));
-                headCell.setCellStyle(headStyle);
-                headCell = headRow.createCell(7+auditIndex);
-                //headCell.setCellValue("时薪");
-                headCell.setCellValue(MessageUtils.message("excel.hourlyWage"));
-                headCell.setCellStyle(headStyle);
-                minusIndex = 0;
-            }
-
-            headCell = headRow.createCell(8+minusIndex+auditIndex);
-            //headCell.setCellValue("证书");
-            headCell.setCellValue(MessageUtils.message("excel.certificate"));
-            headCell.setCellStyle(headStyle);
-            for (int i = 0; i < userCustomList.size(); i++) {
-                headCell = headRow.createCell(minusIndex+9+i+auditIndex);
-                headCell.setCellValue(userCustomList.get(i).getName());
-                headCell.setCellStyle(headStyle);
-            }
-            headCell = headRow.createCell(minusIndex+9+userCustomList.size()+auditIndex);
-            //headCell.setCellValue("状态");
-            headCell.setCellValue(MessageUtils.message("leave.status"));
-            headCell.setCellStyle(headStyle);
-
-            //设置日期格式
-            HSSFCellStyle style = workbook.createCellStyle();
-            style.setDataFormat(HSSFDataFormat.getBuiltinFormat("yy/mm/dd hh:mm"));
-            //新增数据行 并且装填数据
-            int rowNum = 1;
-            QueryWrapper<User> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("company_id", user.getCompanyId());
-            if (containInvalid == 0) {
-                queryWrapper.eq("is_active", 1);
-            }
-            List<User> data = userMapper.selectList(queryWrapper);
-            List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
-            List<String> collect = data.stream().map(da -> da.getId()).distinct().collect(Collectors.toList());
-            List<UserCert> userCertList=new ArrayList<>();
-            if(collect!=null&&!StringUtils.isEmpty(data)){
-                userCertList = userCertMapper.selectList(new QueryWrapper<UserCert>().in("user_id", collect));
-            }
-            for (User item : data) {
-                if (item.getDepartmentId() != 0) {
-                    Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(item.getDepartmentId())).findFirst();
-                    if(first.isPresent()){
-                        Department department =first.get();
-                        item.setDepartmentName(department.getDepartmentName());
-                    }
-                }
-                HSSFRow row = sheet.createRow(rowNum);
-                row.createCell(0).setCellValue(rowNum);
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    row.createCell(1).setCellValue("$userName="+(item.getCorpwxUserid()==null?" ":item.getCorpwxUserid())+"$");
-                }else {
-                    row.createCell(1).setCellValue(item.getName());
-                }
-                row.createCell(2).setCellValue(item.getRoleName());
-                row.createCell(3).setCellValue(item.getPhone());
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    row.createCell(4).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?" ":item.getCorpwxDeptid())+"$");
-                }else {
-                    row.createCell(4).setCellValue(item.getDepartmentName());
-                }
-                if(timeType.getReportAuditType()==5||timeType.getReportAuditType()==6){
-                    if(item.getSuperiorId()!=null){
-                        Optional<User> first = userList.stream().filter(u ->u.getId().equals(item.getSuperiorId())).findFirst();
-                        if(first.isPresent()){
-                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                                row.createCell(5).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?" ":first.get().getCorpwxUserid())+"$");
-                            }else {
-                                row.createCell(5).setCellValue(first.get().getName());
-                            }
-                        }else {
-                            row.createCell(5).setCellValue("");
-                        }
-                    }else {
-                        row.createCell(5).setCellValue("");
-                    }
-
-                }
-                if (canViewCost) {
-                    row.createCell(6+auditIndex).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
-                    row.createCell(7+auditIndex).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
-                }
-                List<UserCert> certList = userCertList.stream().distinct().filter(uc -> uc.getUserId().equals(item.getId())).collect(Collectors.toList());
-                if(certList.size()>0){
-                    String s="";
-                    for (int i = 0; i < certList.size(); i++) {
-                        if(i<certList.size()-1){
-                            s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate()+",";
-                        }else {
-                            s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate();
-                        }
-                    }
-                    row.createCell(8+minusIndex+auditIndex).setCellValue(s);
-                }else {
-                    row.createCell(8+minusIndex+auditIndex).setCellValue("");
-                }
-                for (int i = 0; i < userCustomList.size(); i++) {
-                    String value="";
-                    switch (i){
-                        case 0:value=item.getPlate1()==null?"":item.getPlate1();
-                            break;
-                        case 1:value=item.getPlate2()==null?"":item.getPlate2();
-                            break;
-                        case 2:value=item.getPlate3()==null?"":item.getPlate3();
-                            break;
-                        case 3:value=item.getPlate4()==null?"":item.getPlate4();
-                            break;
-                        case 4:value=item.getPlate5()==null?"":item.getPlate5();
-                            break;
-                    }
-                    row.createCell(9+i+minusIndex+auditIndex).setCellValue(value);
-                }
-                row.createCell(9+userCustomList.size()+minusIndex+auditIndex).setCellValue(item.getIsActive()==1?MessageUtils.message("excel.normal"):MessageUtils.message("access.deactivated"));
-                rowNum++;
-            }
-            //生成Excel文件
-            //String fileUrlSuffix = "员工列表" + System.currentTimeMillis() + ".xls";
-            String fileUrlSuffix = MessageUtils.message("excel.peopleList") + System.currentTimeMillis() + ".xls";
-            FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
-            workbook.write(fos);
-            fos.flush();
-            fos.close();
-            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
-                String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
-            /*if(jobId!=null&&!jobId.equals("")){
-                File file=new File(path + fileUrlSuffix);
-                if(file.exists()){
-                    file.delete();
-                }
-            }*/
-                int i = 0;
-                String syncTranslationResult = null;
-                /**
-                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
-                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-                 */
-                while (i < 10) {
-                    Thread.sleep(300);
-                    CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
-                    if (corpwxJobResult != null) {
-                        if (corpwxJobResult.getErrCode() == 0) {
-                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
-                            corpwxJobCenter.remove(jobId);
-                        } else {
-                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
-                            return httpRespMsg;
-                        }
-                        break;
-                    }
-                    i++;
-                }
-                if (syncTranslationResult != null) {
-                    httpRespMsg.data = syncTranslationResult;
-                } else {
-                    //httpRespMsg.setError("处理超时...");
-                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
-                }
-            }else {
-                httpRespMsg.data = "/upload/" + fileUrlSuffix;
-            }
-        } catch (NullPointerException e) {
-            e.printStackTrace();
-            //httpRespMsg.setError("验证失败或缺少数据");
-            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
-            return httpRespMsg;
-        } catch (IOException e) {
-            e.printStackTrace();
-            //httpRespMsg.setError("文件生成错误");
-            httpRespMsg.setError(MessageUtils.message("file.generateError"));
-            return httpRespMsg;
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return httpRespMsg;
-    }
 
     @Override
     public HttpRespMsg sendVcode(String mobile) {
@@ -2338,128 +2091,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         return msg;
     }
 
-    @Override
-    public HttpRespMsg exportMembList(boolean isFill, String ids, HttpServletRequest request, String date) {
-        HttpRespMsg httpRespMsg = new HttpRespMsg();
-        try {
-            String userId = request.getHeader("Token");
-            User user = userMapper.selectById(userId);
-            List<String> strings = ListUtil.convertLongIdsArrayToList(ids);
-            List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
-            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
-            List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", strings));
-            userList.forEach(u->{
-                Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(u.getDepartmentId())).findFirst();
-                if (first.isPresent()) {
-                    u.setDepartmentName(first.get().getDepartmentName());
-                }
-            });
-            //准备导出
-            HSSFWorkbook workbook = new HSSFWorkbook();
-            //HSSFSheet sheet = workbook.createSheet("人员列表");
-            HSSFSheet sheet = workbook.createSheet(MessageUtils.message("excel.perList"));
-            //创建表头
-            HSSFRow headRow = sheet.createRow(0);
-            //设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
-            sheet.setColumnWidth(0, 5 * 256);
-            sheet.setColumnWidth(1, 10 * 256);
-            sheet.setColumnWidth(2, 20 * 256);
-            //设置为居中加粗
-            HSSFCellStyle headStyle = workbook.createCellStyle();
-            HSSFFont font = workbook.createFont();
-            font.setBold(true);
-            headStyle.setFont(font);
-            //表头
-            HSSFCell headCell;
-            headCell = headRow.createCell(0);
-            //headCell.setCellValue("序号");
-            headCell.setCellValue(MessageUtils.message("entry.serialNo"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(1);
-            //headCell.setCellValue("姓名");
-            headCell.setCellValue(MessageUtils.message("entry.name"));
-            headCell.setCellStyle(headStyle);
-            headCell = headRow.createCell(2);
-            //headCell.setCellValue("部门");
-            headCell.setCellValue(MessageUtils.message("excel.department"));
-            headCell.setCellStyle(headStyle);
-
-            //新增数据行 并且装填数据
-            int rowNum = 1;
-            for (User item : userList) {
-                HSSFRow row = sheet.createRow(rowNum);
-                row.createCell(0).setCellValue(rowNum);
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    row.createCell(1).setCellValue("$userName="+(item.getCorpwxUserid()==null?"":item.getCorpwxUserid())+"$");
-                    row.createCell(2).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?"":item.getCorpwxDeptid())+"$");
-                }else {
-                    row.createCell(1).setCellValue(item.getName());
-                    row.createCell(2).setCellValue(item.getDepartmentName());
-                }
-                rowNum++;
-            }
-            //生成Excel文件
-            //String fileUrlSuffix = date+(isFill?"已填":"未填")+"人员列表" + System.currentTimeMillis() + ".xls";
-            String fileUrlSuffix = date+(isFill?MessageUtils.message("excel.Filled"):MessageUtils.message("excel.notFilled"))+MessageUtils.message("excel.perList") + System.currentTimeMillis() + ".xls";
-            FileOutputStream fos = new FileOutputStream(path + fileUrlSuffix);
-            workbook.write(fos);
-            fos.flush();
-            fos.close();
-            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
-                String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
-            /*if(jobId!=null&&!jobId.equals("")){
-                File file=new File(path + fileUrlSuffix);
-                if(file.exists()){
-                    file.delete();
-                }
-            }*/
-                int i = 0;
-                String syncTranslationResult = null;
-                /**
-                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
-                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-                 */
-                while (i < 10) {
-                    Thread.sleep(300);
-                    CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
-                    if (corpwxJobResult != null) {
-                        if (corpwxJobResult.getErrCode() == 0) {
-                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
-                            corpwxJobCenter.remove(jobId);
-                        } else {
-                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
-                            return httpRespMsg;
-                        }
-                        break;
-                    }
-                    i++;
-                }
-                if (syncTranslationResult != null) {
-                    httpRespMsg.data = syncTranslationResult;
-                } else {
-                    //httpRespMsg.setError("处理超时...");
-                    httpRespMsg.setError(MessageUtils.message("request.outTime"));
-                }
-            }else {
-                httpRespMsg.data = "/upload/" + fileUrlSuffix;
-            }
-        } catch (NullPointerException e) {
-            //httpRespMsg.setError("验证失败或缺少数据");
-            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
-            return httpRespMsg;
-        } catch (IOException e) {
-            //httpRespMsg.setError("文件生成错误");
-            httpRespMsg.setError(MessageUtils.message("file.generateError"));
-            return httpRespMsg;
-        }catch (Exception e){
-            e.printStackTrace();
-            httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
-            return httpRespMsg;
-        }
-        return httpRespMsg;
-    }
-
     @Override
     public HttpRespMsg getHRList(HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -8,6 +8,7 @@ import com.management.platform.controller.WeiXinCorpController;
 import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
 import com.management.platform.service.TimeTypeService;
+import com.management.platform.service.UserService;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.service.WxCorpTemplateService;
 import com.management.platform.task.SFTPAsyncUploader;

+ 83 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskMapper.xml

@@ -277,4 +277,87 @@
         </if>
         group by project_id) group by task.project_id
     </select>
+
+    <select id="userTaskCompleteDetail" resultType="java.util.Map">
+        SELECT u.id as userId, u.name AS userName,u.corpwx_userid AS corpWxUserId,d.corpwx_deptid AS corpWxDeptId,d.department_name AS deptName,COUNT(t.name) AS allNum,COUNT(CASE WHEN t.task_status=0 THEN 1 END) AS noCompletedNum,COUNT(CASE WHEN t.task_status=1 THEN 1 END) AS completedNum,
+        COUNT(CASE WHEN t.finish_date &lt;= t.end_date AND t.task_status=1  THEN 1 END) AS onTimeNum,COUNT(CASE WHEN t.finish_date>t.end_date AND t.task_status=1 THEN 1 END) AS noOnTimeNum,
+        CONCAT(FORMAT(COUNT(CASE WHEN t.task_status=0 THEN 1 END)/COUNT(t.name)*100, 2), '%') AS noCompletedPercent,CONCAT(FORMAT(COUNT(CASE WHEN t.finish_date &lt;= t.end_date AND t.task_status=1  THEN 1 END)/COUNT(t.name)*100, 2), '%') AS onTimePercent
+        FROM
+        task_executor te
+        LEFT JOIN user u ON te.executor_id=u.id
+        LEFT JOIN department d ON u.department_id=d.department_id
+        LEFT JOIN task t ON te.task_id=t.`id`
+        WHERE u.company_id=#{companyId}
+        <if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
+            AND t.start_date &lt; #{endDate} AND t.end_date &gt; #{startDate}
+        </if>
+        <if test="userId!=null and userId!=''">
+            and u.id=#{userId}
+        </if>
+        <if test="deptId!=null">
+         and d.department_id=#{deptId}
+        </if>
+        <if test="list!=null and list.size()>0">
+            and  d.department_id in
+            <foreach collection="list" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        group by te.executor_id
+        <if test="pageStart != null and pageSize != null">
+            limit #{pageStart}, #{pageSize}
+        </if>
+    </select>
+
+    <select id="userTaskCompleteDetailCount" resultType="java.lang.Integer">
+        select count(1) from (
+        SELECT u.id as userId
+        FROM
+        task_executor te
+        LEFT JOIN user u ON te.executor_id=u.id
+        LEFT JOIN department d ON u.department_id=d.department_id
+        LEFT JOIN task t ON te.task_id=t.`id`
+        WHERE u.company_id=#{companyId}
+        <if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
+            AND t.start_date &lt; #{endDate} AND t.end_date &gt; #{startDate}
+        </if>
+        <if test="userId!=null and userId!=''">
+            and u.id=#{userId}
+        </if>
+        <if test="deptId!=null">
+            and d.department_id=#{deptId}
+        </if>
+        <if test="list!=null and list.size()>0">
+            and  d.department_id in
+            <foreach collection="list" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        group by te.executor_id
+        ) as total
+    </select>
+
+    <select id="getTaskByUserId" resultType="java.util.Map">
+        SELECT t.`name` AS taskName,GROUP_CONCAT(u.name) AS executorNames,GROUP_CONCAT(u.corpwx_userid) AS executorCorpWxUserIds,
+        date_format(t.`start_date`,'%Y-%m-%d') AS startDate,date_format(t.`end_date`,'%Y-%m-%d') AS endDate,date_format(t.`finish_date`,'%Y-%m-%d') AS finishDate,
+        (CASE t.`task_status` WHEN 0 THEN '进行中' WHEN 1 THEN '已完成' ELSE '已撤销' END) AS stateValue
+        FROM
+        task_executor te
+        LEFT JOIN USER u ON te.executor_id=u.id
+        LEFT JOIN task t ON te.task_id=t.`id`
+        WHERE t.start_date &lt; #{endDate} AND t.end_date &gt; #{startDate} AND FIND_IN_SET(#{userId},t.`executor_id`) GROUP BY t.`id`
+        <if test="pageStart != null and pageSize != null">
+            limit #{pageStart}, #{pageSize}
+        </if>
+    </select>
+    <select id="getTaskByUserIdCount" resultType="java.lang.Integer">
+        select count(1) from (
+        SELECT t.`name` AS taskName
+        FROM
+        task_executor te
+        LEFT JOIN USER u ON te.executor_id=u.id
+        LEFT JOIN task t ON te.task_id=t.`id`
+        WHERE t.start_date &lt; #{endDate} AND t.end_date &gt; #{startDate} AND FIND_IN_SET(#{userId},t.`executor_id`) GROUP BY t.`id`
+        )as total
+    </select>
 </mapper>

+ 12 - 12
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -3,18 +3,18 @@
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click.stop="selectCli" :ref="disabled ? '' : 'selectDiv'">
             <div :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="(selectName == $t('defaultText.pleaseChoose') || selectName == $t('qing-xuan-ze-bu-men') || selectName == $t('other.allDepartments')) ? 'selecttex selecttexXuan' : 'selecttex'">
-                <!-- <ww-open-data type='departmentName' :openid='selectName'></ww-open-data> -->
+                <!-- <TranslationOpenDataText type='departmentName' :openid='selectName'></TranslationOpenDataText> -->
                 <!-- {{selectName}} -->
                  <span v-if="userName">
                     <span v-if="selectNameType == 'dep'">
-                        <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='selectName'></TranslationOpenDataText>
                     </span>
                     <span v-if="selectNameType == 'user'">
-                        <ww-open-data type='userName' :openid='selectName'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='selectName'></TranslationOpenDataText>
                     </span>
                 </span>
                 <span v-if="!userName">
-                    <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                    <TranslationOpenDataText type='departmentName' :openid='selectName'></TranslationOpenDataText>
                 </span>
             </div>
             <i :class="move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
@@ -30,16 +30,16 @@
                         <!-- {{item.label}} -->
                         <span v-if="userName">
                             <span v-if="item.type == 'dep'">
-                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                             </span>
                             <span v-if="item.type == 'user'">
-                                <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item.label'></TranslationOpenDataText>
                             </span>
                         </span>
                         <span v-if="!userName">
-                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                         </span>
-                        <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
+                        <!-- <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText> -->
                     </span>
                     <span v-if="radios && !fistRadio" style="margin-left: -15px">
                         <el-radio v-model="optionsOId" :label="item.value">
@@ -47,16 +47,16 @@
                                 <!-- {{item.label}}  -->
                                 <span v-if="userName">
                                     <span v-if="item.type == 'dep'">
-                                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                        <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                                     </span>
                                     <span v-if="item.type == 'user'">
-                                        <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='item.label'></TranslationOpenDataText>
                                     </span>
                                 </span>
                                 <span v-if="!userName">
-                                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                                 </span>
-                                <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
+                                <!-- <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText> -->
                             </span>
                         </el-radio>
                     </span>

+ 8 - 8
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -7,16 +7,16 @@
                     <!-- {{item.label}} -->
                     <span v-if="userName">
                         <span v-if="item.type == 'dep'">
-                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                         </span>
                         <span v-if="item.type == 'user'">
-                            <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='item.label'></TranslationOpenDataText>
                         </span>
                     </span>
                     <span v-if="!userName">
-                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                     </span>
-                    <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
+                    <!-- <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText> -->
                 </span>
                 <span v-if="radios" style="margin-left: -15px">
                     <el-radio v-model="departmentId" :label="item.value">
@@ -24,16 +24,16 @@
                             <!-- {{item.label}}  -->
                             <span v-if="userName">
                                 <span v-if="item.type == 'dep'">
-                                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-if="item.type == 'user'">
-                                    <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="!userName">
-                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText>
                             </span>
-                            <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
+                            <!-- <TranslationOpenDataText type='departmentName' :openid='item.label'></TranslationOpenDataText> -->
                         </span>
                     </el-radio>
                 </span>

+ 7 - 7
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -5,14 +5,14 @@
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
             <div v-if="!multiSelect" :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
-                <ww-open-data type='userName' :openid='selectName'></ww-open-data>
+                <TranslationOpenDataText type='userName' :openid='selectName'></TranslationOpenDataText>
                 <!-- {{selectName}} -->
             </div>
             <div v-if="multiSelect" :style="'line-height: '+selectHeight+'px;margin-left: -10px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
                 <span v-if="multiSelectList.length > 0">
                     <span v-if="!tile" style="width: 100%">
                         <span class="all">
-                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='multiSelectList[0].name'></TranslationOpenDataText>
                             <!-- {{multiSelectList[0].name}} -->
                             <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
                         </span>
@@ -20,7 +20,7 @@
                     </span>
                     <span v-if="tile" style="width: 100%">
                         <span class="all" style="margin-right: 6px" v-for="(items, indexs) in multiSelectList" :key="indexs">
-                            <ww-open-data type='userName' :openid='items.name'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='items.name'></TranslationOpenDataText>
                             <!-- {{items.name}} -->
                             <span v-if="items.jobNumber" class="spanFllat">{{items.jobNumber}}</span>
                             <i class="el-icon-error" @click.stop="deleteMultiSelectList(indexs)" v-if="!disabled"></i>
@@ -44,10 +44,10 @@
                 <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item, index)"> 
                     <span v-if="!multiSelect" style="width: 100%">
                         <span v-if="item.name">
-                            <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                         </span> 
                         <span v-if="item.auditorName">
-                            <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText>
                         </span>
                         <!-- {{item.name || item.auditorName}} -->
                         <span v-if="item.jobNumber" class="spanFllat">{{item.jobNumber}}</span>
@@ -56,7 +56,7 @@
                     <span v-if="multiSelect" style="width: 100%">
                         <span :class="item.flg ? 'hoverSpan hoverSpanHover' : 'hoverSpan'">
                             <span style="width: 100%;display: inline-block;">
-                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                 <!-- {{item.name}} -->
                                 <span v-if="item.jobNumber" class="spanFllat">{{item.jobNumber}}</span>
                             </span>
@@ -72,7 +72,7 @@
   <div v-if="wxCope" class="waihez">
     <!-- <div @click="dianjis()">点击</div> -->
     <div :style="`width:${selectWidth}px;height:${selectHeight}px;line-height:${selectHeight}px;background:#fff`" class="select selectDandu" @click="dianjis()">
-        <span v-if="!multiSelect"><ww-open-data type='userName' :openid='selectName'></ww-open-data></span>
+        <span v-if="!multiSelect"><TranslationOpenDataText type='userName' :openid='selectName'></TranslationOpenDataText></span>
         <!-- <span>你好</span> -->
     </div>
   </div>

+ 14 - 14
fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue

@@ -155,7 +155,7 @@
                                             {{item.name}}
                                         </span>
                                         <span v-if="user.userNameNeedTranslate == '1'">
-                                            <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                         </span>
                                     </span>
                                 </el-checkbox>
@@ -192,7 +192,7 @@
                                     {{recentProgressInfo.creatorName}}
                                 </span>
                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                    <ww-open-data type='userName' :openid='recentProgressInfo.creatorName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='recentProgressInfo.creatorName'></TranslationOpenDataText>
                                 </span>
                             </span>
                             {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
@@ -299,7 +299,7 @@
                                     </span>
                                     <span v-else>
                                         <span v-for="item,index in scope.row.executorName" :key="index">
-                                            <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                             <span v-if="index < scope.row.executorName.length - 1">,</span>
                                         </span>
                                     </span>
@@ -347,7 +347,7 @@
                         <div>
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
                             <span v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='userName' :openid='scope.row.creatorName'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
                             </span>
                         </div>
                     </template>
@@ -419,7 +419,7 @@
                         <span  v-for="(pl, i) in critic" :key="i">
                         <span style="background: #778899" v-if="user.userNameNeedTranslate != 1">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
                         <span v-if="user.userNameNeedTranslate == 1">
-                            <ww-open-data type='userName' :openid='pl'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='pl'></TranslationOpenDataText>
                         </span>
                         </span>
                         <!-- <span style="background: #778899">{{pl.length}}</span> -->
@@ -446,7 +446,7 @@
                                     {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
                                 </i>   
                                 <i v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                 </i>
                             </i>
                             <div>
@@ -456,14 +456,14 @@
                                         {{item.userName}}
                                     </p>
                                     <p v-if="user.userNameNeedTranslate == 1">
-                                        <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                     </p>
                                 <!-- </p> -->
                                 <em>
                                     <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
                                         <template v-for="listItem in item.newContent">
                                             <template v-if="listItem.type == 'user'">
-                                                <ww-open-data type='userName' :openid='listItem.value'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='listItem.value'></TranslationOpenDataText>
                                             </template>
                                             <template v-if="listItem.type == 'text'">{{ listItem.value }}</template>
                                         </template>
@@ -474,7 +474,7 @@
                                     <span class="commentSpan" v-if="user.timeType.restartTaskNeedReason == 1 && item.taskPersonLiableList.length > 0">责任人: 
                                         <span v-for="responsibility, responsibilityIndex in item.taskPersonLiableList" :key="responsibilityIndex">
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='responsibility.userName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='responsibility.userName'></TranslationOpenDataText>
                                             </span>
                                             <span v-if="user.userNameNeedTranslate != 1">{{responsibility.userName}}</span>
                                             <span v-if="responsibilityIndex < item.taskPersonLiableList.length - 1">,</span>
@@ -492,7 +492,7 @@
                             <p>
                                 {{ $t('tian-bao-ren') }}: <span v-if="user.userNameNeedTranslate != 1">{{item2.userName}}</span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='userName' :openid='item2.userName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item2.userName'></TranslationOpenDataText>
                                 </span>
                                 <span style="float: right;">{{item2.createDate}}</span>
                             </p>
@@ -504,7 +504,7 @@
                                                 <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
                                                 <span v-if="item2.projectAuditorName != null">(
                                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                        <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                                     </span>
                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                     )</span> 
@@ -515,7 +515,7 @@
                                                 <span v-if="item2.projectAuditorName != null">(
                                                     <!-- {{item2.projectAuditorName}} -->
                                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                        <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                                     </span>
                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                     )</span>
@@ -525,7 +525,7 @@
                                         <span v-else-if="item2.isDeptAudit==1">
                                             ({{$t('other.await')}}
                                             <span v-if="user.userNameNeedTranslate == '1'">
-                                                <ww-open-data type='departmentName' :openid='item2.auditDeptName'></ww-open-data>
+                                                <TranslationOpenDataText type='departmentName' :openid='item2.auditDeptName'></TranslationOpenDataText>
                                             </span>
                                             <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
                                             {{$t('other.audit')}})
@@ -549,7 +549,7 @@
                                                 {{item2.projectAuditorName}}
                                             </span>
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                             </span>
                                         )
                                     </span>{{$t('other.audit')}}</span>

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/translationOpenData.vue

@@ -114,7 +114,9 @@ export default {
             }
         },
         viewConfiguration() {
-            window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
+            setTimeout(() => {
+                window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
+            }, 100);
         }
     },
 }

+ 90 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/translationOpenDataText.vue

@@ -0,0 +1,90 @@
+<template>
+    <div class="translation">
+        <!-- 文本 -->
+        <span v-if="corporateWeChat">
+            <ww-open-data :type='type' :openid='openIdValue'></ww-open-data>
+        </span>
+        <span v-else-if="dingdingPlatform">
+            <dt-open-data :open-type='type' :open-id='openIdValue'></dt-open-data>
+        </span>
+        <span v-else>{{ openIdValue }}</span>
+    </div>
+</template>
+
+<script>
+
+export default {
+    name: '',
+    components: {},
+    props: {
+        type: {
+            type: String,
+            default: 'userName'
+        },
+        openid: {
+            type: [String, Number],
+            default: ''
+        }
+    },
+    data() {
+        return {
+            user: JSON.parse(sessionStorage.getItem("user")),
+            corporateWeChat: false, // 企业微信转译
+            dingdingPlatform: false, // 钉钉转译
+
+            openIdValue: ''
+        }
+    },
+    computed: {},
+    watch: {
+        openid: {
+            handler(newVal, oldVal) {
+                this.assignmentValue(newVal)
+            },
+        }
+    },
+    created() { },
+    mounted() {
+        this.dealWith()
+    },
+    methods: {
+        dealWith() {
+            console.log(this.user)
+            const { userNameNeedTranslate, dingdingUserid } = this.user
+            if (userNameNeedTranslate) {
+                this.corporateWeChat = true
+                if (dingdingUserid) {
+                    this.dingdingPlatform = true
+                    this.corporateWeChat = false
+                } else {
+                    this.dingdingPlatform = false
+                }
+            } else {
+                this.corporateWeChat = false
+                this.dingdingPlatform = false
+            }
+            // console.log(this.corporateWeChat, this.dingdingPlatform, this.configurationItems)
+            // console.log(this.corporateWeChat, '<=== 企业微信转译')
+            // console.log(this.dingdingPlatform, '<=== 钉钉转译')
+            this.assignmentValue(this.openid)
+        },
+        assignmentValue(value) {
+            this.openIdValue = value
+            if (this.user.dingdingUserid) {
+                this.viewConfiguration()
+            }
+        },
+        viewConfiguration() {
+            setTimeout(() => {
+                window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
+            }, 100);
+        }
+    },
+}
+</script>
+<style scoped lang='scss'>
+.translation {
+    width: auto;
+    display: inline-block;
+}
+</style>

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/main.js

@@ -76,7 +76,9 @@ Vue.use(Print)
 
 // 全局转译组件
 import TranslationOpenData from '@/components/translationOpenData.vue'
+import TranslationOpenDataText from '@/components/translationOpenDataText.vue'
 Vue.component('TranslationOpenData', TranslationOpenData)
+Vue.component('TranslationOpenDataText', TranslationOpenDataText)
 
 var addRouFlag = false; 
 //角色权限对应关系

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -269,6 +269,7 @@ const StringUtil = {
         arr[i] == '全部分组耗用进度表' || arr[i] == '负责部门分组耗用进度表' ? obj.reportProjectConsumptionFirst = true : ''
         arr[i] == '全部项目耗用进度表' || arr[i] == '负责部门项目耗用进度表' ? obj.reportProjectConsumptionTwo = true : ''
         arr[i] == '全部员工任务进度表' || arr[i] == '负责部门员工任务进度表' ? obj.reportStaffTaskAccomplished = true : ''
+        arr[i] == '全部员工任务完成情况表' || arr[i] == '负责部门员工任务完成情况表' ? obj.takCompletedStatus = true : ''
 
         arr[i] == '新增立项申请'  ? obj.projectApprovalNew = true : ''
         arr[i] == '导入立项申请'  ? obj.projectApprovalImport = true : ''

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -81,7 +81,7 @@
                                             </span>
                                             <span v-if="user.userNameNeedTranslate == 1">
                                                 {{scope.row.omg.textOne}}
-                                                <ww-open-data v-if="user.corpwxUserid != null" type='userName' :openid='scope.row.omg.textTwo'></ww-open-data>
+                                                <TranslationOpenDataText v-if="user.corpwxUserid != null" type='userName' :openid='scope.row.omg.textTwo'></TranslationOpenDataText>
                                                 <dt-open-data v-if="user.dingdingUserid != null" open-type='userName' :open-id='scope.row.omg.textTwo'></dt-open-data>
                                                 {{scope.row.omg.textThree}}
                                             </span>
@@ -104,7 +104,7 @@
                     <span class="el-dropdown-link userinfo-inner">
                         <img src="../assets/image/userHead.png" />
                         <!-- <span v-if="user.userNameNeedTranslate == 1">
-                            <ww-open-data type='userName' :openid='sysUserName'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='sysUserName'></TranslationOpenDataText>
                         </span>
                         <span v-if="user.dingdingUserid">
                             <dt-open-data open-type='userName' :open-id='user.dingdingUserid'></dt-open-data>
@@ -796,7 +796,7 @@
                                                 console.log(window, 'window')
                                                 //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
                                                 if(window.WWOpenData) {
-                                                    window.WWOpenData.bind(document.querySelector('ww-open-data'))
+                                                    window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
                                                     if (WWOpenData.initCanvas) {
                                                         WWOpenData.initCanvas()
                                                         console.log('我企业微信 canvas 应该执行了吧')

+ 13 - 13
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -146,8 +146,8 @@
                             <span v-if="index>0"><i class="el-icon-right"></i></span>
                             <span><i class="el-icon-s-custom"></i></span>
                             <span v-if="user.userNameNeedTranslate == 1">
-                            <span v-if="item.auditorType == 1"><ww-open-data type='departmentName' :openid='item.auditDeptName' ></ww-open-data>(主要负责人)</span>
-                            <ww-open-data type='userName' :openid='item.userName' v-if="item.auditorType == 2"></ww-open-data>
+                            <span v-if="item.auditorType == 1"><TranslationOpenDataText type='departmentName' :openid='item.auditDeptName' ></TranslationOpenDataText>(主要负责人)</span>
+                            <TranslationOpenDataText type='userName' :openid='item.userName' v-if="item.auditorType == 2"></TranslationOpenDataText>
                             </span>
                             <span v-if="user.userNameNeedTranslate == 0">
                             {{item.auditorType == 1?(item.auditDeptName+'(主要负责人)'):item.userName}}
@@ -219,7 +219,7 @@
                         <template slot-scope="scope">
                             <span :style="scope.row.dayCount >= 10 ? 'color:#e62412' : ''">
                                 <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText></span>
                             </span>
                         </template>
                     </el-table-column>
@@ -271,7 +271,7 @@
                             <div v-if="scope.row.status == 1" style="color: orange"><span>{{ $t('state.WaitingAudit') }}-</span>
                                 <span v-if="user.userNameNeedTranslate != 1">{{scope.row.auditorName}}</span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='userName' :openid='scope.row.auditorName'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='scope.row.auditorName'></TranslationOpenDataText>
                                 </span>
                             </div>
                             <span v-if="scope.row.status == 2" style="color: red">{{ $t('btn.rejected') }}</span>
@@ -358,7 +358,7 @@
                         <template slot-scope="scope">
                             <div v-if="scope.row.ownerName">
                                 <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText></span>
                             </div>
                             <div v-else>
                             <span>{{ $t('nostatisticsonbusinesstripsatpresent') }}</span>
@@ -368,7 +368,7 @@
                     <el-table-column prop="departmentName" :label="$t('lable.department')" width="300">
                         <template slot-scope="scope">
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.departmentName}}</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText></span>
                         </template>
                     </el-table-column>
                     <el-table-column prop="dayCount" :label="$t('cumulativebusinesstripdays')" width="300">
@@ -397,7 +397,7 @@
                                 <span class="custom-tree-node" slot-scope="{ node, data }">
                                     <!-- <span>{{ node.label }}</span> -->
                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                        <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                        <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                     </span>
                                     <span v-else>
                                         {{ node.label }}
@@ -414,7 +414,7 @@
                             <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
                                 <!-- {{depData.label}} -->
                                 <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='depData.label'></TranslationOpenDataText></span>
                                 &gt;</span> {{ $t('approvalprocessforbusiness') }}
                                 <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" :content="$t('onlyapplicabletotheimmediatestaffofthecurrentdepartment')" placement="top-start">
                                     <i class="el-icon-question"></i>
@@ -431,10 +431,10 @@
                                     
                                     <!-- <el-button type="primary" v-if="item.auditorType == 2" @click="editNodeDialog(index, item)">{{item.userName}}</el-button> -->
                                     <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
-                                        <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
+                                        <TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText>
                                     </el-button>
                                     <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
-                                        <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                     </el-button>
                                     <el-button type="primary" v-if="item.auditorType == 0" >{{ $t('projectLeader') }}</el-button>
                                     <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
@@ -477,7 +477,7 @@
         <!-- <el-form ref="editItemForm" :model="editItemForm" label-width="80px" :rules="editItemFormRules"> -->
         <el-form ref="editItemForm" :model="editItemForm" label-width="80px" :rules="editItemRules">
             <el-form-item :label="$t('businesspersonnel')" prop="ownerName"  style="width: 300px;display: inline-block;">
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='editItemForm.ownerName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='editItemForm.ownerName'></TranslationOpenDataText></span>
                 <span v-else>{{editItemForm.ownerName}}</span>
             </el-form-item>
             <el-form-item :label="$t('onewayroundtrip')" prop="goBack" style="width: 300px;display: inline-block;">
@@ -583,7 +583,7 @@
             <el-table-column prop="ownerName" :label="$t('businesspersonnel')" width="100" fixed="left">
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
                     </div>
                 </template>
@@ -733,7 +733,7 @@
         <div style="padding:20px 40px 20px 0">
             <el-timeline :reverse="false">
                 <el-timeline-item v-for="item in auditLogList" :key="item.id" :timestamp="item.indate">
-                  <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data> </span>
+                  <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText> </span>
                   <span v-if="user.userNameNeedTranslate == 0">{{item.auditorName}}</span>
                   <span> {{item.isPass==0?"驳回了请假申请。":"审核通过。"}}</span>
                   <span v-if="item.isPass == 0">原因:{{item.denyReason}}</span>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/contract/index.vue

@@ -267,7 +267,7 @@
           </el-form-item>
           <el-form-item :label="$t('dismissreason')" v-if="contractForm.status == 2">
             <span v-if="userNameNeedTranslate == 1">
-              <span><ww-open-data type='userName' :openid='contractForm.msg.name'></ww-open-data></span>
+              <span><TranslationOpenDataText type='userName' :openid='contractForm.msg.name'></TranslationOpenDataText></span>
               <span>{{contractForm.msg.text}}</span>
             </span>
             <span v-else>
@@ -275,7 +275,7 @@
             </span>
           </el-form-item>
           <el-form-item :label="$t('founder')">
-            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='contractForm.creatorName'></ww-open-data></span>
+            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='contractForm.creatorName'></TranslationOpenDataText></span>
             <span v-else>{{contractForm.creatorName}}</span>
           </el-form-item>
           <el-form-item :label="$t('creationtime')">

+ 235 - 37
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -48,6 +48,7 @@
                   <el-menu-item index="1-26" v-if="permissions.reportProjectConsumptionTwo" @click="ssl(25)"><p>项目耗用进度表</p></el-menu-item>
                   <el-menu-item index="1-27" v-if="permissions.reportStaffTaskAccomplished" @click="ssl(26)"><p>员工任务进度表</p></el-menu-item>
                   <el-menu-item index="1-28" v-if="permissions.reportProjectEstimated" @click="ssl(27)"><p>项目预估工时表</p></el-menu-item>
+                  <el-menu-item index="1-29" v-if="permissions.takCompletedStatus" @click="ssl(28)"><p>员工任务完成情况表</p></el-menu-item>
                 </el-submenu>
               </el-menu>
           </el-col>
@@ -219,7 +220,7 @@
                 <el-table-column prop="inchargerName" :label="$t('projectmanager')"  width="130">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.inchargerName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.inchargerName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.inchargerName}}
@@ -287,7 +288,7 @@
                   <template slot-scope="scope" >
                     <span v-for="(items, indexs) in scope.row.executor_name" :key="indexs">
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='userName' :openid='items'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='items'></TranslationOpenDataText>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{items}}
@@ -563,7 +564,7 @@
                 <el-table-column prop="username" :label="$t('lable.name')" width="120">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.username'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.username}}
@@ -574,7 +575,7 @@
                 <el-table-column prop="departmentName" :label="$t('lable.department')" width="140">
                   <template slot-scope="scope" >
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{scope.row.departmentName}}
@@ -604,7 +605,7 @@
               <el-table-column prop="username" :label="$t('ren-yuan')" width="150">
                 <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.username'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.username}}
@@ -615,10 +616,10 @@
                 <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
                       <span v-for="item, index in scope.row.deptName" :key="index">
-                        <ww-open-data type='departmentName' :openid='item'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='item'></TranslationOpenDataText>
                         <span v-if="index < scope.row.deptName.length - 1">/</span>
                       </span>
-                        <!-- <ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data> -->
+                        <!-- <TranslationOpenDataText type='departmentName' :openid='scope.row.deptName'></TranslationOpenDataText> -->
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.deptName}}
@@ -706,7 +707,7 @@
                 <el-table-column prop="userName" :label="$t('ren-yuan')" min-width="200" align="center">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -717,7 +718,7 @@
                 <el-table-column prop="departmentName" :label="$t('subordinatedepartments')" min-width="200" align="center">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.departmentName}}
@@ -754,7 +755,7 @@
                 <el-table-column prop="userName" :label="$t('other.reviewer')" min-width="200" align="center">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -765,7 +766,7 @@
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
                       <span v-for="(item,index) in scope.row.departmentName" :key="index">
-                        <ww-open-data type='departmentName' :openid='item'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='item'></TranslationOpenDataText>
                         <span v-if="index < scope.row.departmentName.length - 1">/</span>
                       </span>
                     </span>
@@ -782,7 +783,7 @@
                 <el-table-column prop="name" :label="$t('lable.name')" min-width="200" align="center">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.name}}
@@ -793,7 +794,7 @@
                 <el-table-column prop="departmentName" :label="$t('lable.department')" min-width="200" align="center">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.departmentName}}
@@ -839,7 +840,7 @@
                   <template slot-scope="scope">
                     <div>
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{scope.row.name}}
@@ -896,7 +897,7 @@
                     <div>
                       <span v-if="user.userNameNeedTranslate == '1'">
                         <span v-for="item, index in scope.row.deptName" :key='index'>
-                          <ww-open-data type='departmentName' :openid='item'></ww-open-data>
+                          <TranslationOpenDataText type='departmentName' :openid='item'></TranslationOpenDataText>
                           <span v-if="index < scope.row.deptName.length - 1">/</span>
                         </span>
                       </span>
@@ -950,7 +951,7 @@
                     <div>
                       <span v-for="item, index in scope.row.personLiableNames" :key="index">
                         <span v-if="user.userNameNeedTranslate == '1'">
-                          <ww-open-data type='userName' :openid='item'></ww-open-data>
+                          <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                         </span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{item}}</span>
                         <span v-if="index < scope.row.personLiableNames.length - 1">,</span>
@@ -970,7 +971,7 @@
                   <template slot-scope="scope">
                     <div>
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{scope.row.userName}}
@@ -989,7 +990,7 @@
                   <template slot-scope="scope">
                     <div>
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='departmentName' :openid='scope.row.department_name'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='scope.row.department_name'></TranslationOpenDataText>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{scope.row.department_name}}
@@ -1013,7 +1014,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -1056,7 +1057,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -1068,7 +1069,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.deptName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.deptName}}
@@ -1108,7 +1109,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.deptName}}
@@ -1121,7 +1122,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -1142,7 +1143,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.corpwxDeptId'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.corpwxDeptId'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.departmentName}}
@@ -1179,7 +1180,7 @@
                   <div class="participatingEmployee">
                     <div v-for="(item,index) in scope.row.teamLeader" :key="index">
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='userName' :openid='item.name'></ww-open-data> 
+                        <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText> 
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{item.name}}
@@ -1194,7 +1195,7 @@
                   <div class="participatingEmployee">
                     <div v-for="(item,index) in scope.row.userProgress" :key="index">
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='userName' :openid='item.userName'></ww-open-data> 
+                        <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText> 
                         {{item.progress}}
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
@@ -1214,7 +1215,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.departmentName}}
@@ -1227,7 +1228,7 @@
                 <template slot-scope="scope">
                   <div>
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.userName}}
@@ -1253,6 +1254,41 @@
               <el-table-column align="center" prop="estimatedWorkTime" label="预估工时" min-width="150"></el-table-column>
               <el-table-column align="center" prop="workTime" label="实际工时" min-width="150"></el-table-column>
             </el-table>
+
+            <!-- 员工任务完成情况表 -->
+            <el-table  v-if="ins == 28" key="28" border :data="taskCompletedData" highlight-current-row v-loading="listLoading"  :height="+tableHeight - 1" style="width: 100%;" :span-method="objectSpanMethod">
+              <el-table-column align="center" prop="userName" label="员工" min-width="150">
+                <template slot-scope="scope">
+                  <div>
+                    <span v-if="user.userNameNeedTranslate == '1'">
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
+                    </span>
+                    <span v-if="user.userNameNeedTranslate != '1'">
+                      <el-link type="primary" :underline="false" @click="showUserTask(scope.row.userId)">{{scope.row.userName}}</el-link>
+                    </span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" prop="deptName" label="部门" min-width="150">
+                <template slot-scope="scope">
+                  <div>
+                    <span v-if="user.userNameNeedTranslate == '1'">
+                      <TranslationOpenDataText type='deptName' :openid='scope.row.deptName'></TranslationOpenDataText>
+                    </span>
+                    <span v-if="user.userNameNeedTranslate != '1'">
+                      {{scope.row.deptName}}
+                    </span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" prop="allNum" label="任务总数量" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="completedNum" label="已完成数量" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="noCompletedNum" label="未完成数量" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="noCompletedPercent" label="未完成率" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="onTimeNum" label="按时完成数量" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="noOnTimeNum" label="延迟完成数量" min-width="150"></el-table-column>
+              <el-table-column align="center" prop="onTimePercent" label="按时完成率" min-width="150"></el-table-column>
+            </el-table>
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21">
           <el-pagination
@@ -1341,7 +1377,7 @@
                 <el-table-column  prop="username" :label="$t('screening.employeename')"  >
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.username'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.username}}
@@ -1351,7 +1387,7 @@
                 <el-table-column  prop="departmentName" :label="$t('departmentsuod')" v-if="this.user.timeType.easyExpense==0">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                      <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.departmentName}}
@@ -1418,7 +1454,7 @@
                 <el-table-column prop="username" :label="$t('lable.name')" width="120">
                   <template slot-scope="scope" >
                     <span v-if="user.userNameNeedTranslate == '1'">
-                      <ww-open-data type='userName' :openid='scope.row.username'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.username}}
@@ -1495,6 +1531,50 @@
             <el-button type="primary" @click="setForewarning()" :loading="warningTableLoading">确 定</el-button>
           </span>
         </el-dialog>
+        <!-- 员工任务数据弹窗 -->
+        <el-dialog
+          title="员工任务数据"
+          :visible.sync="showUserTaskDialog"
+          width="80%"
+          top="8.1vh"
+          :before-close="handleClose">
+          <div>
+            <div class="pagingTable">
+              <el-table  border :data="userTaskData" highlight-current-row height="50vh" v-loading="userTasklistLoading" style="width: 100%;" >
+                <el-table-column align="center" prop="executorNames" label="执行人" min-width="150">
+                  <template slot-scope="scope">
+                    <div>
+                      <span v-if="user.userNameNeedTranslate == '1'">
+                        <TranslationOpenDataText type='userName' :openid='scope.row.executorNames'></TranslationOpenDataText>
+                      </span>
+                      <span v-if="user.userNameNeedTranslate != '1'">
+                        {{scope.row.executorNames}}
+                      </span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column align="center" prop="taskName" label="任务名称" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="stateValue" label="当前状态" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="startDate" label="开始日期" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="endDate" label="截止日期" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="finishDate" label="完成日期" min-width="150"></el-table-column>
+              </el-table>
+            </div>
+        
+            <div class="pagingData">
+              <el-pagination
+                  @size-change="usertaskSizeChange"
+                  @current-change="usertaskCurrentChange"
+                  :current-page="userTaskPage"
+                  :page-sizes="[20 , 50 , 80 , 100]"
+                  :page-size="userTaskSize"
+                  layout="total, sizes, prev, pager, next"
+                  :total="userTaskTotal"
+                  style="float:right;"
+              ></el-pagination>
+            </div>
+          </div>
+        </el-dialog>
   </section>
 </template>
 
@@ -1515,12 +1595,12 @@ export default {
   data() {
     return {
       screeningCondition: { // 筛选条件的判断
-        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22], // 项目筛选条件 (不等于)
+        project: [4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 21, 22,28], // 项目筛选条件 (不等于)
         months: [14, 15], // 月份筛选条件 (等于)
         monthRange: [19], // 月份区间筛选条件 (等于)
-        staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26], // 人员筛选条件 (等于)
-        departments: [14, 15, 23,21,26], // 部门筛选条件 (等于)
-        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26], // 时间段筛选条件 (等于)
+        staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26,28], // 人员筛选条件 (等于)
+        departments: [14, 15, 23,21,26,28], // 部门筛选条件 (等于)
+        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28], // 时间段筛选条件 (等于)
       },
       efficentList:[],
       groupNames: [],
@@ -1579,14 +1659,14 @@ export default {
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表', '有效工时率表', '项目分类工时占比表', '分类工时明细表',
-      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务进度表', '项目预估工时表'],
+      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务进度表', '项目预估工时表','员工任务完成情况表'],
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表','有效工时率表', '项目分类工时占比表', '分类工时明细表',
-      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务进度表', '项目预估工时表'],
+      '员工项目进度表', '分组耗用进度表', '项目耗用进度表', '员工任务进度表', '项目预估工时表','员工任务完成情况表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -1630,6 +1710,11 @@ export default {
       groupSize: 20,
       groupTotal: 0,
 
+      //员工任务分页参数
+      userTaskPage:1,
+      userTaskSize:20,
+      userTaskTotal:0,
+
       stateKey: 1,
 
       outputValueList: [],
@@ -1720,6 +1805,11 @@ export default {
       projectEstimatedWorkData: [], // 项目预估工时表
       subUserCustom:[],
       subUserCustomName:null,
+      taskCompletedData:[],
+      showUserTaskDialog:false,
+      userTaskData:[], //员工任务数据列表
+      userTasklistLoading:false,
+      userTaskUserId:null
     };
   },
   computed: {},
@@ -1828,6 +1918,7 @@ export default {
       if(this.permissions.reportProjectConsumptionTwo) {this.ssl(25);this.defaultActive = '1-26';return} else
       if(this.permissions.reportStaffTaskAccomplished) {this.ssl(26);this.defaultActive = '1-27';return} else
       if(this.permissions.reportProjectEstimated) {this.ssl(27);this.reportProjectEstimated = '1-28';return} else
+      if(this.permissions.takCompletedStatus) {this.ssl(28);this.takCompletedStatus = '1-29';return} else
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName,dataItem = [],fields=false){
@@ -2077,6 +2168,18 @@ export default {
                   this.getList(true);
                 }
             },
+            //员工任务弹窗列表分页
+            usertaskSizeChange(val){
+              this.userTaskSize = val;
+              this.userTaskPage = 1
+              this.userTaskData=[]
+              this.getTaskByUserId()
+            },
+            usertaskCurrentChange(val){
+              this.userTaskPage = val;
+              this.userTaskData=[]
+              this.getTaskByUserId()
+            },
             groupSizeChange(val){
               this.groupSize = val
               this.groupPage = 1
@@ -2174,6 +2277,9 @@ export default {
                 if(this.ins == 27) {
                   this.getProjectEstimatedWork()
                 }
+                if(this.ins == 28) {
+                  this.gettaskCompletedData()
+                }
             },
       exportExcel() {
         var url = "/project";
@@ -2372,6 +2478,14 @@ export default {
           fName = '项目预估工时表' + '.xlsx'
           url = "/project/exportProjectEstimatedWorkTime"
           this.proJuctId ? sl.projectId = this.proJuctId : ''
+        }else if(this.ins == 28) {
+          fName = '员工任务完成情况表' + '.xlsx'
+          url = "/task/exportUserTaskCompleteDetail"
+          let dept = this.departmentIdArray[this.departmentIdArray.length - 1]
+          this.userId ? sl.userId = this.userId : ''
+          dept ? sl.deptId = dept : ''
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
         }
           this.http.post(url, sl,
             res => {
@@ -3519,6 +3633,9 @@ export default {
       if(this.ins == 26) {
         this.getTaskCompletionSheet()
       }
+      if(this.ins == 28) {
+        this.gettaskCompletedData()
+      }
     },
     // 任务重启表
     taskRestart() {
@@ -3886,6 +4003,78 @@ export default {
       this.total = data.total
       this.listLoading = false
     },
+    //展示员工任务数据
+    showUserTask(userId){
+        this.showUserTaskDialog=true
+        this.getTaskByUserId(userId)
+    },
+    //获取指定人员的任务数据
+    getTaskByUserId(value){
+      if(value){
+        this.userTaskUserId=value
+      }else{
+        value=this.userTaskUserId
+      }
+      this.userTasklistLoading = true; 
+      let parameter = {
+        pageIndex: this.userTaskPage,
+        pageSize: this.userTaskSize,
+        startDate: this.rangeDatas[0],
+        endDate: this.rangeDatas[1],
+        userId:value
+      }
+      this.http.post('/task/getTaskByUserId',parameter,
+        res => {
+            if (res.code == "ok") {
+                this.userTaskTotal = res.data.total;
+                this.userTaskData = res.data.records
+                this.userTasklistLoading = false; 
+            } else {
+                this.$message({
+                message: res.msg,
+                type: "error"
+                });
+            }
+        },
+        error => {
+            this.$message({
+                message: error,
+                type: "error"
+            });
+        });
+    },
+    // 获取员工任务完成情况表
+    gettaskCompletedData() {
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        startDate: this.rangeDatas[0],
+        endDate: this.rangeDatas[1],
+      }
+      let dept = this.departmentIdArray[this.departmentIdArray.length - 1]
+      this.userId ? parameter.userId = this.userId : ''
+      dept ? parameter.deptId = dept : ''
+      this.listLoading = true
+      this.http.post('/task/userTaskCompleteDetail',parameter,
+        res => {
+            if (res.code == "ok") {
+                this.total = res.data.total;
+                this.taskCompletedData = res.data.records
+                this.listLoading = false; 
+            } else {
+                this.$message({
+                message: res.msg,
+                type: "error"
+                });
+            }
+        },
+        error => {
+            this.$message({
+                message: error,
+                type: "error"
+            });
+        });
+    },
     // 分组耗用进度表
     async getConsumptionSchedule() {
       let parameter = {
@@ -3973,6 +4162,15 @@ export default {
 };
 </script>
 <style scoped>
+.pagingTable {
+  flex: 1 1 0%;
+  overflow: hidden;
+}
+.pagingData {
+  padding-top: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
 .participatingEmployee {
   display: flex;
   flex-wrap: wrap;

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -372,7 +372,7 @@
                     {{ scope.row.ownerName }}
                   </span>
                   <span v-if="user.userNameNeedTranslate == 1">
-                    <ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data>
+                    <TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText>
                   </span>
                 </div>
               </template>
@@ -540,7 +540,7 @@
           <el-table-column v-if="auditTypeItem.auditType == 1" width="172" label="审核人">
             <template slot-scope="scope">
               <span v-if="user.userNameNeedTranslate == 1">
-                <ww-open-data type='userName' :openid='scope.row.projectManagerName'></ww-open-data>
+                <TranslationOpenDataText type='userName' :openid='scope.row.projectManagerName'></TranslationOpenDataText>
               </span>
               <span v-else>{{ scope.row.projectManagerName }}</span>
             </template>
@@ -826,7 +826,7 @@
             <span class="detail-item-title"> <span class="printBox">报销人</span> </span>
             <span class="detail-item-content">
               <span v-if="user.userNameNeedTranslate == 1">
-                <ww-open-data type='userName' :openid='ParticularsList.ownerName'></ww-open-data>
+                <TranslationOpenDataText type='userName' :openid='ParticularsList.ownerName'></TranslationOpenDataText>
               </span>
               <span v-else>{{ ParticularsList.ownerName }}</span>
             </span>

+ 12 - 12
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -169,8 +169,8 @@
                     <span v-if="index>0"><i class="el-icon-right"></i></span>
                     <span><i class="el-icon-s-custom"></i></span>
                     <span v-if="user.userNameNeedTranslate == 1">
-                      <span v-if="item.auditorType == 1"><ww-open-data type='departmentName' :openid='item.auditDeptName' ></ww-open-data>(主要负责人)</span>
-                      <ww-open-data type='userName' :openid='item.userName' v-if="item.auditorType == 2"></ww-open-data>
+                      <span v-if="item.auditorType == 1"><TranslationOpenDataText type='departmentName' :openid='item.auditDeptName' ></TranslationOpenDataText>(主要负责人)</span>
+                      <TranslationOpenDataText type='userName' :openid='item.userName' v-if="item.auditorType == 2"></TranslationOpenDataText>
                     </span>
                     <span v-if="user.userNameNeedTranslate == 0">
                       {{item.auditorType == 1?(item.auditDeptName+'(主要负责人)'):item.userName}}
@@ -239,7 +239,7 @@
                     <div>
                       <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
                       <span v-if="user.userNameNeedTranslate == 1">
-                        <ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText>
                       </span>
                     </div>
                   </template>
@@ -274,7 +274,7 @@
                       <div v-if="scope.row.status == 1" style="color: orange"><span>{{ $t('state.WaitingAudit') }}-</span>
                         <span v-if="user.userNameNeedTranslate != 1">{{scope.row.auditorName}}</span>
                         <span v-if="user.userNameNeedTranslate == 1">
-                          <ww-open-data type='userName' :openid='scope.row.auditorName'></ww-open-data>
+                          <TranslationOpenDataText type='userName' :openid='scope.row.auditorName'></TranslationOpenDataText>
                         </span>
                       </div>
                       <div v-if="scope.row.status == 2" style="color: red">{{ $t('btn.rejected') }}<el-link style="margin-left:5px;" @click="showDenyReason(scope.row.id)">查看原因</el-link></div>
@@ -371,7 +371,7 @@
                 <template slot-scope="scope">
                     <div v-if="scope.row.ownerName">
                       <span v-if="user.userNameNeedTranslate != 1">{{scope.row.ownerName}}</span>
-                      <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.ownerName'></ww-open-data></span>
+                      <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.ownerName'></TranslationOpenDataText></span>
                     </div>
                     <div v-else>
                       <span>{{ $t('Nstatisticpresent') }}</span>
@@ -405,7 +405,7 @@
                   <span class="custom-tree-node" slot-scope="{ node, data }">
                       <!-- <span>{{ node.label }}</span> -->
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                       </span>
                       <span v-else>
                         {{ node.label }}
@@ -422,7 +422,7 @@
                 <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
                   <!-- {{depData.label}} -->
                     <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='depData.label'></TranslationOpenDataText></span>
                   &gt;</span> {{ $t('approvalprocessforleaveofdirect staff') }}
                     <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" content="仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置" placement="top-start">
                     <i class="el-icon-question"></i>
@@ -438,11 +438,11 @@
 
                         <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
                           <!-- {{item.auditDeptName}} -->
-                          <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
+                          <TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText>
                         </el-button>
                         <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
                           <!-- {{item.userName}} -->
-                            <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                         </el-button>
 
                         <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
@@ -531,7 +531,7 @@
                       {{scope.row.userName}}
                     </span>
                     <span v-if="user.userNameNeedTranslate == 1">
-                      <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                      <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                     </span>
                   </div>
                 </template>
@@ -542,7 +542,7 @@
                     {{scope.row.department}}
                   </span>
                   <span v-if="user.userNameNeedTranslate == 1">
-                    <ww-open-data type='departmentName' :openid='scope.row.department'></ww-open-data>
+                    <TranslationOpenDataText type='departmentName' :openid='scope.row.department'></TranslationOpenDataText>
                   </span>
                 </template>
               </el-table-column>
@@ -729,7 +729,7 @@
         <div style="padding:20px 40px 20px 0">
             <el-timeline :reverse="false">
                 <el-timeline-item v-for="item in auditLogList" :key="item.id" :timestamp="item.indate">
-                  <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data> </span>
+                  <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText> </span>
                   <span v-if="user.userNameNeedTranslate == 0">{{item.auditorName}}</span>
                   <span> {{item.isPass==0?"驳回了请假申请。":"审核通过。"}}</span>
                   <span v-if="item.isPass == 0">原因:{{item.denyReason}}</span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/CostBaseline.vue

@@ -57,7 +57,7 @@
                                             {{scope.row.userName}}
                                         </span>
                                         <span v-if="user.userNameNeedTranslate == 1">
-                                            <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                                         </span>
                                     </div>
                                 </template>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/budgetReview.vue

@@ -77,7 +77,7 @@
                 <template slot-scope="scope">
                     <div>
                         <span v-if="user.userNameNeedTranslate == '1'">
-                            <ww-open-data type='userName' :openid='scope.row.creator'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='scope.row.creator'></TranslationOpenDataText>
                         </span>
                         <span v-else>
                             {{ scope.row.creator }}

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -1205,7 +1205,7 @@
                                             + _this.$t('yuan')+"<br/>" : '') + 
                                             ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
                                         } else {
-                                            var res = "<ww-open-data type='departmentName' :openid='"+ _this.allListData.costList[params[0].dataIndex].additionName +"'></ww-open-data>" + "<br/>" + 
+                                            var res = "<TranslationOpenDataText type='departmentName' :openid='"+ _this.allListData.costList[params[0].dataIndex].additionName +"'></TranslationOpenDataText>" + "<br/>" + 
                                             ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
                                             + _this.$t('yuan')+"<br/>" : '') + 
                                             ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/fileCenter.vue

@@ -61,7 +61,7 @@
                     <template slot-scope="scope">
                         <div>
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
-                            <span v-else><ww-open-data type='userName' :openid='scope.row.creatorName'></ww-open-data></span>
+                            <span v-else><TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText></span>
                         </div>
                     </template>
                 </el-table-column>

+ 7 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -48,7 +48,7 @@
                     <el-table-column prop="userName" :label="$t('other.operator')">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.userName}}</span>
                             </div>
                         </template>
@@ -102,7 +102,7 @@
                     <el-table-column prop="userName" :label="$t('other.operator')" width="100">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.userName}}</span>
                             </div>
                         </template>
@@ -189,7 +189,7 @@
             <el-table-column prop="name" :label="$t('lable.name')" sortable width="150" fixed="left">
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
                         <!-- {{scope.row.name}} -->
                     </div>
@@ -271,13 +271,13 @@
         <!--用户详细信息弹出框-->
         <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>{{ $t('lable.name') }}</span>
-                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
                 <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.name}}</span>
             </div>
             <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>{{ $t('lable.department') }}</span>
-                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
                 <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.departmentName}}</span>
             </div>
             <div class="line"><span>{{ $t('costof') }}</span><span>{{userDetail.cost}}{{$t('Yuananhour')}}</span></div>
@@ -318,7 +318,7 @@
             <el-table-column prop="jobNumber" label="工号" sortable ></el-table-column>
             <el-table-column prop="name" label="姓名" >
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
                 </template>
             </el-table-column>
@@ -461,7 +461,7 @@
                     <el-table-column prop="name" :label="$t('lable.name')" sortable width="90" fixed="left">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
                             </div>
                         </template>

+ 8 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -17,7 +17,7 @@
                         <el-col :span="5" ><span class="gray_label">{{ $t('subordinatedepartments') }}:</span></el-col><el-col :span="7" ></el-col>
                         <el-col :span="18" >
                             <span v-if="user.userNameNeedTranslate != 1">{{project.departmentName}}</span>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='project.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='project.departmentName'></TranslationOpenDataText></span>
                         </el-col>
                     </el-row>
                     <el-row :gutter="10">
@@ -120,7 +120,7 @@
                     <div style="margin-top:10px;color:#999;">{{ $t('projectmanager') }}</div>
                     <div><el-link style="margin:10px" @click="showUser(project.inchargerId)">
                         <span v-if="user.userNameNeedTranslate != 1">{{project.inchargerName}}</span>
-                        <span v-else><ww-open-data type='userName' :openid='project.inchargerName'></ww-open-data></span>
+                        <span v-else><TranslationOpenDataText type='userName' :openid='project.inchargerName'></TranslationOpenDataText></span>
                     </el-link></div>
                     <div style="margin-top:10px;color:#999;">{{ user.timeType.reportCc == 1?'日报抄送人':$t('newspaperauditor') }}</div>
                     <div>
@@ -130,7 +130,7 @@
                                 {{item.auditorName}}
                             </span>
                             <span v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText>
                             </span>
                         </el-link>
                     </div>
@@ -139,7 +139,7 @@
                     <div v-show="project.isPublic == 0" >
                         <el-link v-for="item in project.participationList" :key="item.id" style="margin:10px;" @click="showUser(item.id)">
                             <span v-if="user.userNameNeedTranslate != 1">{{item.name}}</span>
-                            <span v-else><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                            <span v-else><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         </el-link>
                         <el-button class="el-icon-plus" @click="addMembVisible=true" size="mini"></el-button>
                     </div>
@@ -275,14 +275,14 @@
         <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <div class="line"><span>{{ $t('lable.name') }}</span>
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
             </div>
             <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>{{ $t('jiao-se') }}</span><span>{{userDetail.roleName}}</span></div>
             <div class="line"><span>{{ $t('lable.department') }}</span>
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
@@ -315,7 +315,7 @@
             <el-table :data="contractRecordData" height="500px" :loading="contractRecordLoading" :default-sort="{prop: 'date', order: 'descending'}">
                 <el-table-column :label="$t('other.operator')" prop="name" min-width="100">
                     <template slot-scope="scope">
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='filterUserContract(scope.row.editUserId)'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='filterUserContract(scope.row.editUserId)'></TranslationOpenDataText></span>
                         <span v-else>{{filterUserContract(scope.row.editUserId)}}</span>
                     </template>
                 </el-table-column>
@@ -570,7 +570,7 @@
                                        <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">
                                             <span v-if="user.userNameNeedTranslate != 1">{{item.membName}}({{item.percentage}}%)</span>
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item.membName'></ww-open-data>({{item.percentage}}%)
+                                                <TranslationOpenDataText type='userName' :openid='item.membName'></TranslationOpenDataText>({{item.percentage}}%)
                                             </span>
                                         </span>
                                        <el-link @click="showEditPpMembs(scope.row)">

+ 15 - 15
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -241,7 +241,7 @@
                             {{scope.row.inchargerName}}
                         </span>
                         <span v-if="user.userNameNeedTranslate == 1">
-                            <ww-open-data type='userName' :openid='scope.row.inchargerName'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='scope.row.inchargerName'></TranslationOpenDataText>
                         </span>
                     </el-link>
                 </template>
@@ -275,7 +275,7 @@
                                         {{par.name}}
                                     </span>
                                     <span v-if="user.userNameNeedTranslate == 1">
-                                        <ww-open-data type='userName' :openid='par.name'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='par.name'></TranslationOpenDataText>
                                     </span>
                                 </el-link>
                             </span>
@@ -286,7 +286,7 @@
                                             {{par.name}}
                                         </span>
                                         <span v-if="user.userNameNeedTranslate == 1">
-                                            <ww-open-data type='userName' :openid='par.name'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='par.name'></TranslationOpenDataText>
                                         </span>
                                     </el-link>
                                 </span>
@@ -299,7 +299,7 @@
                                 {{par.name}}
                             </el-link>
                             <el-link style="margin-right:10px;" type="primary" :underline="false" @click="showUser(par.id)" v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='userName' :openid='par.name'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='par.name'></TranslationOpenDataText>
                             </el-link>
                         </span>
                     </div>
@@ -546,14 +546,14 @@
                             <div slot="content" style="width:780px">
                                 <span v-for="(item, index) in addFormUserNames" :key="index">
                                     <!-- {{item}} -->
-                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                     <span v-if="index < addFormUserNames.length - 1">,</span>
                                 </span>
                             </div>
                             <div @click="showChooseMembTree" style="width: 800px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
                                 <span v-for="(item, index) in addFormUserNames" :key="index">
                                     <!-- {{item}} -->
-                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                     <span v-if="index < addFormUserNames.length - 1">,</span>
                                 </span>
                             </div>
@@ -814,7 +814,7 @@
                                     <template slot-scope="scope">
                                         <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">
                                                 <span v-if="user.userNameNeedTranslate != 1">{{item.membName}}({{item.percentage}}%)</span>
-                                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.membName'></ww-open-data>({{item.percentage}}%)</span>
+                                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.membName'></TranslationOpenDataText>({{item.percentage}}%)</span>
                                             </span>
                                         <el-link @click="showEditPpMembs(scope.row)">{{(scope.row.membList == null || scope.row.membList.length == 0)?$t('professionalparticipants'):$t('setup')}}</el-link>
                                     </template>
@@ -867,7 +867,7 @@
         <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>{{ $t('lable.name') }}</span>
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
             </div>
             <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
@@ -875,7 +875,7 @@
             <div class="line"><span>{{ $t('lable.department') }}</span>
 
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
@@ -1261,10 +1261,10 @@
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-if="node.data.children">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>
-                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="user.userNameNeedTranslate != '1'">
@@ -1359,14 +1359,14 @@
                         <div slot="content" style="width:580px">
                             <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
                                 <!-- {{item}} -->
-                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                 <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
                             </span>
                         </div>
                         <div @click="addGroupPersonP" style="width: 450px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
                             <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
                                 <!-- {{item}} -->
-                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                 <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
                             </span>
                         </div>
@@ -1402,10 +1402,10 @@
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-if="node.data.children">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>
-                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="user.userNameNeedTranslate != '1'">

+ 22 - 22
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -99,7 +99,7 @@
                                 <el-form-item :label="$t('head') + ':'">
                                     <span v-if="user.userNameNeedTranslate != '1'">{{groupDetailData.incharger}}</span>
                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                        <ww-open-data type='userName' :openid='groupDetailData.incharger'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='groupDetailData.incharger'></TranslationOpenDataText>
                                     </span>
                                 </el-form-item>
                                 <el-form-item :label="$t('participantin') + ':'">
@@ -108,7 +108,7 @@
                                             {{item.userName}} 
                                         </span>
                                         <span v-if="user.userNameNeedTranslate == '1'"> 
-                                            <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                         </span>
                                         <span v-if="index < groupDetailData.participators.length - 1">、</span>
                                     </span>
@@ -218,7 +218,7 @@
                                                                     {{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}
                                                                 </span>
                                                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                                                    <ww-open-data type='userName' :openid='exeItem'></ww-open-data>
+                                                                    <TranslationOpenDataText type='userName' :openid='exeItem'></TranslationOpenDataText>
                                                                 </span>
                                                             </span>
                                                             </span>
@@ -303,7 +303,7 @@
                                         </span>
                                         <span v-else>
                                             <span v-for="(item, index) in scope.row.executorName" :key="index">
-                                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                                 <span v-if="index < scope.row.executorName.length - 1">,</span>
                                             </span>
                                         </span>
@@ -376,10 +376,10 @@
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-if="node.data.children">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>
-                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="user.userNameNeedTranslate != '1'">
@@ -520,7 +520,7 @@
                                                         {{item.name}}
                                                     </span>
                                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                                        <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                                        <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                                     </span>
                                                 </span>
                                             </el-checkbox>
@@ -562,7 +562,7 @@
                                                 {{recentProgressInfo.creatorName}}
                                             </span>
                                             <span v-if="user.userNameNeedTranslate == '1'">
-                                                <ww-open-data type='userName' :openid='recentProgressInfo.creatorName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='recentProgressInfo.creatorName'></TranslationOpenDataText>
                                             </span>
                                         </span>
                                         {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
@@ -675,7 +675,7 @@
                                                 </span>
                                                 <span v-else>
                                                     <span v-for="item,index in scope.row.executorName" :key="index">
-                                                        <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                        <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                                         <span v-if="index < scope.row.executorName.length - 1">,</span>
                                                     </span>
                                                 </span>
@@ -724,7 +724,7 @@
                                     <div>
                                         <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
                                         <span v-if="user.userNameNeedTranslate == 1">
-                                            <ww-open-data type='userName' :openid='scope.row.creatorName'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
                                         </span>
                                     </div>
                                 </template>
@@ -799,7 +799,7 @@
                                     <span  v-for="(pl, i) in critic" :key="i">
                                     <span style="background: #778899" v-if="user.userNameNeedTranslate != 1">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
                                     <span v-if="user.userNameNeedTranslate == 1">
-                                        <ww-open-data type='userName' :openid='pl'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='pl'></TranslationOpenDataText>
                                     </span>
                                     </span>
                                     <!-- <span style="background: #778899">{{pl.length}}</span> -->
@@ -826,7 +826,7 @@
                                                 {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
                                             </i>   
                                             <i v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                             </i>
                                         </i>
                                         <div>
@@ -836,14 +836,14 @@
                                                     {{item.userName}}
                                                 </p>
                                                 <p v-if="user.userNameNeedTranslate == 1">
-                                                    <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                                    <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                                 </p>
                                             <!-- </p> -->
                                             <em>
                                                 <!-- {{item.content}} -->
                                                 <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
                                                     {{item.content.msg1}}
-                                                    <ww-open-data type='userName' :openid='item.content.msg2'></ww-open-data>
+                                                    <TranslationOpenDataText type='userName' :openid='item.content.msg2'></TranslationOpenDataText>
                                                     {{item.content.msg3}}
                                                 </p>
                                                 <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content}}</p>
@@ -860,7 +860,7 @@
                                         <p>
                                             {{ $t('tian-bao-ren') }}: <span v-if="user.userNameNeedTranslate != 1">{{item2.userName}}</span>
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item2.userName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item2.userName'></TranslationOpenDataText>
                                             </span>
                                             <span style="float: right;">{{item2.createDate}}</span>
                                         </p>
@@ -872,7 +872,7 @@
                                                             <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
                                                             <span v-if="item2.projectAuditorName != null">(
                                                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                                                    <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                                    <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                                                 </span>
                                                                 <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                                 )</span> 
@@ -883,7 +883,7 @@
                                                             <span v-if="item2.projectAuditorName != null">(
                                                                 <!-- {{item2.projectAuditorName}} -->
                                                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                                                    <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                                    <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                                                 </span>
                                                                 <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                                 )</span>
@@ -893,7 +893,7 @@
                                                     <span v-else-if="item2.isDeptAudit==1">
                                                         ({{$t('other.await')}}
                                                         <span v-if="user.userNameNeedTranslate == '1'">
-                                                            <ww-open-data type='departmentName' :openid='item2.auditDeptName'></ww-open-data>
+                                                            <TranslationOpenDataText type='departmentName' :openid='item2.auditDeptName'></TranslationOpenDataText>
                                                         </span>
                                                         <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
                                                         {{$t('other.audit')}})
@@ -917,7 +917,7 @@
                                                             {{item2.projectAuditorName}}
                                                         </span>
                                                         <span v-if="user.userNameNeedTranslate == 1">
-                                                            <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                            <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
                                                         </span>
                                                     )
                                                 </span>{{$t('other.audit')}}</span>
@@ -1026,7 +1026,7 @@
                                 {{$t('dai-fen-pei')}}
                             </span>
                             <span v-else>
-                                <ww-open-data type='userName' :openid='scope.row.executorName'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='scope.row.executorName'></TranslationOpenDataText>
                             </span>
                         </span>
                     </template>
@@ -1038,13 +1038,13 @@
         <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>{{ $t('lable.name') }}</span>
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
             </div>
             <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>{{ $t('lable.department') }}</span>
                 <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
-                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
             </div>
             <div class="line"><span>{{ $t('costof') }}</span><span>{{userDetail.cost}}{{ $t('Yuananhour') }}</span></div>
             <div slot="footer" class="dialog-footer">

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -92,7 +92,7 @@
           <div>
             <span v-if="user.userNameNeedTranslate == 1">
               <span v-for="(item, index) in scope.row.activeUsers" :key="index">
-                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                 <span v-if="index < scope.row.activeUsers.length - 1">,</span>
               </span>
             </span>

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/project/vueGantt.vue

@@ -4,8 +4,8 @@
         <el-table-column prop="text" label="姓名" width="240" fixed="left" v-if="stafforpro != '按项目查看'">
           <template slot-scope="scope">
               <!-- user.userNameNeedTranslate == 1 -->
-              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'department'"><ww-open-data type='departmentName' :openid='scope.row.text'></ww-open-data></span>
-              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'"><ww-open-data type='userName' :openid='scope.row.text'></ww-open-data></span>
+              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'department'"><TranslationOpenDataText type='departmentName' :openid='scope.row.text'></TranslationOpenDataText></span>
+              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'"><TranslationOpenDataText type='userName' :openid='scope.row.text'></TranslationOpenDataText></span>
               <span v-if="user.userNameNeedTranslate == 1 && (scope.row.translationType == 'null' || scope.row.translationType == null)">{{scope.row.text}}</span>
               <span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
           </template>
@@ -14,8 +14,8 @@
           <template slot-scope="scope">
             <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">
               <span v-for="(item, index) in scope.row.userNameList" :key="index">
-                <!-- <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data> -->
-                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                <!-- <TranslationOpenDataText type='userName' :openid='scope.row.text'></TranslationOpenDataText> -->
+                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                 <span v-if="index < scope.row.userNameList.length - 1">,</span>
               </span>
             </span>
@@ -29,7 +29,7 @@
               <template slot-scope="scope">
                 <div>
                   <!-- <span v-if="scope.row.translationType == 'user' && scope.column.label.indexof(scope.row.end_date) != '-1'">
-                    <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data>
+                    <TranslationOpenDataText type='userName' :openid='scope.row.text'></TranslationOpenDataText>
                   </span> -->
                   <span v-if="scope.row.translationType != 'user' && stafforpro != '按项目查看'">
                     <!-- {{scope.row.end_date | dataValue(scope.column, scope.row)}} -->

+ 11 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/projectApproval/projectApproval.vue

@@ -61,7 +61,7 @@
                                         {{scope.row.inchargerName}}
                                     </span>
                                     <span v-if="user.userNameNeedTranslate == 1">
-                                        <ww-open-data type='userName' :openid='scope.row.inchargerName'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='scope.row.inchargerName'></TranslationOpenDataText>
                                     </span>
                                 </el-link>
                             </template>
@@ -141,14 +141,14 @@
                                         <div slot="content" style="width:780px">
                                             <span v-for="(item, index) in addFormUserNames" :key="index">
                                                 <!-- {{item}} -->
-                                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                                 <span v-if="index < addFormUserNames.length - 1">,</span>
                                             </span>
                                         </div>
                                         <div @click="showChooseMembTree" style="width: 800px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
                                             <span v-for="(item, index) in addFormUserNames" :key="index">
                                                 <!-- {{item}} -->
-                                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                                 <span v-if="index < addFormUserNames.length - 1">,</span>
                                             </span>
                                         </div>
@@ -272,10 +272,10 @@
                                     <span class="custom-tree-node" slot-scope="{ node, data }">
                                         <span v-if="user.userNameNeedTranslate == '1'">
                                             <span v-if="node.data.children">
-                                                <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                                <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                             </span>
                                             <span v-else>
-                                                <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                             </span>
                                         </span>
                                         <span v-if="user.userNameNeedTranslate != '1'">
@@ -296,7 +296,7 @@
                     <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
                         <div class="line"><span>{{ $t('lable.name') +":"}}</span>
                             <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
                         </div>
                         <div class="line"><span>{{ $t('Worknumber') +":"}}</span><span>{{userDetail.jobNumber}}</span></div>
                         <div class="line"><span>{{ $t('lable.phone') +":"}}</span><span>{{userDetail.phone}}</span></div>
@@ -304,7 +304,7 @@
                         <div class="line"><span>{{ $t('lable.department') +":"}}</span>
 
                             <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
                         </div>
                         <div slot="footer" class="dialog-footer">
                             <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
@@ -324,14 +324,14 @@
                                     {{par.userName}}
                                 </span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='userName' :openid='par.userName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='par.userName'></TranslationOpenDataText>
                                 </span>
                                 <span v-if="index < projectApprocalDetail.participationApprovalList.length-1">,</span>
                             </span>
                         </div>
                         <div class="line"><span>{{'项目经理:'}}</span>
                             <span v-if="user.userNameNeedTranslate != 1">{{projectApprocalDetail.inchargerName}}</span>
-                            <span v-if="user.userNameNeedTranslate == 1&&projectApprocalDetail.inchargerName"><ww-open-data type='userName' :openid='projectApprocalDetail.inchargerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1&&projectApprocalDetail.inchargerName"><TranslationOpenDataText type='userName' :openid='projectApprocalDetail.inchargerName'></TranslationOpenDataText></span>
                         </div>
                         <div class="line"><span>{{'日报审核人:'}}</span>
                             <span v-for="(par,index) in projectApprocalDetail.projectApprovalAuditorList" :key="par.auditorId">
@@ -339,7 +339,7 @@
                                     {{par.auditorName}}
                                 </span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='userName' :openid='par.auditorName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='par.auditorName'></TranslationOpenDataText>
                                 </span>
                                 <span v-if="index < projectApprocalDetail.projectApprovalAuditorList.length-1">,</span>
                             </span>
@@ -363,7 +363,7 @@
                         </div>
                         <div class="line" v-for="(item,index) in approvalLogData">
                             <span v-if="user.userNameNeedTranslate != 1">{{item.userName}} {{item.createTime}} {{approvalTypeStr[item.type]}}了日报</span>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.userName'></ww-open-data> {{item.createTime}}{{approvalTypeStr[item.type]}}了日报</span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText> {{item.createTime}}{{approvalTypeStr[item.type]}}了日报</span>
                         </div>
                         <div slot="footer" class="dialog-footer">
                             <el-button type="primary" @click="projectApprovalDetailVisible = false" >{{'关闭'}}</el-button>

+ 11 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -239,7 +239,7 @@
                             <el-tag style="margin:10px 0 0 10px" v-for="item in whiteList" :key="item.id" closable @close="whiteDelete(item)">
                                 <!-- {{item.label}} -->
                                 <span v-if="user.userNameNeedTranslate != '1'">{{item.label}}</span>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.label'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.label'></TranslationOpenDataText></span>
                             </el-tag>
                         </div>
 
@@ -464,7 +464,7 @@
                     <div v-if="user.userNameNeedTranslate != '1'">{{ scope.row.targetDeptsNames }}</div>
                     <div v-else>
                         <span v-for="(v,i) in (scope.row.newDeptName || [])">
-                            <ww-open-data type='departmentName' :openid='v'></ww-open-data>
+                            <TranslationOpenDataText type='departmentName' :openid='v'></TranslationOpenDataText>
                             <span v-if="i < (scope.row.newDeptName || []).length - 1">,</span>
                         </span>
                     </div>
@@ -475,7 +475,7 @@
                     <div v-if="user.userNameNeedTranslate != '1'">{{ scope.row.targetUsersNames }}</div>
                     <div v-else>
                         <span v-for="(v,i) in (scope.row.newDeptName || [])">
-                            <ww-open-data type='userName' :openid='v'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='v'></TranslationOpenDataText>
                             <span v-if="i < (scope.row.newUserName || []).length - 1">,</span>
                         </span>
                     </div>
@@ -515,7 +515,7 @@
                         <div class="contents">
                             <el-tag style="margin:10px 0 0 10px" v-for="(item, index) in specialHolidaysDept.labels" :key="item.id" closable @close="specialHolidaysDelete('specialHolidaysDept', index)">
                                 <span v-if="user.userNameNeedTranslate != '1'">{{item}}</span>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item'></TranslationOpenDataText></span>
                             </el-tag>
                         </div>
                     </div>
@@ -524,7 +524,7 @@
                         <div class="contents">
                             <el-tag style="margin:10px 0 0 10px" v-for="(item, index) in specialHolidaysUser.labels" :key="item.id" closable @close="specialHolidaysDelete('specialHolidaysUser', index)">
                                 <span v-if="user.userNameNeedTranslate != '1'">{{item}}</span>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText></span>
                             </el-tag>
                         </div>
                     </div>
@@ -590,7 +590,7 @@
                         </div>
                         <div v-else>
                             <div v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='departmentName' :openid='scope.row.dname'></ww-open-data>
+                                <TranslationOpenDataText type='departmentName' :openid='scope.row.dname'></TranslationOpenDataText>
                             </div>
                             <div v-else>{{scope.row.dname}}</div>
                         </div>
@@ -636,7 +636,7 @@
                             <span class="custom-tree-node" slot-scope="{ node }">
                                 <span v-if="!user.userNameNeedTranslate == 1">{{ node.label }} </span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                         </el-tree>
@@ -668,10 +668,10 @@
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-if="node.data.children">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>
-                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="user.userNameNeedTranslate != '1'">
@@ -707,10 +707,10 @@
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-if="node.data.children">
-                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>
-                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                                 </span>
                             </span>
                             <span v-if="user.userNameNeedTranslate != '1'">

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -151,7 +151,7 @@
                     <el-table-column prop="departmentName" :label="$t('subordinatedepartments')" sortable width="300" v-if="user.timeType.projectWithDept">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{departmentName}}</span>
                             </div>
                         </template>
@@ -161,7 +161,7 @@
                             <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-for="(item, index) in scope.row.executorNameList" :key="index">
-                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                     <span v-if="index < scope.row.executorNameList.length - 1">,</span>
                                 </span>
                             </span>
@@ -227,13 +227,13 @@
         <!--用户详细信息弹出框-->
         <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>{{ $t('lable.name') }}</span>
-                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
                 <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.name}}</span>
             </div>
             <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>{{ $t('lable.department') }}</span>
-                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='userDetail.name'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='userDetail.name'></TranslationOpenDataText></span>
                 <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.departmentName}}</span>
             </div>
             <div class="line"><span>{{ $t('costof') }}</span><span>{{userDetail.cost}}{{ $t('Yuananhour') }}</span></div>

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -27,7 +27,7 @@
                     <span class="custom-tree-node" style="position: relative;box-sizing: border-box;width: 10%;" slot-scope="{ node }" @mouseleave= mouseleave(data,$event) @mouseover= mouseover(data,$event)>
                         <span style="padding-right: 50px;box-sizing: border-box;overflow:hidden;text-overflow:ellipsis;line-height: 36px; display: inline-block;">
                           <span v-if="user.userNameNeedTranslate == '1'">
-                            <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                            <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                           </span>
                           <span v-else>
                             {{ node.label }} <i v-if="node.data.ddDeptid != null" class="iconfont firerock-icondingding"></i>
@@ -80,8 +80,8 @@
                             <i class="fa fa-pencil-square-o"></i>
                             <!-- {{depData !=null ? depData.label : ''}} -->
                             <span v-if="translation == '1' && user.userNameNeedTranslate == '1'">{{depData != null ?depData.label:""}}</span>
-                            <span v-if="translation == '2' && user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
-                            <span v-if="translation == '3' && user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='depData.label'></ww-open-data></span>
+                            <span v-if="translation == '2' && user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='depData.label'></TranslationOpenDataText></span>
+                            <span v-if="translation == '3' && user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='depData.label'></TranslationOpenDataText></span>
                             <span v-if="user.userNameNeedTranslate != '1'">{{depData != null ?depData.label:""}}</span>
                             <!-- <i class="iconfont firerock-icondingding"></i> -->
                             <!-- {{translation}} -->
@@ -202,7 +202,7 @@
                         <img src="../../assets/image/qiyeweix.png" alt="">
                       </span>
                       <div v-if="user.userNameNeedTranslate == 1">
-                        <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
                       </div>
                       <div v-else>{{scope.row.name}}</div>
                     </div>
@@ -214,7 +214,7 @@
                   <template slot-scope="scope">
                     <div>
                       <div v-if="user.userNameNeedTranslate == 1">
-                        <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                        <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                       </div>
                       <div v-else>{{scope.row.departmentName}}</div>
                     </div>
@@ -224,7 +224,7 @@
                   <template slot-scope="scope">
                     <div>
                       <div v-if="user.userNameNeedTranslate == 1">
-                        <ww-open-data type='userName' :openid='scope.row.superiorCorpwxUserid'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='scope.row.superiorCorpwxUserid'></TranslationOpenDataText>
                       </div>
                       <div v-else>{{scope.row.superiorName}}</div>
                     </div>
@@ -353,7 +353,7 @@
             <el-form ref="depForm" :model="depForm" :rules="depRules" label-width="100px">
                 <el-form-item :label="$t('departmentname')" prop="name">
                     <el-input v-model="depForm.name" :placeholder="$t('peaseenterthe')" clearable style="width: 100%" v-if="user.userNameNeedTranslate != '1'"></el-input>
-                    <div v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='depForm.name'></ww-open-data></div>
+                    <div v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='depForm.name'></TranslationOpenDataText></div>
                 </el-form-item>
 
                 <!-- 主要负责人 -->
@@ -406,7 +406,7 @@
                       <el-input v-model="insertForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="user.userNameNeedTranslate == '1'"></el-input>
                   </el-form-item>
                   <el-form-item :label="$t('lable.name')" prop="name"  v-if="user.userNameNeedTranslate == '1'">
-                      <div><ww-open-data type='userName' :openid='insertForm.name'></ww-open-data></div>
+                      <div><TranslationOpenDataText type='userName' :openid='insertForm.name'></TranslationOpenDataText></div>
                   </el-form-item>
                   <el-form-item :label="$t('phone')" prop="phone">
                       <el-input v-model="insertForm.phone" :placeholder="$t('peaseenterthe')" clearable></el-input>
@@ -537,7 +537,7 @@
             <el-table :data="userSalaryList" highlight-current-row v-loading="listLoading" height="300px" style="width: 100%;">
                 <el-table-column prop="userName" :label="$t('lable.name')" >
                   <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
                     <span v-else>{{scope.row.userName}}</span>
                   </template>
                   
@@ -3631,7 +3631,7 @@ export default {
     //                                 console.log(result, '请求微信成功')
     //                                 console.log(window, 'window')
     //                                 //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-    //                                 window.WWOpenData.bind(document.querySelector('ww-open-data'))
+    //                                 window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
     //                             },
     //                             fail: function (res) {
     //                                 console.log('查看错误信息', res)

+ 45 - 61
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -48,22 +48,10 @@
                                 </el-select>
                             </div>
                             <div>
-                                <!-- <el-tree :data="data" @node-click="handleNodeClick" @node-collapse="nodeChange" @node-expand="nodeChange" node-key="id" :default-expanded-keys="expandDate" v-loading="dataLoading"> -->
                                 <el-tree :data="data" @node-click="handleNodeClick" @node-collapse="nodeChangeCollapse" @node-expand="nodeChangeExpand" ref="treeDataRef" :default-expanded-keys="nodeModelData" node-key="id" v-loading="dataLoading">
                                     <span class="custom-tree-node"  style="position: relative;box-sizing: border-box;width: 10%;" slot-scope="{ node, data}">
-                                        <!-- <span>{{ node.label }}</span> -->
                                         <span style="padding-right: 50px;box-sizing: border-box;overflow:hidden;text-overflow:ellipsis;line-height: 36px; display: inline-block;">
-                                            <span v-if="user.userNameNeedTranslate == '1'">
-                                                <span v-if="node.data.children">
-                                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
-                                                </span>
-                                                <span v-else>
-                                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
-                                                </span>
-                                            </span>
-                                            <span v-if="user.userNameNeedTranslate != '1'">
-                                                {{ node.label }}
-                                            </span>
+                                            <TranslationOpenData :configurationItems="{ openType: node.data.children ? 'departmentName' : 'userName', openId: node.label, renderIndex: 0 }"/>
                                             
                                             <span v-if="data.membCount != null && data.isUser == null">({{data.membCount}})</span>
                                         </span>
@@ -118,8 +106,12 @@
                                     <span v-if="permissions.reportsCompany||user.manageDeptId != 0 || permissions.reportsDept"> | 
                                         <!-- {{depData != null ?depData.label:""}} -->
                                         <span v-if="translation == '1' && user.userNameNeedTranslate == '1'">{{depData != null ?depData.label:""}}</span>
-                                        <span v-if="translation == '2' && user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
-                                        <span v-if="translation == '3' && user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='depData.label'></ww-open-data></span>
+                                        <span v-if="translation == '2' && user.userNameNeedTranslate == '1'">
+                                            <TranslationOpenData :configurationItems="{ openType: 'departmentName', openId: depData.label, renderIndex: 0 }" />
+                                        </span>
+                                        <span v-if="translation == '3' && user.userNameNeedTranslate == '1'">
+                                            <TranslationOpenData :configurationItems="{ openType: 'userName', openId: depData.label, renderIndex: 0 }" />
+                                        </span>
                                         <span v-if="user.userNameNeedTranslate != '1'">{{depData != null ?depData.label:""}}</span>
                                     <span v-if="targetUid == null">
                                     <!-- - 已提交 -->
@@ -158,7 +150,7 @@
                                     <i class="fa fa-circle"></i>
                                     <!-- {{item1.name}} -->
                                     <span v-if="user.userNameNeedTranslate == '1'">
-                                        <ww-open-data type='userName' :openid='item1.name'></ww-open-data>
+                                        <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item1.name, renderIndex: 0 }" />
                                     </span>
                                     <span v-if="user.userNameNeedTranslate != '1'">
                                         {{item1.name}}
@@ -202,10 +194,7 @@
                                                                 <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
                                                                 <span v-if="item2.projectAuditorName != null">(
                                                                     <!-- {{item2.projectAuditorName}} -->
-                                                                    <span v-if="user.userNameNeedTranslate == '1'">
-                                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
-                                                                    </span>
-                                                                    <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
+                                                                    <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
                                                                     )</span> 
                                                                 <!-- 审核 --> {{$t('other.audit')}}
                                                             </span>
@@ -213,10 +202,7 @@
                                                                 <!-- 项目审核人 --> {{$t('other.projectAuditor')}}
                                                                 <span v-if="item2.projectAuditorName != null">(
                                                                     <!-- {{item2.projectAuditorName}} -->
-                                                                    <span v-if="user.userNameNeedTranslate == '1'">
-                                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
-                                                                    </span>
-                                                                    <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
+                                                                    <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
                                                                     )</span>
                                                                 <!-- 审核通过 --> {{$t('state.approved')}}
                                                             </span>
@@ -224,10 +210,7 @@
                                                         <span v-else-if="item2.isDeptAudit==1">
                                                             <!-- {{($t('other.await') +' '+ item2.auditDeptName +' '+ $t('other.audit'))}} -->
                                                             ({{$t('other.await')}}
-                                                            <span v-if="user.userNameNeedTranslate == '1'">
-                                                                <ww-open-data type='departmentName'   :openid='user.timeType.reportAuditType==4?item2.buDepartmentName:item2.auditDeptName'></ww-open-data>
-                                                            </span>
-                                                            <span v-if="user.userNameNeedTranslate != '1'">{{user.timeType.reportAuditType==4?item2.buDepartmentName:item2.auditDeptName}}</span>
+                                                            <TranslationOpenData :configurationItems="{ openType: 'departmentName', openId: user.timeType.reportAuditType==4?item2.buDepartmentName:item2.auditDeptName, renderIndex: 0 }" />
                                                             {{$t('other.audit')}})
                                                         </span>
                                                         ]</span> 
@@ -246,12 +229,13 @@
                                                         <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 0">[ {{$t('other.waitingForDepartmentReview')}} ]</span>
                                                         <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">[ {{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">
                                                             (
-                                                                <span v-if="user.userNameNeedTranslate != 1">
+                                                                <!-- <span v-if="user.userNameNeedTranslate != 1">
                                                                     {{item2.projectAuditorName}}
                                                                 </span>
                                                                 <span v-if="user.userNameNeedTranslate == 1">
-                                                                    <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
-                                                                </span>
+                                                                    <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
+                                                                </span> -->
+                                                                <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
                                                             )
                                                         </span>{{$t('other.audit')}} ]</span>
                                                         <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">[ {{$t('state.alreadyPassed')}} ]</span>
@@ -384,7 +368,7 @@
                         <div class="daitianrbao"  @click="showChooseMembTree" v-if="user.userNameNeedTranslate == 1">
                             <span class="spnn" v-if="workForm.userNames">
                                 <span v-for="(item, index) in workForm.userNames" :key="index">
-                                    <span><ww-open-data type='userName' :openid='item'></ww-open-data></span>
+                                    <span><TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText></span>
                                     <span v-if="index < workForm.userNames.length - 1">,</span>
                                 </span>
                             </span>
@@ -585,7 +569,7 @@
                                 
                                 <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()" v-if="user.userNameNeedTranslate != '1'" style="width:200px;">
                                     <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id">
-                                        <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                        <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                         <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.auditorName}}</span>
                                     </el-option>
                                 </el-select>
@@ -611,7 +595,7 @@
                         <el-form-item :label="$t('other.reviewer')" v-if="user.timeType.reportAuditType == 3">
                             <el-select v-model="domain.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                                 <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
-                                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                     <span v-else>{{item.name}}</span>
                                 </el-option>
                             </el-select>
@@ -620,7 +604,7 @@
                                 <i class="el-icon-right"></i>
                                 <el-select v-model="domain.auditorSec" :placeholder="$t('di-er-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                                     <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
-                                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                         <span v-else>{{item.name}}</span>
                                     </el-option>
                                 </el-select>
@@ -630,7 +614,7 @@
                                 <i class="el-icon-right"></i>
                                 <el-select v-model="domain.auditorThird" :placeholder="$t('di-san-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                                     <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
-                                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                         <span v-else>{{item.name}}</span>
                                     </el-option>
                                 </el-select>
@@ -639,7 +623,7 @@
                         <el-form-item :label="$t('chao-song-ren')" v-if="user.timeType.reportAuditType == 3">
                             <el-select v-model="domain.ccUserid" clearable :disabled="!domain.canEdit" style="width:200px;">
                                 <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
-                                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                     <span v-else>{{item.name}}</span>
                                 </el-option>
                             </el-select>
@@ -807,7 +791,7 @@
                             <el-form-item :label="$t('other.projectAuditor')" >
                                 <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()" v-if="user.userNameNeedTranslate != '1'">
                                     <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id">
-                                        <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                        <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                         <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.auditorName}}</span>
                                     </el-option>
                                 </el-select>
@@ -1244,12 +1228,12 @@
                                 <!-- {{(scope.row.leaveDays || scope.row.leaveTimes) ? scope.row.label + (scope.row.leaveDays ? '(' + $t('other.AskForLeave') +scope.row.leaveDays + $t('time.day') +')' : '(' + $t('other.AskForLeave') + scope.row.leaveTimes + 'h)') : scope.row.label}} -->
                                 <span v-if="scope.row.leaveDays || scope.row.leaveTimes">
                                     <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.label}}</span>
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.label'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.label'></TranslationOpenDataText></span>
                                     <span>{{scope.row.leaveDays ? '(' + $t('other.AskForLeave') +scope.row.leaveDays.toFixed(1) + $t('time.day') +')' : '(' + $t('other.AskForLeave') + scope.row.leaveTimes + 'h)'}}</span>
                                 </span>
                                 <span v-else>
                                     <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.label}}</span>
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.label'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.label'></TranslationOpenDataText></span>
                                 </span>
                             </span>
                         </template>
@@ -1257,7 +1241,7 @@
                     <el-table-column prop="deptName" :label="$t('lable.department')" >
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='scope.row.deptName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.deptName}}</span>
                             </div>
                         </template>
@@ -1272,19 +1256,19 @@
                             <!-- <span>{{(scope.row.leaveDays || scope.row.leaveTimes) ? scope.row.label + (scope.row.leaveDays ? '(' + leaveTypeName[scope.row.leaveType] + ')' : '(' + leaveTypeName[scope.row.leaveType] + ')') : scope.row.label}}</span> -->
                             <span v-if="scope.row.leaveDays || scope.row.leaveTimes">
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.label}}</span>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.label'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.label'></TranslationOpenDataText></span>
                                 <span>{{scope.row.leaveDays.toFixed(1) ? '(' + leaveTypeName[scope.row.leaveType] + ')' : '(' + leaveTypeName[scope.row.leaveType] + ')'}}</span>
                             </span>
                             <span v-else>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.label}}</span>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.label'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.label'></TranslationOpenDataText></span>
                             </span>
                         </template>
                     </el-table-column>
                     <el-table-column prop="deptName" :label="$t('lable.department')" >
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='scope.row.deptName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.deptName}}</span>
                             </div>
                         </template>
@@ -1297,7 +1281,7 @@
             <el-table-column prop="label" :label="$t('lable.name')" >
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.label'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.label'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.label}}</span>
                     </div>
                 </template>
@@ -1305,7 +1289,7 @@
             <el-table-column prop="deptName" :label="$t('lable.department')" >
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='scope.row.deptName'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.deptName}}</span>
                     </div>
                 </template>
@@ -1335,10 +1319,10 @@
                     <span class="custom-tree-node" slot-scope="{ node }">
                         <span v-if="user.userNameNeedTranslate == '1'">
                             <span v-if="node.data.children">
-                                <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                             </span>
                             <span v-else>
-                                <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
                             </span>
                         </span>
                         <span v-if="user.userNameNeedTranslate != '1'">
@@ -1426,7 +1410,7 @@
             <el-table-column width="105" prop="name" fixed="left" :label="$t('lable.name')">
                 <template slot-scope="scope">
                     <span :style="scope.row.worktimeList.length==0?'color:red':''">
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != 1">{{scope.row.name}}</span>
                         <!-- {{scope.row.name}} -->
                     </span>
@@ -1434,7 +1418,7 @@
             </el-table-column>
             <el-table-column prop="departmentName" fixed="left" :label="$t('lable.department')">
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != 1">{{scope.row.departmentName}}</span>
                 </template>
             </el-table-column>
@@ -1596,13 +1580,13 @@
           >
             <el-table-column min-width="150" :label="$t('lable.department')" prop="department">
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.department'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='scope.row.department'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != 1">{{scope.row.department}}</span>
                 </template>
             </el-table-column>
             <el-table-column min-width="150" prop="name" :label="$t('lable.name')" >
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != 1">{{scope.row.name}}</span>
                 </template>
             </el-table-column>
@@ -1692,14 +1676,14 @@
 
             <el-table-column width="160" prop="name" fixed="left" :label="$t('lable.name')">
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != 1">{{scope.row.name}}</span>
                         <!-- {{scope.row.name}} -->
                 </template>
             </el-table-column>
             <el-table-column prop="departmentName" width="170" fixed="left" :label="$t('lable.department')">
                 <template slot-scope="scope">
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText></span>
                     <span v-if="user.userNameNeedTranslate != 1">{{scope.row.departmentName}}</span>
                 </template>
             </el-table-column>
@@ -1789,7 +1773,7 @@
                     <el-table-column prop="userName" :label="$t('other.operator')">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != 1">{{scope.row.userName}}</span>
                             </div>
                         </template>
@@ -1866,7 +1850,7 @@
                 <el-table-column prop="username" :label="$t('screening.employeename')"  >
                     <template slot-scope="scope">
                         <div>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.username'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText></span>
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.username}}</span>
                         </div>
                     </template>
@@ -1874,7 +1858,7 @@
                 <el-table-column prop="departmentName" label="部门"  >
                     <template slot-scope="scope">
                         <div>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText></span>
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.departmentName}}</span>
                         </div>
                     </template>
@@ -1941,7 +1925,7 @@
                 <span>请选择员工:</span>
                 <el-select v-model="deleteReportParam.userIds" placeholder="请选择" style="width:500px;" filterable multiple>
                     <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id">
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         <span v-else>{{item.name}}</span>
                     </el-option>
                 </el-select>
@@ -1989,7 +1973,7 @@
                     v-model="modImportUserId"
                     >
                     <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id">
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         <span v-else>{{item.name}}</span>
                     </el-option>
                 </el-select>    
@@ -2035,7 +2019,7 @@
                 <el-table-column prop="username" :label="$t('screening.employeename')"   width="80px" fixed="left">
                     <template slot-scope="scope">
                         <div>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.username'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='scope.row.username'></TranslationOpenDataText></span>
                             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.username}}</span>
                         </div>
                     </template>
@@ -2078,7 +2062,7 @@
                         <!-- {{item.msg}} -->
                         <span v-if="user.userNameNeedTranslate != 1">{{item.msg}}</span>
                         <span v-if="user.userNameNeedTranslate == 1">
-                            <span><ww-open-data type='userName' :openid='item.msgCon.one'></ww-open-data></span>
+                            <span><TranslationOpenDataText type='userName' :openid='item.msgCon.one'></TranslationOpenDataText></span>
                             <span>{{item.msgCon.two}}</span>
                         </span>
                     </el-timeline-item>

+ 15 - 15
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -14,7 +14,7 @@
                 <el-form-item :label="'填报人'" style="width: 210px">
                     <el-select v-if="user.userNameNeedTranslate != '1'" v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
                         <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id">
-                            <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                            <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                             <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.name}}</span>
                         </el-option>
                     </el-select>
@@ -26,7 +26,7 @@
                 <el-form-item :label="'审核人'" style="width: 210px">
                     <el-select v-if="user.userNameNeedTranslate != '1'" v-model="search.auditUserId" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="usersSearch(false)" size="mini" style="width: 150px" collapse-tags>
                         <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id">
-                            <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                            <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                             <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.name}}</span>
                         </el-option>
                     </el-select>
@@ -92,14 +92,14 @@
                                                     <span v-if="item.projectAuditState==0">
                                                         {{ $t('other.waitForTheProjectReviewer') }}<span v-if="item.projectAuditorName != null">(
                                                             <!-- {{item.projectAuditorName}} -->
-                                                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                                             <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
                                                             )</span>{{ $t('other.audit') }}
                                                     </span>
                                                     <span style="color:#32CD32;" v-else-if="item.projectAuditState==1">
                                                         {{ $t('other.projectAuditor') }}<span v-if="item.projectAuditorName != null">(
                                                             <!-- {{item.projectAuditorName}} -->
-                                                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                                             <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
                                                         )</span>{{ $t('state.approved') }}
                                                     </span>
@@ -107,9 +107,9 @@
                                                 <span v-else-if="item.isDeptAudit==1">
                                                     <!-- {{($t('other.await') +item.auditDeptName+('('+item.deptAuditorName+')')+ $t('other.audit'))}} -->
                                                     ({{$t('other.await')}}
-                                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data></span>
+                                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText></span>
                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item.auditDeptName}}</span>
-                                                    (<span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.deptAuditorName'></ww-open-data></span>
+                                                    (<span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.deptAuditorName'></TranslationOpenDataText></span>
                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item.deptAuditorName}}</span>)
                                                     {{$t('other.audit')}})
                                                 </span>
@@ -192,7 +192,7 @@
                 <template slot-scope="scope">
                     <div>
                         <span v-if="user.userNameNeedTranslate == '1'">
-                            <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
                         </span>
                         <span v-else>
                             {{scope.row.name}}
@@ -204,7 +204,7 @@
                 <template slot-scope="scope">
                     <div>
                         <span v-if="user.userNameNeedTranslate == '1'">
-                            <ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data>
+                            <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
                         </span>
                         <span v-else>
                             {{scope.row.departmentName}}
@@ -239,8 +239,8 @@
                             <span v-if="scope.row.isDeptAudit==0">{{$t('other.Tobereviewedbytheprojectreviewer')}}</span>
                             <span v-else>
                                 {{$t('other.await')}}
-                                <ww-open-data type='departmentName' :openid='scope.row.auditDeptName'></ww-open-data>
-                                (<ww-open-data type='userName' :openid='scope.row.deptAuditorName'></ww-open-data>)
+                                <TranslationOpenDataText type='departmentName' :openid='scope.row.auditDeptName'></TranslationOpenDataText>
+                                (<TranslationOpenDataText type='userName' :openid='scope.row.deptAuditorName'></TranslationOpenDataText>)
                                 {{$t('other.audit')}}
                             </span>
                         </span>
@@ -298,7 +298,7 @@
                         <template slot-scope="scope">
                             <div>
                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                    <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                                 </span>
                                 <span v-else>{{scope.row.userName}}</span>
                             </div>
@@ -316,7 +316,7 @@
                                         <span v-for="(item, index) in scope.row.membdateList" :key="index">
                                             <!-- {{item.userName}} -->
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                             </span>
                                             <span v-if="user.userNameNeedTranslate != 1">
                                                 {{item.userName}}
@@ -328,7 +328,7 @@
                                         <span v-for="(item, index) in scope.row.membdateList" :key="index">
                                             <!-- {{item.userName}} -->
                                             <span v-if="user.userNameNeedTranslate == 1">
-                                                <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                             </span>
                                             <span v-if="user.userNameNeedTranslate != 1">
                                                 {{item.userName}}
@@ -342,7 +342,7 @@
                                     <span v-for="(item, index) in scope.row.membdateList" :key="index">
                                         <!-- {{item.userName}} -->
                                         <span v-if="user.userNameNeedTranslate == 1">
-                                            <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                                            <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
                                         </span>
                                         <span v-if="user.userNameNeedTranslate != 1">
                                             {{item.userName}}
@@ -397,7 +397,7 @@
                         <template slot-scope="scope">
                             <div>
                                 <span v-if="user.userNameNeedTranslate == '1'">
-                                    <ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText>
                                 </span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.userName}}</span>
                                 <!-- {{scope.row.userName}} -->

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_department.vue

@@ -72,7 +72,7 @@
             <el-table-column prop="name" label="姓名" sortable>
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
                     </div>
                 </template>

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_import.vue

@@ -111,7 +111,7 @@
                 <template slot-scope="scope">
                     <div>
                         <span v-if="user.userNameNeedTranslate == '1'">
-                            <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                            <TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText>
                         </span>
                         <span v-if="user.userNameNeedTranslate != '1'">
                             {{scope.row.name}}
@@ -173,7 +173,7 @@
                     <el-table-column prop="userName" :label="$t('other.operator')" width="150">
                         <template slot-scope="scope">
                             <div>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.userName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.userName'></TranslationOpenDataText></span>
                                 <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.userName}}</span>
                             </div>
                         </template>
@@ -187,14 +187,14 @@
                                     <el-popover placement="top" width="400" trigger="hover">
                                     <div>
                                         <span v-for="(item, index) in scope.row.membdateList" :key="index">
-                                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></span>
+                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText></span>
                                             <span v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</span>
                                             /{{item.createDate}} <span v-if="scope.row.membdateList.length > 1 && scope.row.membdateList.length - 1 != index">,</span>
                                         </span>
                                     </div>
                                     <div slot="reference" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 180px;">
                                         <span v-for="(item, index) in scope.row.membdateList" :key="index">
-                                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></span>
+                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText></span>
                                             <span v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</span>
                                             /{{item.createDate}} <span v-if="scope.row.membdateList.length > 1 && scope.row.membdateList.length - 1 != index">,</span>
                                         </span>
@@ -203,7 +203,7 @@
                                 </div>
                                 <div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 180px;" v-else>
                                     <span v-for="(item, index) in scope.row.membdateList" :key="index">
-                                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></span>
+                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText></span>
                                         <span v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</span>
                                         /{{item.createDate}} <span v-if="scope.row.membdateList.length > 1 && scope.row.membdateList.length - 1 != index">,</span>
                                     </span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_profession.vue

@@ -79,7 +79,7 @@
             <el-table-column prop="name" label="姓名" sortable>
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='scope.row.name'></TranslationOpenDataText></span>
                         <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
                     </div>
                 </template>

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/weeklyCustomization.vue

@@ -52,11 +52,11 @@
                     <el-table-column prop="projectAuditorId" label="审批人" width="160">
                         <template slot-scope="scope">
                             <!-- <span v-if="user.userNameNeedTranslate != '1'">{{ scope.row.projectAuditorName }}</span>
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                    :openid='scope.row.projectAuditorName'></ww-open-data></span> -->
+                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                    :openid='scope.row.projectAuditorName'></TranslationOpenDataText></span> -->
                             <span v-if="user.userNameNeedTranslate != '1'">{{ auditorNameFun(scope.row) }}</span>
                             <span v-if="user.userNameNeedTranslate == '1'">
-                                <ww-open-data type='userName' :openid='auditorNameFun(scope.row)'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='auditorNameFun(scope.row)'></TranslationOpenDataText>
                             </span>
                         </template>
                     </el-table-column>

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workflow/report.vue

@@ -15,7 +15,7 @@
                     <span class="custom-tree-node" slot-scope="{ node, data }">
                         <!-- <span>{{ node.label }}</span> -->
                         <span v-if="user.userNameNeedTranslate == '1'">
-                          <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                          <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
                         </span>
                         <span v-else>
                           {{ node.label }}
@@ -30,7 +30,7 @@
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
                 <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
                     <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='depData.label'></TranslationOpenDataText></span>
                     &gt;</span> {{ $t('workinghoursapprovalprocessofdirectstaff') }}
                     <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" :content="$t('onlyapplicabletotheimmediatestaffofthecurrentdepartment')" placement="top-start">
                     <i class="el-icon-question"></i>
@@ -47,7 +47,7 @@
                         <el-button type="primary" v-if="item.isDeptAudit == 1" @click="editNodeDialog(index, item)">
                             <span v-if="user.userNameNeedTranslate != 1">{{item.auditDeptName}}</span>
                             <span v-if="user.userNameNeedTranslate == 1">
-                                <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
+                                <TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText>
                             </span>
                         </el-button>
                         <el-button type="primary" v-if="item.isDeptAudit == 0" >{{ $t('other.projectAuditor') }}</el-button>

+ 91 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/components/translationOpenDataText.vue

@@ -0,0 +1,91 @@
+<template>
+    <div class="translation">
+        <!-- 文本 -->
+        <span v-if="corporateWeChat">
+            <ww-open-data :type='type' :openid='openIdValue'></ww-open-data>
+        </span>
+        <span v-else-if="dingdingPlatform">
+            <dt-open-data :open-type='type' :open-id='openIdValue'></dt-open-data>
+        </span>
+        <span v-else>{{ openIdValue }}</span>
+    </div>
+</template>
+
+<script>
+
+export default {
+    name: '',
+    components: {},
+    props: {
+        type: {
+            type: String,
+            default: 'userName'
+        },
+        openid: {
+            type: [String, Number],
+            default: ''
+        }
+    },
+    data() {
+        return {
+            // user: JSON.parse(sessionStorage.getItem("user")),
+            user: JSON.parse(localStorage.getItem("userInfo")),
+            corporateWeChat: false, // 企业微信转译
+            dingdingPlatform: false, // 钉钉转译
+
+            openIdValue: ''
+        }
+    },
+    computed: {},
+    watch: {
+        openid: {
+            handler(newVal, oldVal) {
+                this.assignmentValue(newVal)
+            },
+        }
+    },
+    created() { },
+    mounted() {
+        this.dealWith()
+    },
+    methods: {
+        dealWith() {
+            console.log(this.user)
+            const { userNameNeedTranslate, dingdingUserid } = this.user
+            if (userNameNeedTranslate) {
+                this.corporateWeChat = true
+                if (dingdingUserid) {
+                    this.dingdingPlatform = true
+                    this.corporateWeChat = false
+                } else {
+                    this.dingdingPlatform = false
+                }
+            } else {
+                this.corporateWeChat = false
+                this.dingdingPlatform = false
+            }
+            // console.log(this.corporateWeChat, this.dingdingPlatform, this.configurationItems)
+            // console.log(this.corporateWeChat, '<=== 企业微信转译')
+            // console.log(this.dingdingPlatform, '<=== 钉钉转译')
+            this.assignmentValue(this.openid)
+        },
+        assignmentValue(value) {
+            this.openIdValue = value
+            if (this.user.dingdingUserid) {
+                this.viewConfiguration()
+            }
+        },
+        viewConfiguration() {
+            setTimeout(() => {
+                window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
+            }, 100);
+        }
+    },
+}
+</script>
+<style scoped>
+.translation {
+    width: auto;
+    display: inline-block;
+}
+</style>

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/main.js

@@ -46,6 +46,9 @@ Vue.config.productionTip = false;
 import * as echarts from 'echarts';
 Vue.prototype.$echarts = echarts;
 
+import TranslationOpenDataText from '@/components/translationOpenDataText.vue'
+Vue.component('TranslationOpenDataText', TranslationOpenDataText)
+
 // 富文本
 import 'font-awesome/css/font-awesome.css' 
 import VueHtml5Editor from 'vue-html5-editor'

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/audit/audit.vue

@@ -5,7 +5,7 @@
         <div class="lis" v-for="item in list" :key="item.id">
             <div class="lis_til">
                 <p>
-                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                     <span v-else>{{item.name}}</span>
                     <span style="margin-left:30px;">{{item.date}}</span>
                 </p>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/count/count.vue

@@ -90,11 +90,11 @@
         <template v-else>
             <van-cell v-for="item in showList" :key="item.id" title-style="color:#666">
                 <template #title>
-                    <div style="text-align:left;margin-left:0.42667rem;" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></div>
+                    <div style="text-align:left;margin-left:0.42667rem;" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></div>
                     <div style="text-align:left;margin-left:0.42667rem;" v-else>{{item.name}}</div>
                 </template>
                 <template #default>
-                    <div style="text-align:right;margin-right:0.42667rem;" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item.department'></ww-open-data></div>
+                    <div style="text-align:right;margin-right:0.42667rem;" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item.department'></TranslationOpenDataText></div>
                     <div style="text-align:right;margin-right:0.42667rem;" v-else>{{item.department}}</div>
                 </template>
                 <template #label>

+ 16 - 16
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -8,8 +8,8 @@
                     :value="fillingAgent.name" :label="'代填人员'" placeholder="请选择代填人员"
                     @click="auditorShow = true">
                     <template #input>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                :openid='fillingAgent.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                :openid='fillingAgent.name'></TranslationOpenDataText></span>
                         <span v-else>{{ fillingAgent.name }}</span>
                     </template>
                 </van-field>
@@ -153,8 +153,8 @@
                             :value="item.projectAuditorName" :label="user.companyId == 781 ? '审核人' : '项目审核人'"
                             placeholder="请选择审核人" @click="clickPickAuditor(index, item)">
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                        :openid='item.projectAuditorName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                        :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.projectAuditorName }}</span>
                             </template>
                         </van-field>
@@ -162,8 +162,8 @@
                             <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName"
                                 @confirm="choseAuditor" @cancel="item.showPickerAuditor = false; $forceUpdate();">
                                 <template #option="item">
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                            :openid='item.auditorName'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                            :openid='item.auditorName'></TranslationOpenDataText></span>
                                     <span v-else>{{ item.auditorName }}</span>
                                 </template>
                             </van-picker>
@@ -175,8 +175,8 @@
                         <van-field readonly clickable label="第一审核人" @click="auditorClick(index, 'auditorFirst')">
                             <template #input>
                                 <span v-if="!item.auditorFirst"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                        :openid='item.auditorFirst.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                        :openid='item.auditorFirst.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.auditorFirst.name }}</span>
                             </template>
                         </van-field>
@@ -184,8 +184,8 @@
                             v-if="user.timeType.auditLevel > 1">
                             <template #input>
                                 <span v-if="!item.auditorSec"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                        :openid='item.auditorSec.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                        :openid='item.auditorSec.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.auditorSec.name }}</span>
                             </template>
                         </van-field>
@@ -193,16 +193,16 @@
                             v-if="user.timeType.auditLevel > 2">
                             <template #input>
                                 <span v-if="!item.auditorThird"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                        :openid='item.auditorThird.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                        :openid='item.auditorThird.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.auditorThird.name }}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="抄送人" @click="auditorClick(index, 'ccUserid')">
                             <template #input>
                                 <span v-if="!item.ccUserid"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                        :openid='item.ccUserid.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                        :openid='item.ccUserid.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.ccUserid.name }}</span>
                             </template>
                         </van-field>
@@ -216,8 +216,8 @@
                             <van-radio-group v-model="auditor.item">
                                 <van-radio v-for="uitem in auditor.searchList" :key="uitem.id" :name="uitem"
                                     style="padding:10px">
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName'
-                                            :openid='uitem.name'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                            :openid='uitem.name'></TranslationOpenDataText></span>
                                     <span v-else>{{ uitem.name ? uitem.name : '' }}</span>
                                 </van-radio>
                             </van-radio-group>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-01.vue

@@ -88,7 +88,7 @@
                         :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人" 
                     @click="clickPickAuditor(index, item)">
                         <template #input>
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                             <span v-else>{{item.projectAuditorName}}</span>
                         </template>
                     </van-field>
@@ -96,7 +96,7 @@
                         <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
                         @cancel="item.showPickerAuditor = false;$forceUpdate();">
                             <template #option="item">
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorName}}</span>
                             </template>
                         </van-picker>
@@ -109,28 +109,28 @@
                     <van-field readonly clickable label="第一审核人" @click="auditorClick(index,'auditorFirst')">
                         <template #input>
                             <span v-if="!item.auditorFirst"></span>
-                            <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorFirst.name'></ww-open-data></span>
+                            <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorFirst.name'></TranslationOpenDataText></span>
                             <span v-else>{{item.auditorFirst.name}}</span>
                         </template>
                     </van-field>
                     <van-field readonly clickable label="第二审核人" @click="auditorClick(index,'auditorSec')" v-if="user.timeType.auditLevel > 1">
                         <template #input>
                             <span v-if="!item.auditorSec"></span>
-                            <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorSec.name'></ww-open-data></span>
+                            <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorSec.name'></TranslationOpenDataText></span>
                             <span v-else>{{item.auditorSec.name}}</span>
                         </template>
                     </van-field>
                     <van-field readonly clickable label="第三审核人" @click="auditorClick(index,'auditorThird')" v-if="user.timeType.auditLevel > 2">
                         <template #input>
                             <span v-if="!item.auditorThird"></span>
-                            <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorThird.name'></ww-open-data></span>
+                            <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorThird.name'></TranslationOpenDataText></span>
                             <span v-else>{{item.auditorThird.name}}</span>
                         </template>
                     </van-field>
                     <van-field readonly clickable label="抄送人" @click="auditorClick(index,'ccUserid')">
                         <template #input>
                             <span v-if="!item.ccUserid"></span>
-                            <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ccUserid.name'></ww-open-data></span>
+                            <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.ccUserid.name'></TranslationOpenDataText></span>
                             <span v-else>{{item.ccUserid.name}}</span>
                         </template>
                     </van-field>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-02.vue

@@ -102,7 +102,7 @@
                             :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人" 
                         @click="clickPickAuditor(index, item)">
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                 <span v-else>{{item.projectAuditorName}}</span>
                             </template>
                         </van-field>
@@ -110,7 +110,7 @@
                             <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
                             @cancel="item.showPickerAuditor = false;$forceUpdate();">
                                 <template #option="item">
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                     <span v-else>{{item.auditorName}}</span>
                                 </template>
                             </van-picker>
@@ -123,28 +123,28 @@
                         <van-field readonly clickable label="第一审核人" @click="auditorClick(index,'auditorFirst')">
                             <template #input>
                                 <span v-if="!item.auditorFirst"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorFirst.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorFirst.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorFirst.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第二审核人" @click="auditorClick(index,'auditorSec')" v-if="user.timeType.auditLevel > 1">
                             <template #input>
                                 <span v-if="!item.auditorSec"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorSec.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorSec.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorSec.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第三审核人" @click="auditorClick(index,'auditorThird')" v-if="user.timeType.auditLevel > 2">
                             <template #input>
                                 <span v-if="!item.auditorThird"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorThird.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorThird.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorThird.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="抄送人" @click="auditorClick(index,'ccUserid')">
                             <template #input>
                                 <span v-if="!item.ccUserid"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ccUserid.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.ccUserid.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.ccUserid.name}}</span>
                             </template>
                         </van-field>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit-03.vue

@@ -107,7 +107,7 @@
                             :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人"  :disabled="item.state<=1"
                         @click="clickPickAuditor(index, item)">
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                 <span v-else>{{item.projectAuditorName}}</span>
                             </template>
                         </van-field>
@@ -115,7 +115,7 @@
                             <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
                             @cancel="item.showPickerAuditor = false;$forceUpdate();">
                                 <template #option="item">
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                     <span v-else>{{item.auditorName}}</span>
                                 </template>
                             </van-picker>
@@ -128,28 +128,28 @@
                         <van-field readonly clickable label="第一审核人" @click="auditorClick(index,'auditorFirst')">
                             <template #input>
                                 <span v-if="!item.auditorFirst"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorFirst.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorFirst.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorFirst.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第二审核人" @click="auditorClick(index,'auditorSec')" v-if="user.timeType.auditLevel > 1">
                             <template #input>
                                 <span v-if="!item.auditorSec"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorSec.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorSec.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorSec.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第三审核人" @click="auditorClick(index,'auditorThird')" v-if="user.timeType.auditLevel > 2">
                             <template #input>
                                 <span v-if="!item.auditorThird"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorThird.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorThird.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorThird.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="抄送人" @click="auditorClick(index,'ccUserid')">
                             <template #input>
                                 <span v-if="!item.ccUserid"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ccUserid.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.ccUserid.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.ccUserid.name}}</span>
                             </template>
                         </van-field>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -114,7 +114,7 @@
                             :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人"  :disabled="item.state<=1"
                         @click="clickPickAuditor(index, item)">
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
                                 <span v-else>{{item.projectAuditorName}}</span>
                             </template>
                         </van-field>
@@ -122,7 +122,7 @@
                             <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
                             @cancel="item.showPickerAuditor = false;$forceUpdate();">
                                 <template #option="item">
-                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                     <span v-else>{{item.auditorName}}</span>
                                 </template>
                             </van-picker>
@@ -135,28 +135,28 @@
                         <van-field readonly clickable label="第一审核人" @click="auditorClick(index,'auditorFirst')">
                             <template #input>
                                 <span v-if="!item.auditorFirst"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorFirst.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorFirst.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorFirst.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第二审核人" @click="auditorClick(index,'auditorSec')" v-if="user.timeType.auditLevel > 1">
                             <template #input>
                                 <span v-if="!item.auditorSec"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorSec.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorSec.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorSec.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="第三审核人" @click="auditorClick(index,'auditorThird')" v-if="user.timeType.auditLevel > 2">
                             <template #input>
                                 <span v-if="!item.auditorThird"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorThird.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.auditorThird.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.auditorThird.name}}</span>
                             </template>
                         </van-field>
                         <van-field readonly clickable label="抄送人" @click="auditorClick(index,'ccUserid')">
                             <template #input>
                                 <span v-if="!item.ccUserid"></span>
-                                <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ccUserid.name'></ww-open-data></span>
+                                <span v-else-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.ccUserid.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.ccUserid.name}}</span>
                             </template>
                         </van-field>

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/applyLeave.vue

@@ -26,7 +26,7 @@
                 <!-- 请假人 -->
                 <van-field v-model="editForm.ownerId" label="请假人" @click="ownerIdShow = true" :readonly="!canExamine" clickable required :rules="[{ required: true, message: '请选择请假人' }]">
                     <template #input>
-                        <span v-if="user.userNameNeedTranslate == 1 && formshowText.name"><ww-open-data type='userName' :openid='formshowText.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1 && formshowText.name"><TranslationOpenDataText type='userName' :openid='formshowText.name'></TranslationOpenDataText></span>
                         <span v-else>{{formshowText.name}}</span>
                     </template>
                 </van-field>
@@ -34,7 +34,7 @@
                     <div style="minHeight:300px;">
                         <van-radio-group v-model="userRadio" v-if="user.userNameNeedTranslate == '1'">
                             <van-radio v-for="item in userList" :key="item.id" :name="item" class="userCheckbox">
-                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                             </van-radio>
                         </van-radio-group>
                         <van-radio-group v-model="userRadio" v-else>
@@ -93,7 +93,7 @@
                 <van-collapse-item v-for="item in leaveList" :key="item.id" title="标题1" :name="item.id">
                     <template #title>
                         <div class="collapse_label_l">请假人:
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.ownerName}}</span>
                         </div>
                         <div class="collapse_label_r">电话:{{item.tel}}</div>
@@ -120,7 +120,7 @@
                 <van-collapse-item v-for="item in auditList" :key="item.id" title="标题2" :name="item.id">
                     <template #title>
                         <div class="collapse_label_l">请假人:
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.ownerName}}</span>
                         </div>
                         <div class="collapse_label_r">电话:{{item.tel}}</div>
@@ -153,7 +153,7 @@
                 <van-collapse-item v-for="item in dingDingLeaveQtList" :key="item.id" title="标题2" :name="item.id">
                     <template #title>
                         <div class="collapse_label_l">员工姓名:
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                             <span v-else>{{item.name}}</span>
                         </div>
                         <div class="collapse_label_r">总额度:{{item.quotaInDays}}天</div>

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/awayOffice.vue

@@ -78,7 +78,7 @@
                 <van-collapse-item v-for="item in leaveList" :key="item.id" title="标题1" :name="item.id">
                     <template #title>
                         <div class="collapse_label_l">人员:
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.ownerName}}</span>
                         </div>
                         <div class="collapse_label_r">天数:{{item.dayCount}}</div>
@@ -105,7 +105,7 @@
                     <van-collapse-item v-for="item in auditList" :key="item.id" title="标题2" :name="item.id">
                         <template #title>
                             <div class="collapse_label_l">人员:
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                                 <span v-else>{{item.ownerName}}</span>
                             </div>
                             <div class="collapse_label_r">天数:{{item.dayCount}}</div>
@@ -141,7 +141,7 @@
                 <van-collapse-item v-for="item in leaveList" :key="item.id" title="标题1" :name="item.id">
                     <template #title>
                         <div class="collapse_label_l">人员:
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.ownerName}}</span>
                         </div>
                         <div class="collapse_label_r">天数:{{item.dayCount}}天</div>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/exaLeave/exaLeave.vue

@@ -17,7 +17,7 @@
                         <div class="text_left">申请人</div>
                         <div class="text_right">
                             {{item.ownerName}}
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ownerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.ownerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.ownerName}}</span>
                         </div>
                     </div>
@@ -25,7 +25,7 @@
                         <div class="text_left">所在部门</div>
                         <div class="text_right">
                             {{item.dept}}
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item.dept'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item.dept'></TranslationOpenDataText></span>
                             <span v-else>{{item.dept}}</span>
                         </div>
                     </div>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/details.vue

@@ -11,22 +11,22 @@
                 required
             >
                 <template #input>
-                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='formshowText.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='formshowText.name'></TranslationOpenDataText></span>
                     <span v-else>{{formshowText.name}}</span>
                 </template>
             </van-field>
             <div v-if="auditTypeItem.auditType == 2">
                 <van-field label="第一审核人" @click="ownerIdShowCli(2)" readonly clickable required :disabled="editForm.reviewProcess > 0">
                     <template #input>
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                :openid='firstCheckerText.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                :openid='firstCheckerText.name'></TranslationOpenDataText></span>
                         <span v-else>{{ firstCheckerText.name }}</span>
                     </template>
                 </van-field>
                 <van-field label="第二审核人" @click="ownerIdShowCli(3)" readonly clickable required :disabled="editForm.reviewProcess > 1">
                     <template #input>
-                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                :openid='secondCheckerText.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                :openid='secondCheckerText.name'></TranslationOpenDataText></span>
                         <span v-else>{{ secondCheckerText.name }}</span>
                     </template>
                 </van-field>
@@ -212,7 +212,7 @@
                     <van-field
                         label="审核人" v-if="item.projectManagerName">
                         <template #input>
-                            <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.projectManagerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.projectManagerName'></TranslationOpenDataText></span>
                             <span v-else>{{item.projectManagerName}}</span>
                         </template>
                     </van-field>

+ 16 - 16
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue

@@ -13,23 +13,23 @@
                     <!-- 报销人 -->
                     <van-field label="报销人" @click="ownerIdShowCli(1)" readonly clickable required>
                         <template #input>
-                            <span v-if="user.userNameNeedTranslate == 1 && formshowText.name"><ww-open-data type='userName'
-                                    :openid='formshowText.name'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == 1 && formshowText.name"><TranslationOpenDataText type='userName'
+                                    :openid='formshowText.name'></TranslationOpenDataText></span>
                             <span v-else>{{ formshowText.name }}</span>
                         </template>
                     </van-field>
                     <div v-if="auditTypeItem.auditType == 2">
                         <van-field label="第一审核人" @click="ownerIdShowCli(2)" readonly clickable required>
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='firstCheckerText.name'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='firstCheckerText.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ firstCheckerText.name }}</span>
                             </template>
                         </van-field>
                         <van-field label="第二审核人" @click="ownerIdShowCli(3)" readonly clickable required>
                             <template #input>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='secondCheckerText.name'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='secondCheckerText.name'></TranslationOpenDataText></span>
                                 <span v-else>{{ secondCheckerText.name }}</span>
                             </template>
                         </van-field>
@@ -40,9 +40,9 @@
                                 <van-radio-group v-model="userRadio" v-if="user.userNameNeedTranslate == '1'">
                                     <div v-for="item in userList" :key="item.id">
                                         <van-radio :name="item" class="popupItem marginNone borderNone" v-if="item.id != user.id || ownerIdShowType == 1">
-                                            <!-- <ww-open-data type='userName' :openid='item.name'></ww-open-data> -->
+                                            <!-- <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText> -->
                                             <span class="userNameClass_left">
-                                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                                <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                             </span>
                                             <span class="userNameClass_right">
                                                 {{ item.jobNumber }}
@@ -198,8 +198,8 @@
                         <template #title>
                             <div class="collapse_label_l">票据编号:{{ item.code }}</div>
                             <div class="collapse_label_r">报销人:
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='item.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='item.ownerName'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.ownerName }}</span>
                             </div>
                             <div class="collapse_label_l">金额: ¥{{ item.totalAmount | numtosum }}</div>
@@ -210,8 +210,8 @@
                             <div><span>票据编号:</span><span>{{ item.code }}</span></div>
                             <div><span>金额:</span><span>¥{{ item.totalAmount | numtosum }}</span></div>
                             <div><span>报销人:</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='item.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='item.ownerName'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.ownerName }}</span>
                             </div>
                             <div><span>填报日期:</span><span>{{ item.createDate }}</span></div>
@@ -239,8 +239,8 @@
                         <template #title>
                             <div class="collapse_label_l">票据编号:{{ item.code }}</div>
                             <div class="collapse_label_r">报销人:
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='item.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='item.ownerName'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.ownerName }}</span>
                             </div>
                             <div class="collapse_label_l">金额: ¥{{ item.totalAmount | numtosum }}</div>
@@ -267,8 +267,8 @@
                             <div><span>票据编号:</span><span>{{ item.code }}</span></div>
                             <div><span>金额:</span><span>¥{{ item.totalAmount | numtosum }}</span></div>
                             <div><span>报销人:</span>
-                                <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName'
-                                        :openid='item.ownerName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName'
+                                        :openid='item.ownerName'></TranslationOpenDataText></span>
                                 <span v-else>{{ item.ownerName }}</span>
                             </div>
                             <div><span>填报日期:</span><span>{{ item.createDate }}</span></div>

+ 19 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -107,11 +107,29 @@
             if(this.jobNumberCheckCompanyId.includes(companyId) && !jobNumber) {
                 this.$router.push("/editPerfect");
             }
+
+            if(this.user.dingdingUserid) {
+                this.setDDOpenData()
+            }
         },
         components: {
             Footer
         },
         methods: {
+            setDDOpenData() {
+                const ddUrl = new URL(window.location.href);
+                const ddCorpid = ddUrl.searchParams.get("corpid") || ''
+                let ddOpenDataInit = window.DTOpenData.init(ddCorpid)
+                console.log(ddOpenDataInit, '<=== 钉钉执行 window.DTOpenData.init(ddCorpid) 的判断')
+                if (ddOpenDataInit) {
+                    setTimeout(() => {
+                        console.log('<==== 执行 window.DTOpenData.update(document.querySelectorAll(dt-open-data))')
+                        window.DTOpenData.update(document.querySelectorAll('dt-open-data'));
+                    }, 300)
+                }else {
+                    console.log('钉钉没有触发')
+                }
+            },
             pfdClick(item) {
                 if(item.name == '使用说明') {
                     let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
@@ -304,7 +322,7 @@
                                             // console.log(result, '请求微信成功')
                                             // console.log(window, 'window')
                                             //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-                                            window.WWOpenData.bind(document.querySelector('ww-open-data'))
+                                            window.WWOpenData.bind(document.querySelector('TranslationOpenDataText'))
                                             // that.kefuShow = true
                                         },
                                         fail: function (res) {

+ 12 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

@@ -177,6 +177,13 @@
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
             },
+            tryDingDingUrlRedirect() {
+                let currentAddress = window.location.href+'?ddLoginUnique=true';
+                let ddFixedPrefix = 'http://auth.dingtalk.com/login?redirectUri='
+                let ddFixedUrl = 'https://login.dingtalk.com/oauth2/auth?response_type=code&client_id=dingwa4tibze6jwz7mgv&scope=openid&state=dddd&redirect_uri=' + encodeURIComponent(`${ddFixedPrefix}${currentAddress}`)
+                window.location.href = ddFixedUrl;
+                // window.location.href = window.location.href+'?ddLoginUnique=true';
+            },
             loginByUserId(userId) {
                 this.$axios.get("/user/loginByUserId", {params:{userId:userId}})
                     .then(res => {
@@ -291,6 +298,11 @@
                     } else {
                         //检查环境,如果是钉钉有$CORPID$
                         if(href.indexOf("corpid") > 0) {
+                            if(!(window.location.href.indexOf("ddLoginUnique") > 0)) {
+                                this.tryDingDingUrlRedirect()
+                                return
+                            }
+
                             var key = '?corpid=';
                             var jumpkey = '&jumpto=';
                             var url = location.href;

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/msg/index.vue

@@ -9,7 +9,7 @@
                 <template #title>
                     <span v-if="user.userNameNeedTranslate == 1 && item.msg != null && item.msg.indexOf('$userName=') != -1">
                         <span>{{item.msg1}}</span>
-                        <ww-open-data type='userName' :openid='item.msg2'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='item.msg2'></TranslationOpenDataText>
                         <span>{{item.msg3}}</span>
                     </span>
                     <span v-else-if="item.msg != null">{{item.msg}}</span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -5,7 +5,7 @@
             <div class="beijin"></div>
             <div class="flex aic users pixed" style="width:50%;">
                 <img :src="require('../../../assets/img/personal/userHead.png')" class="imege" />
-                <span class="f16 fff ml-20" v-if="userInfo.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='userInfo.name'></ww-open-data></span>
+                <span class="f16 fff ml-20" v-if="userInfo.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='userInfo.name'></TranslationOpenDataText></span>
                 <span class="f16 fff ml-20" v-else>{{userInfo.name}} </span>
             </div>
         </header>

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/edit.vue

@@ -72,7 +72,7 @@
                 <span v-if="projectDetail.auditorList.length > 0">
                     <span v-for="(items, indexs) in projectDetail.auditorList" :key="indexs">
                         <span v-if="user.userNameNeedTranslate != '1'">{{items.auditorName}}</span>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='items.auditorName'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='items.auditorName'></TranslationOpenDataText></span>
                         <span v-if="projectDetail.auditorList.length - 1 > indexs">,</span>
                     </span>
                 </span>
@@ -83,7 +83,7 @@
                 <van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
                 <div style="minHeight:300px;">
                 <template v-if="user.userNameNeedTranslate == '1'">
-                    <van-checkbox class="userCheckbox" v-for="(item) in dailyUserList" :key="item.id" v-model="item.isChecked" ><ww-open-data type='userName' :openid='item.name'></ww-open-data></van-checkbox>
+                    <van-checkbox class="userCheckbox" v-for="(item) in dailyUserList" :key="item.id" v-model="item.isChecked" ><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></van-checkbox>
                 </template>
                 <template v-else>
                     <van-checkbox class="userCheckbox" v-for="(item) in dailyUserList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
@@ -98,7 +98,7 @@
                 <span v-if="!projectDetail.userNames"></span>
                 <span v-else-if="user.userNameNeedTranslate == '1'">
                     <span v-for="item,index in projectDetail.userNames.split(',')" :key="item">
-                        <ww-open-data type='userName' :openid='item'></ww-open-data>
+                        <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                         <span v-if="index != (projectDetail.userNames.split(',').length - 1)">,</span>
                     </span>
                 </span>
@@ -109,7 +109,7 @@
                 <van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
                 <div style="minHeight:300px;">
                 <template v-if="user.userNameNeedTranslate == '1'">
-                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" ><ww-open-data type='userName' :openid='item.name'></ww-open-data></van-checkbox>
+                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" ><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></van-checkbox>
                 </template>
                 <template v-else>
                     <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
@@ -120,7 +120,7 @@
         <!-- 项目经理 -->
         <van-field label="项目经理" @click="editProjectMan ? inchargerShow = true : ''" readonly clickable :disabled="!editProjectMan">
             <template #input>
-                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='projectDetail.inchargerName'></ww-open-data></span>
+                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='projectDetail.inchargerName'></TranslationOpenDataText></span>
                 <span v-else>{{projectDetail.inchargerName}}</span>
             </template>
         </van-field>
@@ -133,7 +133,7 @@
                 @cancel="inchargerShow = false"
                 >
                 <template #option="item">
-                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                     <span v-else>{{item.name}}</span>
                 </template>
                 </van-picker>

+ 5 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -54,7 +54,7 @@
                         <template #input>
                             <span v-if="user.userNameNeedTranslate == '1'">
                                 <span v-for="item,index in form.userNames.split(',')" :key="item">
-                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                     <span v-if="index != (form.userNames.split(',').length - 1)">,</span>
                                 </span>
                             </span>
@@ -64,7 +64,7 @@
                     <van-field readonly clickable  v-model="form.inchargerName"  label="项目经理" 
                     placeholder="请选择项目经理" @click="showPickerIncharger = true">
                         <template #input>
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='form.inchargerName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='form.inchargerName'></TranslationOpenDataText></span>
                             <span v-else>{{form.inchargerName}}</span>
                         </template>
                     </van-field>
@@ -78,7 +78,7 @@
                 <!-- <van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
                 <div style="minHeight:300px;">
                 <template v-if="user.userNameNeedTranslate == '1'">
-                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" ><ww-open-data type='userName' :openid='item.name'></ww-open-data></van-checkbox>
+                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" ><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></van-checkbox>
                 </template>
                 <template v-else>
                     <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
@@ -94,7 +94,7 @@
                         <div class="popupConBox" v-if="user.userNameNeedTranslate == '1'">
                             <van-checkbox class="popupItem marginNone borderNone" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >
                                 <span class="userNameClass_left">
-                                    <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                    <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                 </span>
                                 <span class="userNameClass_right">
                                     {{ item.jobNumber }}
@@ -118,7 +118,7 @@
             <van-popup v-model="showPickerIncharger" position="bottom">
                 <van-picker show-toolbar :columns="inchargerUserList" value-key="name" @confirm="choseIncharger" @cancel="showPickerIncharger = false">
                     <template #option="item">
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         <span v-else>{{item.name}}</span>
                     </template>
                 </van-picker>

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue

@@ -37,7 +37,7 @@
                             <van-col span="7">所属部门:</van-col>
                             <van-col span="17">
                                 <span v-if="user.userNameNeedTranslate != 1">{{projectDetail.departmentName}}</span>
-                                <span v-else><ww-open-data type='departmentName' :openid='projectDetail.departmentName'></ww-open-data></span>
+                                <span v-else><TranslationOpenDataText type='departmentName' :openid='projectDetail.departmentName'></TranslationOpenDataText></span>
                             </van-col>
                         </van-row>
                     </van-cell>
@@ -152,7 +152,7 @@
                             <van-col span="7">项目经理:</van-col>
                             <van-col span="17">
                                 <span v-if="user.userNameNeedTranslate != 1">{{projectDetail.inchargerName}}</span>
-                                <span v-else><ww-open-data type='userName' :openid='projectDetail.inchargerName'></ww-open-data></span>
+                                <span v-else><TranslationOpenDataText type='userName' :openid='projectDetail.inchargerName'></TranslationOpenDataText></span>
                             </van-col>
                         </van-row>
                     </van-cell>
@@ -163,7 +163,7 @@
                                 <span v-for="item,index in projectDetail.auditorList" :key="item.id">
                                     <span v-if="index != 0">,</span>
                                     <span v-if="user.userNameNeedTranslate != 1">{{item.auditorName}}</span>
-                                    <span v-else><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                    <span v-else><TranslationOpenDataText type='userName' :openid='item.auditorName'></TranslationOpenDataText></span>
                                 </span>
                             </van-col>
                             <van-col span="17" v-else>-</van-col>
@@ -176,7 +176,7 @@
                                 <span v-for="item,index in projectDetail.participationList" :key="item.id">
                                     <span v-if="index != 0">,</span>
                                     <span v-if="user.userNameNeedTranslate != 1">{{item.name}}</span>
-                                    <span v-else><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                    <span v-else><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                 </span>
                             </van-col>
                         </van-row>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/department_list.vue

@@ -5,7 +5,7 @@
             <van-skeleton  v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
                 <van-panel class="one_report" :title="item.name" status="待部门审核">
                     <template #header>
-                        <span class="report_name" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span class="report_name" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         <span class="report_name" v-else>{{item.name}}</span>
                     </template>
                     <div class="form_text">

+ 7 - 7
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -17,7 +17,7 @@
                     <template #default>
                         <span v-if="user.userNameNeedTranslate == '1'">
                             <span v-for="item,index in userNameValue.split(',')" :key="item">
-                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                 <span v-if="index != (userNameValue.split(',').length - 1)">,</span>
                             </span>
                         </span>
@@ -29,7 +29,7 @@
                     <div style="minHeight:300px;">
                         <template v-if="user.userNameNeedTranslate == '1'">
                             <van-checkbox class="userCheckbox" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >
-                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                             </van-checkbox>
                         </template>
                         <template v-else>
@@ -48,7 +48,7 @@
                             <div class="popupConBox" v-if="user.userNameNeedTranslate == '1'">
                                 <van-checkbox class="popupItem marginNone borderNone" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >
                                     <span class="userNameClass_left">
-                                        <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                        <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
                                     </span>
                                     <span class="userNameClass_right">
                                         {{ item.jobNumber }}
@@ -83,7 +83,7 @@
                         <div class="van-cell van-panel__header">
                             <div class="van-cell__title" style="display:flex;algin-items:center">
                                 <van-checkbox v-model="item.checked" @click="itemChecked" shape="square" style="margin-right:2vw"></van-checkbox>
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                                 <span v-else>{{item.name}}</span>
                             </div>
                             <div class="van-cell__value van-panel__header-value">{{item.state==0?(user.company.packageEngineering == 1 ? (item.data[0].departmentAuditState==-1?'待专业审核': (item.data[0].departmentAuditState==0?'待部门审核': '待项目经理审核')) : '待审核'):item.state==1?'已通过':'已驳回'}}</div>
@@ -104,20 +104,20 @@
                             <span v-if="item1.isDeptAudit==0">
                                 <span v-if="item1.projectAuditState==0">
                                     待项目审核人<span v-if="item1.projectAuditorName != null">(
-                                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item1.projectAuditorName'></ww-open-data></span>
+                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
                                         <span v-else>{{item1.projectAuditorName}}</span>
                                     )</span>审核
                                 </span>
                                 <span style="color:#32CD32;" v-else-if="item1.projectAuditState==1">
                                     项目审核人<span v-if="item1.projectAuditorName != null">(
-                                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item1.projectAuditorName'></ww-open-data></span>
+                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
                                         <span v-else>{{item1.projectAuditorName}}</span>
                                     )</span>审核通过
                                 </span>
                             </span>
                             <span v-else-if="item1.isDeptAudit==1">
-                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item1.auditDeptName'></ww-open-data></span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item1.auditDeptName'></TranslationOpenDataText></span>
                                 <span v-else>{{item1.auditDeptName}}</span>
                                 审核
                             </span>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/profession_list.vue

@@ -6,7 +6,7 @@
             <van-skeleton  v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
                 <van-panel class="one_report" :title="item.name" status="待专业审核">
                     <template #header>
-                        <span class="report_name" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span class="report_name" v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText></span>
                         <span class="report_name" v-else>{{item.name}}</span>
                     </template>
                     <div class="form_text">

+ 0 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/editask.vue


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff