|
@@ -6,7 +6,6 @@
|
|
|
:disabled="!config.writable"
|
|
|
filterable
|
|
|
@change="emitChange"
|
|
|
- :keys="keys"
|
|
|
></t-select>
|
|
|
</template>
|
|
|
<script setup name="SELECT">
|
|
@@ -26,12 +25,10 @@ const isMultiple = computed(() => {
|
|
|
});
|
|
|
|
|
|
const options = ref([]);
|
|
|
-const keys = ref({ label: 'label', value: 'value' });
|
|
|
const getOptionsApi = () => {
|
|
|
let dataGrid = props.config?.dataGrid;
|
|
|
if (props.config?.formId === 'engineer_users_id_1') {
|
|
|
dataGrid = dataGrid.replace('#{id}', props.sop?.crmDetailId);
|
|
|
- keys.value = { label: 'name', value: 'userId' };
|
|
|
}
|
|
|
return request({
|
|
|
url: dataGrid,
|
|
@@ -52,6 +49,14 @@ const getOptions = async () => {
|
|
|
const data = await getOptionsApi();
|
|
|
console.log('data', data);
|
|
|
options.value = data || [];
|
|
|
+ if (props.config?.formId === 'engineer_users_id_1') {
|
|
|
+ options.value = options.value.map((item) => {
|
|
|
+ return {
|
|
|
+ label: `${item.name}_${item.supplierName}`,
|
|
|
+ value: item.userId,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|