Explorar el Código

fix: 修改考核模版处新增回显问题

username hace 2 semanas
padre
commit
fd41e284fe

+ 1 - 1
src/views/draw/children/department/componements/seach.vue

@@ -141,7 +141,7 @@ const handClickInit3 = value => {
           </el-select>
         </div>
         <div class="flex mr-2">
-          <div class="text-sm leading-8 mr-3">科</div>
+          <div class="text-sm leading-8 mr-3">科主任</div>
           <el-tree-select
             v-model="dataList.params.deptCode"
             :data="dataList.deptList"

+ 2 - 2
src/views/draw/children/health/componements/seach.vue

@@ -86,7 +86,7 @@ const handClickInit3 = value => {
     const selectedItem = dataList.magList.find(
       item => item.groupCode === value
     );
-    init.assessmentName = selectedItem.groupName;
+    init.deptName = selectedItem.groupName;
   }
   $emit("handClick", {
     ...dataList.params,
@@ -138,7 +138,7 @@ const handClickInit3 = value => {
         <div class="flex mr-2">
           <div class="text-sm leading-8 mr-3">医疗组</div>
           <el-select
-            v-model="dataList.params.assessmentModelId"
+            v-model="dataList.params.deptCode"
             clearable
             filterable
             placeholder="请选择"

+ 3 - 2
src/views/draw/children/health/healthDrank.vue

@@ -51,6 +51,7 @@ const getPersonDimensionChartsListApi = async (
   });
 
   if (code == 200) {
+    console.log("触发事件", data);
     if (data.length > 0) {
       data.dimensionList.map(item => {
         dataList.dimName.push({
@@ -89,8 +90,8 @@ const getPersonDimensionChartsRankingApi = async (
 const init = item => {
   seachParams.value = item;
   getPersonDimensionChartsListApi();
-  getPersonDimensionChartsRankingApi();
-  getChartsListApi();
+  // getPersonDimensionChartsRankingApi();
+  // getChartsListApi();
   barDimEchartsRef.value.init(seachParams.value, 0);
 };
 // 维度表格

+ 2 - 3
src/views/evaluate/children/change/manage.vue

@@ -95,8 +95,8 @@ const saveCopy = async () => {
     ElMessage.success("复制成功");
     dialogVisibleCopy.value = false;
     getAssessmentPageListApi();
-  } else {
-    ElMessage.error(msg);
+    // } else {
+    //   ElMessage.error(msg);
   }
 };
 </script>
@@ -136,7 +136,6 @@ const saveCopy = async () => {
         <el-table
           :data="params.tableData"
           style="width: 100%"
-          max-height="250"
           @row-click="handleRowClick"
         >
           <el-table-column prop="name" label="考核名称" width="300" fixed />

+ 26 - 18
src/views/evaluate/children/change/manage/addExam.vue

@@ -35,9 +35,7 @@ const form = reactive({
   ]
 });
 const rules = reactive({
-  name: [
-    { required: true, message: "Please input Activity name", trigger: "blur" }
-  ]
+  name: [{ required: true, message: "请输入考核名称", trigger: "blur" }]
 });
 const formLeftRules = reactive({
   left: [{ required: true, message: "请选择考核指标", trigger: "blur" }],
@@ -63,6 +61,7 @@ const saveDepartment = async () => {
   form.cycleValue = dayjs(form.cycleValue).format(format.value);
   //
   console.log("form", dayjs(form.cycleValue).format(format.value));
+  console.log(form, "获取的数据");
   const { code, msg } = await postAddAssessment(form);
   if (code === 200) {
     ElMessage({
@@ -231,18 +230,24 @@ const transformData = data => {
     return transformedItem;
   });
 };
-const handleRreeSelect = (node, index) => {
-  console.log(node.deptName, index);
-  form.assessmentObjectList.assessmentObjectName = node.deptName;
+const assessmentTypeRef = ref();
+const handleRreeSelect = index => {
+  const node = assessmentTypeRef.value[index].getCheckedNodes();
+  form.assessmentObjectList[index].assessmentObjectName =
+    node[node.length - 1].deptName;
 };
-const handleSelect = (node, index) => {
-  console.log(node, index);
-  resTmp.value.map(item => {
-    console.log(item);
-    if (item.id == node) {
-      form.assessmentObjectList.assessmentModelName = item.tpName;
-    }
-  });
+const handleSelect = index => {
+  // console.log(index,'form.assessmentObjectList',form.assessmentObjectList[index].am);
+  form.assessmentObjectList[index].assessmentModelName =
+    form.assessmentObjectList[index].am.tpName;
+  form.assessmentObjectList[index].assessmentModelId =
+    form.assessmentObjectList[index].am.id;
+  // resTmp.value.map(item => {
+  //   console.log(item);
+  //   if (item.id == node) {
+  //     form.assessmentObjectList.assessmentModelName = item.tpName;
+  //   }
+  // });
 };
 const aaaa = a => {
   console.log(a);
@@ -412,6 +417,7 @@ defineExpose({
                   >
                     <el-tree-select
                       v-if="form.assessmentType === 1"
+                      ref="assessmentTypeRef"
                       v-model="item.assessmentObjectId"
                       :data="treeDept"
                       :render-after-expand="false"
@@ -422,11 +428,12 @@ defineExpose({
                         children: 'children'
                       }"
                       style="width: 180px"
-                      @check-change="handleRreeSelect"
+                      @check-change="handleRreeSelect(index)"
                     />
                     <el-select
                       v-if="form.assessmentType != 1"
                       v-model="item.assessmentObjectId"
+                      @change="handChange"
                     >
                       <el-option
                         v-for="(it, id) in treeDept"
@@ -452,17 +459,18 @@ defineExpose({
                     class="w-full flex mt-1"
                   >
                     <el-select
-                      v-model="item.assessmentModelId"
+                      v-model="item.am"
                       placeholder="请选择"
                       filterable
                       style="width: 180px"
-                      @change="handleSelect"
+                      value-key="id"
+                      @change="handleSelect(index)"
                     >
                       <el-option
                         v-for="itemTmp in resTmp"
                         :key="itemTmp.id"
                         :label="itemTmp.tpName"
-                        :value="itemTmp.id"
+                        :value="itemTmp"
                         style="width: 180px"
                       />
                     </el-select>

+ 0 - 1
src/views/evaluate/children/change/mould.vue

@@ -127,7 +127,6 @@ const formattedTime = time => {
         v-loading="tableLoading"
         :data="data.records"
         style="width: 100%"
-        max-height="250"
       >
         <el-table-column prop="tpName" label="考核模板" />
         <el-table-column

+ 2 - 3
src/views/evaluate/children/change/mould/manageObject.vue

@@ -304,8 +304,8 @@ const handleCurrentIndexChange = (val: number) => {
             />
           </div>
           <div class="mr-10">
-            <el-button type="primary" plain>批量调整执行人</el-button>
-            <el-button type="primary" plain>批量重置流程</el-button>
+            <!-- <el-button type="primary" plain>批量调整执行人</el-button>
+            <el-button type="primary" plain>批量重置流程</el-button> -->
             <Auth :value="['批量删除']">
               <el-button type="primary" plain @click="delAssessmentObjectApi">
                 批量删除
@@ -321,7 +321,6 @@ const handleCurrentIndexChange = (val: number) => {
         <el-table
           :data="objList"
           style="width: 100%"
-          max-height="250"
           @selection-change="changeSelection"
         >
           <el-table-column type="selection" width="55" />

+ 1 - 2
src/views/evaluate/children/change/mould/message.vue

@@ -158,11 +158,10 @@ const postListTreeWithUserApi = async () => {
   const res = await postListTreeWithUser();
   const { data, code } = await getTemplateInfoList(templateparams);
   resTmp.value = data.records;
-  console.log(data);
   treeDept.value = [];
   treeDept.value = transformData(res.data);
 };
-
+postListTreeWithUserApi();
 function transformData(arr) {
   return arr.map(item => {
     const {