“ystl_myq” 1 týždeň pred
rodič
commit
5beb53e123

+ 3 - 3
src/api/formula.ts

@@ -20,8 +20,8 @@ type templateInfo = {
 //   id: string;
 // };
 // 公式验证
-export const conditionVerify = params => {
-  return http.request<templateInfo>("get", "/assessment/conditionVerify", {
-    params
+export const conditionVerify = data => {
+  return http.request<templateInfo>("post", "/assessment/conditionVerify", {
+    data
   });
 };

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

@@ -31,7 +31,7 @@ const getTemplateInfoListApi = async selectedItem => {
     dataList.teplist = data;
   }
 };
-// getTemplateInfoListApi();
+getTemplateInfoListApi();
 // 员工
 const userPageWhitOrganizationApi = async selectedItem => {
   const { data, code } = await getUserListObjectByModelId({
@@ -105,6 +105,7 @@ const handClickInit3 = value => {
     init.assessmentObjectName = selectedItem.assessmentObjectName;
     init.deptName = value.deptName;
   }
+
   $emit("handClick", {
     ...dataList.params,
     ...init

+ 15 - 11
src/views/draw/children/head/componements/seach.vue

@@ -4,7 +4,11 @@ import { getTemplateInfoList } from "@/api/templateInfo";
 import { userPageWhitOrganization, getLeaderList } from "@/api/userSetting";
 import { getAssessmentPageList } from "@/api/manage";
 import { postListTree } from "@/api/department";
-import { getAssessmentList } from "@/api/draw";
+import {
+  getAssessmentList,
+  getModelListByAssessmentId,
+  getUserListObjectByModelId
+} from "@/api/draw";
 
 const $emit = defineEmits(["handClick"]);
 
@@ -22,11 +26,8 @@ const dataList = reactive({
   }
 });
 // 考核模板
-const getTemplateInfoListApi = async () => {
-  const { data, code } = await getTemplateInfoList({
-    pageNumber: 1,
-    pageSize: 1000
-  });
+const getTemplateInfoListApi = async selectedItem => {
+  const { data, code } = await getModelListByAssessmentId(selectedItem);
   if (code === 200) {
     dataList.teplist = data.records;
   }
@@ -83,6 +84,7 @@ const handClickInit1 = value => {
   if (value) {
     const selectedItem = dataList.magList.find(item => item.id === value);
     init.assessmentName = selectedItem.name;
+    getTemplateInfoListApi(selectedItem);
   }
   $emit("handClick", {
     ...dataList.params,
@@ -91,8 +93,10 @@ const handClickInit1 = value => {
 };
 const handClickInit2 = value => {
   if (value) {
-    const selectedItem = dataList.teplist.find(item => item.id === value);
-    init.assessmentModelName = selectedItem.tpName;
+    const selectedItem = dataList.teplist.find(
+      item => item.assessmentModelId === value
+    );
+    init.assessmentModelName = selectedItem.assessmentModelName;
   }
   $emit("handClick", {
     ...dataList.params,
@@ -145,9 +149,9 @@ const handClickInit3 = value => {
           >
             <el-option
               v-for="item in dataList.teplist"
-              :key="item.id"
-              :label="item.tpName"
-              :value="item.id"
+              :key="item.assessmentModelId"
+              :label="item.assessmentModelName"
+              :value="item.assessmentModelId"
             />
           </el-select>
         </div>

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

@@ -5,7 +5,11 @@ import { userPageWhitOrganization } from "@/api/userSetting";
 import { getAssessmentPageList } from "@/api/manage";
 import { postListTree } from "@/api/department";
 import { postPageGroup } from "@/api/userGroup";
-import { getAssessmentList } from "@/api/draw";
+import {
+  getAssessmentList,
+  getModelListByAssessmentId,
+  getUserListObjectByModelId
+} from "@/api/draw";
 const $emit = defineEmits(["handClick"]);
 
 const dataList = reactive({
@@ -20,13 +24,10 @@ const dataList = reactive({
   }
 });
 // 考核模板
-const getTemplateInfoListApi = async () => {
-  const { data, code } = await getTemplateInfoList({
-    pageNumber: 1,
-    pageSize: 1000
-  });
+const getTemplateInfoListApi = async selectedItem => {
+  const { data, code } = await getModelListByAssessmentId(selectedItem);
   if (code === 200) {
-    dataList.teplist = data.records;
+    dataList.teplist = data;
   }
 };
 getTemplateInfoListApi();
@@ -65,6 +66,7 @@ const handClickInit1 = value => {
   if (value) {
     const selectedItem = dataList.magList.find(item => item.id === value);
     init.assessmentName = selectedItem.name;
+    getTemplateInfoListApi(selectedItem);
   }
   $emit("handClick", {
     ...dataList.params,
@@ -73,8 +75,10 @@ const handClickInit1 = value => {
 };
 const handClickInit2 = value => {
   if (value) {
-    const selectedItem = dataList.teplist.find(item => item.id === value);
-    init.assessmentModelName = selectedItem.tpName;
+    const selectedItem = dataList.teplist.find(
+      item => item.assessmentModelId === value
+    );
+    init.assessmentModelName = selectedItem.assessmentModelName;
   }
   $emit("handClick", {
     ...dataList.params,
@@ -129,9 +133,9 @@ const handClickInit3 = value => {
           >
             <el-option
               v-for="item in dataList.teplist"
-              :key="item.id"
-              :label="item.tpName"
-              :value="item.id"
+              :key="item.assessmentModelId"
+              :label="item.assessmentModelName"
+              :value="item.assessmentModelId"
             />
           </el-select>
         </div>

+ 17 - 12
src/views/draw/children/worker/componements/seach.vue

@@ -4,7 +4,11 @@ import { getTemplateInfoList } from "@/api/templateInfo";
 import { userPageWhitOrganization } from "@/api/userSetting";
 import { getAssessmentPageList } from "@/api/manage";
 import { postListTree } from "@/api/department";
-import { getAssessmentList } from "@/api/draw";
+import {
+  getAssessmentList,
+  getModelListByAssessmentId,
+  getUserListObjectByModelId
+} from "@/api/draw";
 
 const value = ref("");
 const $emit = defineEmits(["handClick"]);
@@ -23,13 +27,11 @@ const dataList = reactive({
 
 // 搜索框----------------------------------------------------
 // 考核模板
-const getTemplateInfoListApi = async () => {
-  const { data, code } = await getTemplateInfoList({
-    pageNumber: 1,
-    pageSize: 1000
-  });
+const getTemplateInfoListApi = async selectedItem => {
+  const { data, code } = await getModelListByAssessmentId(selectedItem);
   if (code === 200) {
-    dataList.teplist = data.records;
+    console.log(111111111, data);
+    dataList.teplist = data;
   }
 };
 getTemplateInfoListApi();
@@ -75,6 +77,7 @@ const handClickInit1 = value => {
   if (value) {
     const selectedItem = dataList.magList.find(item => item.id === value);
     init.assessmentName = selectedItem.name;
+    getTemplateInfoListApi(selectedItem);
   }
   $emit("handClick", {
     ...dataList.params,
@@ -83,8 +86,10 @@ const handClickInit1 = value => {
 };
 const handClickInit2 = value => {
   if (value) {
-    const selectedItem = dataList.teplist.find(item => item.id === value);
-    init.assessmentModelName = selectedItem.tpName;
+    const selectedItem = dataList.teplist.find(
+      item => item.assessmentModelId === value
+    );
+    init.assessmentModelName = selectedItem.assessmentModelName;
   }
   $emit("handClick", {
     ...dataList.params,
@@ -149,9 +154,9 @@ const handClickInit4 = value => {
           >
             <el-option
               v-for="item in dataList.teplist"
-              :key="item.id"
-              :label="item.tpName"
-              :value="item.id"
+              :key="item.assessmentModelId"
+              :label="item.assessmentModelName"
+              :value="item.assessmentModelId"
             />
           </el-select>
         </div>

+ 98 - 26
src/views/evaluate/children/change/components/settingIndexDrawer.vue

@@ -130,11 +130,11 @@ const countComputed = async () => {
   try {
     if (params.formulaType == 0) {
       const formula = JSON.stringify(params.formula);
-      const aa = JSON.stringify(formula);
-      console.log("formula", aa);
+      // const aa = JSON.stringify(formula);
+      // console.log("formula", aa);
       const { code, msg } = await conditionVerify({
         formulaType: params.formulaType,
-        formula: aa
+        formula
       });
       if (code == 200) {
         const keywords = [
@@ -233,6 +233,7 @@ function confirmClick() {
 }
 const open = row => {
   drawer.value = true;
+  calculatorShow.value = true;
   Object.assign(params, {
     id: "",
     tpId: "",
@@ -343,6 +344,7 @@ const count = item => {
   ElMessageBox.confirm("配置项确认保存?确认关闭", {
     type: "warning"
   }).then(() => {
+    params.scoreValue = params.formula.noConditionFormula;
     calculatorShow.value = false;
   });
   // try {
@@ -774,6 +776,13 @@ const countNoConditionFormula4 = (item, index, indexList) => {
                             v-model="item.comparisonEnd"
                             style="width: 60px"
                             placeholder=""
+                            :disabled="
+                              index + 1 ==
+                                addmanyChange.innerConditionExpression.length &&
+                              index >= 1
+                                ? true
+                                : false
+                            "
                           >
                             <el-option label=">" value=">" />
                             <el-option label="≥" value="≥" />
@@ -783,25 +792,44 @@ const countNoConditionFormula4 = (item, index, indexList) => {
                             class="ml-2"
                             style="width: 80px"
                             placeholder=""
+                            :disabled="
+                              index + 1 ==
+                                addmanyChange.innerConditionExpression.length &&
+                              index >= 1
+                                ? true
+                                : false
+                            "
                           >
                             <el-option label="数值" value="数值" />
                             <el-option label="公式" value="公式" />
                           </el-select>
-                          <jishuanqi
-                            v-if="item.select == '公式'"
-                            ref="jishuanqiRef"
-                            :index="index"
-                            :outerConditionValue="item.endValue"
-                            class="ml-2 mr-5"
-                            style="width: 80px"
-                            @handClick="countNoConditionFormula1"
-                          />
                           <el-input
-                            v-else
-                            v-model="item.endValue"
+                            v-if="
+                              index + 1 ==
+                                addmanyChange.innerConditionExpression.length &&
+                              index >= 1
+                            "
+                            disabled
                             class="ml-2 mr-5"
                             style="width: 80px"
                           />
+                          <div v-else>
+                            <jishuanqi
+                              v-if="item.select == '公式'"
+                              ref="jishuanqiRef"
+                              :index="index"
+                              :outerConditionValue="item.endValue"
+                              class="ml-2 mr-5"
+                              style="width: 80px"
+                              @handClick="countNoConditionFormula1"
+                            />
+                            <el-input
+                              v-else
+                              v-model="item.endValue"
+                              class="ml-2 mr-5"
+                              style="width: 80px"
+                            />
+                          </div>
                           <el-text type="danger" @click="deleteItem(index)">
                             <el-icon>
                               <Delete />
@@ -814,7 +842,18 @@ const countNoConditionFormula4 = (item, index, indexList) => {
                         >
                           <div class="flex mt-2 ml-20">
                             <div class="mr-2">条件值{{ index + 1 }} =</div>
+                            <el-input
+                              v-if="
+                                index + 1 ==
+                                  addmanyChange.innerConditionExpression
+                                    .length && index >= 1
+                              "
+                              disabled
+                              class="ml-2 mr-6"
+                              style="width: 208px"
+                            />
                             <jishuanqi
+                              v-else
                               ref="jishuanqiRef"
                               :index="index"
                               :outerConditionValue="itemVO.innerConditionValue"
@@ -851,6 +890,12 @@ const countNoConditionFormula4 = (item, index, indexList) => {
                                 v-model="itemList.comparisonEnd"
                                 style="width: 60px"
                                 placeholder=""
+                                :disabled="
+                                  indexList + 1 == itemVO.scoreRules.length &&
+                                  index >= 1
+                                    ? true
+                                    : false
+                                "
                               >
                                 <el-option label=">" value=">" />
                                 <el-option label="≥" value="≥" />
@@ -860,32 +905,59 @@ const countNoConditionFormula4 = (item, index, indexList) => {
                                 class="ml-2"
                                 style="width: 80px"
                                 placeholder=""
+                                :disabled="
+                                  indexList + 1 == itemVO.scoreRules.length &&
+                                  index >= 1
+                                    ? true
+                                    : false
+                                "
                               >
                                 <el-option label="数值" value="数值" />
                                 <el-option label="公式" value="公式" />
                               </el-select>
-                              <jishuanqi
-                                v-if="itemList.select == '公式'"
-                                ref="jishuanqiRef"
-                                :index="index"
-                                :indexList="indexList"
-                                :outerConditionValue="itemList.endValue"
-                                class="ml-2"
-                                style="width: 80px"
-                                @handClick="countNoConditionFormula3"
-                              />
                               <el-input
-                                v-else
-                                v-model="itemList.endValue"
+                                v-if="
+                                  indexList + 1 == itemVO.scoreRules.length &&
+                                  index >= 1
+                                "
+                                disabled
                                 class="ml-2"
                                 style="width: 80px"
                               />
+                              <div v-else>
+                                <jishuanqi
+                                  v-if="itemList.select == '公式'"
+                                  ref="jishuanqiRef"
+                                  :index="index"
+                                  :indexList="indexList"
+                                  :outerConditionValue="itemList.endValue"
+                                  class="ml-2"
+                                  style="width: 80px"
+                                  @handClick="countNoConditionFormula3"
+                                />
+                                <el-input
+                                  v-else
+                                  v-model="itemList.endValue"
+                                  class="ml-2"
+                                  style="width: 80px"
+                                />
+                              </div>
                               <div
                                 class="w-[150px] ml-2 mr-2 flex justify-between items-center"
                               >
                                 <div>得分</div>
                                 <div>=</div>
+                                <el-input
+                                  v-if="
+                                    indexList + 1 == itemVO.scoreRules.length &&
+                                    index >= 1
+                                  "
+                                  disabled
+                                  class="ml-2"
+                                  style="width: 80px"
+                                />
                                 <jishuanqi
+                                  v-else
                                   ref="jishuanqiRef"
                                   :index="index"
                                   :indexList="indexList"

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

@@ -50,7 +50,6 @@ const manageObjectItme = ref({});
 const setEdit = (row: any) => {
   // router.push({ path: "/evaluate/children/change/mould/manageObject" });\
   manageObjectShow.value = true;
-  console.log("rowrow", row);
   Object.assign(manageObjectItme.value, row);
 };
 // 删除

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

@@ -262,6 +262,7 @@ const editClosedEvent = ({ row, column }) => {
   console.log("row", row);
   const $table = tableVxeRef.value;
   if ($table) {
+    console.log(111);
     updateAssessmentQuotaDetailsApi(row);
     // Object.assign(indexOf, row);
     // postUpdateApi();