|
@@ -11,6 +11,7 @@
|
|
<script setup name="SELECT">
|
|
<script setup name="SELECT">
|
|
import { ref, onMounted, computed, watch } from 'vue';
|
|
import { ref, onMounted, computed, watch } from 'vue';
|
|
import { request } from '@/utils/request.js';
|
|
import { request } from '@/utils/request.js';
|
|
|
|
+import { getPersonInfoByUserId } from '@/api/sop.js';
|
|
|
|
|
|
const API_TYPE1_IDS = [
|
|
const API_TYPE1_IDS = [
|
|
'region_coordinator_id_1',
|
|
'region_coordinator_id_1',
|
|
@@ -62,6 +63,25 @@ const getOptions = async () => {
|
|
value: item.userId,
|
|
value: item.userId,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
+ let chooseValueArr = isMultiple.value
|
|
|
|
+ ? [...valueData.value]
|
|
|
|
+ : [valueData.value];
|
|
|
|
+ for (let i = 0; i < chooseValueArr.length; i++) {
|
|
|
|
+ let value = chooseValueArr[i];
|
|
|
|
+ if (!options.value.find((item) => item.userId === value)) {
|
|
|
|
+ let personInfo = await getPersonInfoByUserId(value);
|
|
|
|
+ if (
|
|
|
|
+ personInfo &&
|
|
|
|
+ !options.value.find((item) => item.value == personInfo.userId)
|
|
|
|
+ ) {
|
|
|
|
+ options.value.push({
|
|
|
|
+ label: `${personInfo.name}(${personInfo.archivesRoleName})_${personInfo.supplierName}_${personInfo.mobileNumber}`,
|
|
|
|
+ value: personInfo.userId,
|
|
|
|
+ disabled: true,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|