删除status字段
This commit is contained in:
@@ -135,13 +135,6 @@ const columnsOptions = reactive([
|
||||
formType: "radio",
|
||||
dict: { name: "passType", props: { label: "title", value: "key" } },
|
||||
rules: [{ required: true, message: "是否通过必填" }]
|
||||
},
|
||||
{
|
||||
title: "执行状态",
|
||||
dataIndex: "status",
|
||||
formType: "radio",
|
||||
dict: { name: "execType", props: { label: "title", value: "key" } },
|
||||
rules: [{ required: true, message: "执行状态必填" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import PinYinMatch from "pinyin-match"
|
||||
import { useTreeDataStore } from "@/store"
|
||||
import { useRoute } from "vue-router"
|
||||
import testDemandApi from "@/api/project/testDemand"
|
||||
import { isEqual, cloneDeep } from "lodash"
|
||||
import { isEqual, cloneDeep } from "lodash-es"
|
||||
interface ITestContent {
|
||||
subName: string
|
||||
subDesc: string
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useRoute } from "vue-router"
|
||||
import caseApi from "@/api/project/case"
|
||||
import { useTreeDataStore } from "@/store"
|
||||
import ProblemForm from "@/views/project/case/components/ProblemForm.vue"
|
||||
import { isEqual, cloneDeep } from "lodash"
|
||||
import { isEqual, cloneDeep } from "lodash-es"
|
||||
const problemFormRef = ref(null)
|
||||
const title = ref("问题单表单")
|
||||
const treeDataStore = useTreeDataStore()
|
||||
@@ -38,6 +38,7 @@ const showType = (record) => {
|
||||
// crud设置以及是否保留step数据事件函数
|
||||
const app = getCurrentInstance().appContext.config.globalProperties
|
||||
let beforeFormStep = undefined
|
||||
// 注意只保留测试步骤!!!
|
||||
const handleBeforeCancel = () => {
|
||||
if (!beforeFormStep) {
|
||||
return
|
||||
@@ -202,42 +203,6 @@ const crudColumns = ref([
|
||||
commonRules: [{ required: true, message: "名称是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "执行情况",
|
||||
align: "center",
|
||||
display: false,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
customRender: ({ record }) => {
|
||||
// 执行情况逻辑,查看所有步骤的执行情况 - 暂时硬编码
|
||||
let completeCount = 0
|
||||
let stepCount = record.testStep.length
|
||||
record.testStep.forEach((item) => {
|
||||
if (item.status === "1") {
|
||||
completeCount++
|
||||
}
|
||||
})
|
||||
if (completeCount === stepCount) {
|
||||
return (
|
||||
<a-tag bordered color="green">
|
||||
已执行
|
||||
</a-tag>
|
||||
)
|
||||
} else if (completeCount > 0 && completeCount < stepCount) {
|
||||
return (
|
||||
<a-tag bordered color="orange">
|
||||
部分执行
|
||||
</a-tag>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<a-tag bordered color="red">
|
||||
未执行
|
||||
</a-tag>
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "是否通过",
|
||||
align: "center",
|
||||
@@ -356,8 +321,7 @@ const crudColumns = ref([
|
||||
operation: "",
|
||||
expect: "",
|
||||
result: "",
|
||||
passed: "3",
|
||||
status: "3"
|
||||
passed: "3"
|
||||
}
|
||||
],
|
||||
formType: "children-form",
|
||||
@@ -386,13 +350,6 @@ const crudColumns = ref([
|
||||
formType: "radio",
|
||||
dict: { name: "passType", props: { label: "title", value: "key" } },
|
||||
commonRules: [{ required: true, message: "是否通过必填" }]
|
||||
},
|
||||
{
|
||||
title: "执行状态",
|
||||
dataIndex: "status",
|
||||
formType: "radio",
|
||||
dict: { name: "execType", props: { label: "title", value: "key" } },
|
||||
commonRules: [{ required: true, message: "执行状态必填" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -156,8 +156,8 @@ const useCrudInit = function () {
|
||||
search: true,
|
||||
commonRules: [
|
||||
{ required: true, message: "标识是必填" },
|
||||
{ validator: validateBlank, message: "标识格式不正确" }
|
||||
// { validator: validateWindowFileNameInput }
|
||||
{ validator: validateBlank, message: "标识格式不正确" },
|
||||
{ validator: validateWindowFileNameInput }
|
||||
],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="ma-content-block p-3 lg:h-full block lg:border-0 lg:flex justify-between">
|
||||
<div class="ma-content-block p-3 block lg:border-0 lg:flex justify-between">
|
||||
<!-- 注意修复 上面dom删除 -> lg:h-full -->
|
||||
<div class="h-full w-full lg:ml-3 lg:mr-2 pt-2">
|
||||
<!-- ma-crud组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns" ref="crudRef">
|
||||
|
||||
Reference in New Issue
Block a user