8
0
ZaiZai 1 неделя назад
Родитель
Сommit
2cb9c9ff0a
1 измененных файлов с 26 добавлено и 2 удалено
  1. 26 2
      src/views/project/list/edit-formula.vue

+ 26 - 2
src/views/project/list/edit-formula.vue

@@ -312,8 +312,14 @@
                     </div>
                 </div>
                 <!-- 多标签处理 -->
-                <div class="border-dashed-card hc-formula-card-tag mb-14px">
-                    1111
+                <div v-if="showFunDetail" class="hc-formula-card-tag mb-14px">
+                    <el-tabs v-model="equationSelectIndex" type="border-card" closable :before-leave="leaveEquationSelect" @tab-remove="delEquationSelect">
+                        <template v-for="(item, index) in equationSelectEle.children" :key="index">
+                            <el-tab-pane :label="item.name" :name="index">
+                                {{ item.name }} + {{ index }}
+                            </el-tab-pane>
+                        </template>
+                    </el-tabs>
                 </div>
             </div>
             <template #action>
@@ -594,6 +600,16 @@ const equationSelect = (path) => {
     equationSelectIndex.value = equationSelectEle.value.children.length - 1
 }
 
+//移除挂载的函数
+const delEquationSelect = (name) => {
+    console.log(name)
+}
+
+//切换公式tab标签
+const leaveEquationSelect = (name, oldName) => {
+    console.log(name, oldName)
+}
+
 //获取数据
 const resultFormula = ref([])
 const getWbsFormElementData = async () => {
@@ -665,6 +681,14 @@ const equationSelectEle = computed(() => {
 
 //显示函数详情
 const showFunDetail = computed(() => {
+    if (isResetFun.value) {
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+        isResetFun.value = false
+    }
+    if (deviationRangeShow.value) {
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+        deviationRangeShow.value = false
+    }
     if (isNullES(equationSelectEle.value)) return false
     if (isNullES(equationSelectEle.value.children)) return false
     return equationSelectEle.value.children.length > 0