UPDATE: 根据计划的状态调按钮显示还是隐藏。
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
新增子计划
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="isTabPlanFather"
|
||||
v-if="isTabPlanFather && planFormContent?.testState === 0"
|
||||
v-auth.plan="'add_subplan'"
|
||||
icon="Edit"
|
||||
type="primary"
|
||||
@@ -45,7 +45,7 @@
|
||||
编辑子计划
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="isTabPlanFather"
|
||||
v-if="isTabPlanFather && planFormContent?.testState === 0"
|
||||
v-auth.plan="'export_subplan'"
|
||||
icon="Download"
|
||||
type="primary"
|
||||
@@ -56,6 +56,7 @@
|
||||
<el-button
|
||||
v-auth.plan="'import_subplan'"
|
||||
:disabled="!scope.isSelected"
|
||||
v-if="planFormContent?.importFlag === 1"
|
||||
icon="Download"
|
||||
type="primary"
|
||||
@click="exportPlanCheckResultData(scope.selectedListIds)"
|
||||
@@ -63,7 +64,12 @@
|
||||
数据下载
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!isTabPlanFather && planFormContent && planFormContent?.children.length > 0"
|
||||
v-if="
|
||||
!isTabPlanFather &&
|
||||
planFormContent &&
|
||||
planFormContent.children &&
|
||||
planFormContent?.children?.length > 0
|
||||
"
|
||||
v-auth.plan="'add_subplan'"
|
||||
icon="Box"
|
||||
type="primary"
|
||||
@@ -82,7 +88,7 @@
|
||||
批量移除
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
v-if="planFormContent && planFormContent?.children.length > 0"
|
||||
v-if="planFormContent && planFormContent.children && planFormContent.children?.length > 0"
|
||||
v-auth.plan="'add_subplan'"
|
||||
:disabled="!scope.isSelected"
|
||||
placement="right-start"
|
||||
@@ -110,13 +116,13 @@
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-dropdown
|
||||
v-if="planFormContent && planFormContent?.children.length > 0"
|
||||
v-if="planFormContent && planFormContent.children && planFormContent.children?.length > 0"
|
||||
v-auth.plan="'add_subplan'"
|
||||
placement="right-start"
|
||||
trigger="hover"
|
||||
>
|
||||
<el-button
|
||||
v-if="!isTabPlanFather"
|
||||
v-if="!isTabPlanFather && planFormContent.testState === 0"
|
||||
icon="ScaleToOriginal"
|
||||
style="margin-left: 10px"
|
||||
type="primary"
|
||||
@@ -150,6 +156,7 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="isTabPlanFather"
|
||||
:disabled="scope.row.checkState != 0"
|
||||
icon="Delete"
|
||||
link
|
||||
type="primary"
|
||||
@@ -167,10 +174,10 @@
|
||||
<ImportZip ref="planCheckDataImportZip" @result="importResult" />
|
||||
</template>
|
||||
<script lang="tsx" setup>
|
||||
import { ElFormItem, ElMessage, ElMessageBox, ElSwitch, TabPaneName } from 'element-plus'
|
||||
import { ElFormItem, ElMessage, ElMessageBox, ElSwitch, type TabPaneName } from 'element-plus'
|
||||
import { reactive, ref } from 'vue'
|
||||
import PlanPopup from '@/views/plan/planList/components/planPopup.vue' // 导入子组件
|
||||
import { Plan } from '@/api/plan/interface'
|
||||
import { type Plan } from '@/api/plan/interface'
|
||||
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import type { ColumnProps, ProTableInstance, SearchRenderScope } from '@/components/ProTable/interface'
|
||||
import {
|
||||
|
||||
@@ -834,7 +834,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
||||
user_Result: any
|
||||
|
||||
if (mode.value === '比对式') {
|
||||
if (data.importFlag === 1) {
|
||||
if (data.importFlag === 1 || (data.testState !== 0 && plan === 0)) {
|
||||
allDisabled.value = true
|
||||
formContent.leader = data.leader
|
||||
}
|
||||
|
||||
@@ -73,7 +73,14 @@
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="primary" v-auth.plan="'delete'" link :icon="Delete" @click="handleDelete(scope.row)">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.testState === 0"
|
||||
v-auth.plan="'delete'"
|
||||
link
|
||||
:icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
|
||||
Reference in New Issue
Block a user