Przeglądaj źródła

fis: 修复js 值判断问题

tanzx 18 godzin temu
rodzic
commit
91981dbc83

+ 3 - 3
src/views/position/positionManagement/components/PositionEditDialog.vue

@@ -869,7 +869,7 @@ export default {
     },
     departmentOptions() {
       return this.departments.filter(
-        (item) => item.legalId === this.form.legalId,
+        (item) => String(item.legalId) === String(this.form.legalId),
       );
     },
     availableSalaryTemplates() {
@@ -1596,9 +1596,9 @@ export default {
           item.id !== this.form.id,
       );
       const department = this.departments.find(
-        (item) => item.id === this.form.deptId,
+        (item) => String(item.id) === String(this.form.deptId),
       );
-      if (!department || department.legalId !== this.form.legalId) {
+      if  (!department || String(department.legalId) !== String(this.form.legalId))) {
         errors.push({
           message: "所属部门必须存在且属于当前法人",
           module: "basic",