|
@@ -384,19 +384,24 @@ const searchTreeClick = async () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//确认关联
|
|
//确认关联
|
|
-const linksRelateModalSave = () => {
|
|
|
|
- if(checkrelationId.value.length>0){
|
|
|
|
|
|
+const linksRelateModalSave =async () => {
|
|
let idarr=[]
|
|
let idarr=[]
|
|
checkrelationId.value.forEach((item)=>{
|
|
checkrelationId.value.forEach((item)=>{
|
|
idarr.push(item.primaryKeyId)
|
|
idarr.push(item.primaryKeyId)
|
|
})
|
|
})
|
|
checkrelationString.value=idarr.toString()
|
|
checkrelationString.value=idarr.toString()
|
|
- linksRelateModal.value = false
|
|
|
|
- }
|
|
|
|
- linksRelateModal.value = false
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ const { error, code, data } = await dataApi.projectpositionSubmit({
|
|
|
|
+ id: dataId,
|
|
|
|
+ projectposition:checkrelationString.value,
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success('操作成功')
|
|
|
|
+ linksRelateModal.value = false
|
|
|
|
+ }else {
|
|
|
|
+ window.$message?.warning(error)
|
|
|
|
+ linksRelateModal.value = false
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
const linksRelateModalClose = () => {
|
|
const linksRelateModalClose = () => {
|
|
linksRelateModal.value = false
|
|
linksRelateModal.value = false
|
|
@@ -560,11 +565,23 @@ const linksSampleTableSelection = (rows) => {
|
|
}
|
|
}
|
|
|
|
|
|
//保存关联
|
|
//保存关联
|
|
-const linksSampleModalSave = () => {
|
|
|
|
|
|
+const linksSampleModalSave =async () => {
|
|
const rows = tableSampleCheckedKeys.value
|
|
const rows = tableSampleCheckedKeys.value
|
|
|
|
|
|
listItemBaseData.value.sampleIds = rowsToId(rows) || '';
|
|
listItemBaseData.value.sampleIds = rowsToId(rows) || '';
|
|
- tableSampleRef.value?.clearSelection();
|
|
|
|
|
|
+ console.log( rowsToId(rows),' rowsToId(rows)');
|
|
|
|
+ const { error, code, data } = await dataApi.rawMaterialSubmit({
|
|
|
|
+ id: dataId,
|
|
|
|
+ sampleIds:rowsToId(rows) || '',
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success('操作成功')
|
|
|
|
+ tableSampleRef.value?.clearSelection();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ window.$message?.warning(error)
|
|
|
|
+ }
|
|
|
|
+
|
|
tableSampleCheckedKeys.value = [];
|
|
tableSampleCheckedKeys.value = [];
|
|
linksSampleModal.value = false
|
|
linksSampleModal.value = false
|
|
|
|
|