Jelajahi Sumber

fix:bom加版本,料箱等级和物料关联

lupeng 1 tahun lalu
induk
melakukan
b4e18ed3e5

+ 2 - 1
src/api/system/skill/index.ts

@@ -47,8 +47,9 @@ export function addEmployeeSkill(data: Object) {
  */
 export function getSkillDetail(id: String) {
   return request({
-    url: "/api/v1/sys/employeeSkill/add",
+    url: "/api/v1/sys/employeeSkill/get/"+id,
     method: "get",
 
   });
 }
+

+ 24 - 4
src/views/base/skill/components/edit-skill.vue

@@ -49,7 +49,7 @@ import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 import SingleUpload from "@/components/Upload/SingleUpload.vue";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-import {getPostSkill,addEmployeeSkill} from "@/api/system/skill";
+import {getPostSkill,addEmployeeSkill,getSkillDetail} from "@/api/system/skill";
 // 数据字典相关
 const { dicts } = useDictionaryStoreHook();
 
@@ -57,6 +57,7 @@ const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
 };
+const data3=ref([]);
 const data2=ref(null);
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
@@ -79,10 +80,30 @@ const ctableRef = ref(null); //crudRef.value 获取avue-crud对象
 const router = useRouter();
 onMounted(() => {
   // console.log("crudRef", crudRef)
- //postIdSkill.value.postId=
-  dataNoPageList();
+  nextTick(async () => {
+    await step1();
+    await step2();
+  })
+
+
+
+
 
 });
+const step1=()=>{
+  return new Promise((getSkillDetail)=>{
+    getSkillDetail(props.skillId).then(
+      (data)=>{
+        postIdSkill.value.postId=data.data.postId;
+      }
+    );
+  })
+}
+const step2=()=>{
+  return new Promise((dataNoPageList)=>{
+    dataNoPageList();
+  })
+}
 const skillChange=(row)=>{
   if(skillValue.value!==undefined&&skillValue.value!==null&&skillValue.value!==""){
     data.value[row.$index].skillDictValue=skillValue.value;
@@ -114,7 +135,6 @@ const onHandle=()=>{
     });
     return false;
   }
-  console.info("data",data.value);
   if(data.value.length===0){
     ElMessage({
       message: "没有要保存的打分项",