5566
This commit is contained in:
10
cdTMP/src/api/project/singleProblem.js
Normal file
10
cdTMP/src/api/project/singleProblem.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { request } from "@/api/request"
|
||||
export default {
|
||||
getSingleProblem(params = {}) {
|
||||
return request({
|
||||
url: "/project/getSingleProblem",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="navbar">
|
||||
<div class="left-side">
|
||||
<a-space>
|
||||
<img src="@/assets/img/wxwx-logo.svg" class="logo" alt="logo" />
|
||||
<img src="@/assets/img/wxwx-logo.svg" class="logo" alt="logo" @click="handleClickLogo" />
|
||||
<a-typography-title :style="{ margin: 0, fontSize: '18px' }" :heading="5">
|
||||
成都测试管理平台
|
||||
</a-typography-title>
|
||||
@@ -110,6 +110,8 @@ import { useFullscreen } from "@vueuse/core"
|
||||
import useUser from "@/hooks/logout"
|
||||
import { Message } from "@arco-design/web-vue"
|
||||
import Menu from "@/layout/components/menu.vue"
|
||||
import { useRouter } from "vue-router"
|
||||
const router = useRouter()
|
||||
const appStore = useAppStore()
|
||||
// title管理-默认在后台
|
||||
const props = defineProps({
|
||||
@@ -147,12 +149,18 @@ const handleLogout = () => {
|
||||
}
|
||||
// 注入事件
|
||||
const toggleDrawerMenu = inject("toggleDrawerMenu")
|
||||
// 点击图标返回首页
|
||||
const handleClickLogo = () => {
|
||||
console.log("回到workplace")
|
||||
router.push({ name: "Workplace" })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.logo {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
:load-more="loadMore"
|
||||
showLine
|
||||
ref="treeRef"
|
||||
border
|
||||
:default-expand-selected="true"
|
||||
:default-selected-keys="[route.query.key]"
|
||||
></a-tree>
|
||||
</div>
|
||||
</a-layout-sider>
|
||||
@@ -76,6 +79,9 @@ const pointNode = (value, data) => {
|
||||
if (data.node.level === "3") {
|
||||
router.push({ name: "case", query: { ...projectInfo.value, key: data.node.key } })
|
||||
}
|
||||
if (data.node.level === "4") {
|
||||
router.push({ name: "problem", query: { ...projectInfo.value, key: data.node.key } })
|
||||
}
|
||||
}
|
||||
/// 动态加载函数-参数1:树node对象
|
||||
const loadMore = (nodeData) => {
|
||||
@@ -87,21 +93,21 @@ const loadMore = (nodeData) => {
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
if (nodeData.level == '1') {
|
||||
if (nodeData.level == "1") {
|
||||
return new Promise(async (resolve) => {
|
||||
const res = await projectApi.getTestInfo(projectInfo.value.id, nodeData.key, nodeData.level)
|
||||
nodeData.children = res
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
if (nodeData.level == '2') {
|
||||
if (nodeData.level == "2") {
|
||||
return new Promise(async (resolve) => {
|
||||
const res = await projectApi.getCaseInfo(projectInfo.value.id, nodeData.key, nodeData.level)
|
||||
nodeData.children = res
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
if (nodeData.level == '3') {
|
||||
if (nodeData.level == "3") {
|
||||
return new Promise(async (resolve) => {
|
||||
const res = await projectApi.getProblemInfo(projectInfo.value.id, nodeData.key, nodeData.level)
|
||||
nodeData.children = res
|
||||
|
||||
@@ -77,6 +77,17 @@ const router = createRouter({
|
||||
icon: "icon-arrow-right"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "problem",
|
||||
name: "problem",
|
||||
component: () => import("@/views/project/problem/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
roles: ["*"],
|
||||
locale: "问题单详情",
|
||||
icon: "icon-arrow-right"
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -34,9 +34,86 @@ const crudOptions = ref({
|
||||
searchColNumber: 3,
|
||||
tablePagination: true,
|
||||
operationColumn: true,
|
||||
scroll:{ x: '100%', y: '100%' },
|
||||
scroll: { x: "100%", y: "100%" },
|
||||
formOption: {
|
||||
width: 1000
|
||||
width: 1000,
|
||||
layout: [
|
||||
{
|
||||
formType: "grid",
|
||||
customClass: ["mt-0"],
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "name" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "ident" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
customClass: ["ml-4"],
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "status" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "closeMethod" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
customClass: ["ml-4"],
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "grade" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "type" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "divider",
|
||||
title: "问题详情"
|
||||
},
|
||||
{
|
||||
dataIndex:"operation"
|
||||
},
|
||||
{
|
||||
dataIndex:"expect"
|
||||
},
|
||||
{
|
||||
dataIndex:"result"
|
||||
},
|
||||
{
|
||||
dataIndex:"rules"
|
||||
},
|
||||
{
|
||||
dataIndex:"suggest"
|
||||
},
|
||||
{
|
||||
formType: "divider",
|
||||
title: "人员信息"
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "postPerson" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "postDate" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "designerPerson" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "designDate" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "verifyPerson" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "verifyDate" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "revokePerson" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "revokeDate" }] }
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
@@ -54,6 +131,7 @@ const crudColumns = ref([
|
||||
width: 140,
|
||||
search: true,
|
||||
dataIndex: "ident",
|
||||
addDefaultValue: `PT_${route.query.ident}_`,
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
@@ -108,9 +186,9 @@ const crudColumns = ref([
|
||||
align: "center",
|
||||
width: 150,
|
||||
dataIndex: "closeMethod",
|
||||
addDefaultValue: "2",
|
||||
addDefaultValue: ["2"],
|
||||
search: true,
|
||||
formType: "radio",
|
||||
formType: "checkbox",
|
||||
dict: {
|
||||
name: "closeMethod",
|
||||
translation: true,
|
||||
@@ -120,22 +198,34 @@ const crudColumns = ref([
|
||||
// 判断是否具有1:修改文档
|
||||
if (!record.closeMethod.hasOwnProperty("0")) {
|
||||
if (!record.closeMethod.hasOwnProperty("1")) {
|
||||
return <a-tag size="small" bordered color="magenta">还未闭环</a-tag>
|
||||
return (
|
||||
<a-tag size="small" bordered color="magenta">
|
||||
还未闭环
|
||||
</a-tag>
|
||||
)
|
||||
}
|
||||
}
|
||||
const tagObj = []
|
||||
for (let item in record.closeMethod) {
|
||||
if (item === "0") {
|
||||
tagObj.push(<a-tag size="small" bordered color="blue">修改文档</a-tag>)
|
||||
tagObj.push(
|
||||
<a-tag size="small" bordered color="blue">
|
||||
修改文档
|
||||
</a-tag>
|
||||
)
|
||||
} else if (item === "1") {
|
||||
tagObj.push(<a-tag size="small" bordered color="green">修改程序</a-tag>)
|
||||
tagObj.push(
|
||||
<a-tag size="small" bordered color="green">
|
||||
修改程序
|
||||
</a-tag>
|
||||
)
|
||||
}
|
||||
}
|
||||
return <a-space size='mini'>{tagObj}</a-space>
|
||||
return <a-space size="mini">{tagObj}</a-space>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
title: "问题操作",
|
||||
hide: true,
|
||||
search: true,
|
||||
dataIndex: "operation",
|
||||
@@ -152,6 +242,11 @@ const crudColumns = ref([
|
||||
dataIndex: "result",
|
||||
formType: "editor"
|
||||
},
|
||||
{
|
||||
title: "违反规则",
|
||||
hide: true,
|
||||
dataIndex: "rules"
|
||||
},
|
||||
{
|
||||
title: "修改建议",
|
||||
hide: true,
|
||||
@@ -166,24 +261,22 @@ const crudColumns = ref([
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'提单日期',
|
||||
title: "提单日期",
|
||||
hide: true,
|
||||
dataIndex:"postDate",
|
||||
formType:'date'
|
||||
dataIndex: "postDate",
|
||||
formType: "date"
|
||||
},
|
||||
{
|
||||
title: "设计师上级",
|
||||
title: "设师上级",
|
||||
hide: true,
|
||||
dataIndex: "designerPerson",
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "提单人必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'提单日期',
|
||||
title: "提单日期",
|
||||
hide: true,
|
||||
dataIndex:"designDate",
|
||||
formType:'date'
|
||||
dataIndex: "designDate",
|
||||
formType: "date"
|
||||
},
|
||||
{
|
||||
title: "验证人",
|
||||
@@ -194,10 +287,10 @@ const crudColumns = ref([
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'验证日期',
|
||||
title: "验证日期",
|
||||
hide: true,
|
||||
dataIndex:"verifyDate",
|
||||
formType:'date'
|
||||
dataIndex: "verifyDate",
|
||||
formType: "date"
|
||||
},
|
||||
{
|
||||
title: "撤销人",
|
||||
@@ -208,11 +301,11 @@ const crudColumns = ref([
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'撤销日期',
|
||||
title: "撤销日期",
|
||||
hide: true,
|
||||
dataIndex:"revokeDate",
|
||||
formType:'date'
|
||||
},
|
||||
dataIndex: "revokeDate",
|
||||
formType: "date"
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
|
||||
207
cdTMP/src/views/project/problem/cpns/problemDescription.vue
Normal file
207
cdTMP/src/views/project/problem/cpns/problemDescription.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<div class="description">
|
||||
<div v-if="isProblemData">
|
||||
<a-empty></a-empty>
|
||||
</div>
|
||||
<div v-else>
|
||||
<a-alert title="提示">对平台有什么意见如修改操作和修改格式都可以提出</a-alert>
|
||||
<a-tabs v-model:active-key="activeTab" class="atabs">
|
||||
<a-tab-pane title="基本信息" key="basic_detail">
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0">
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>问题单编号:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph type="primary">
|
||||
{{ props.data.ident }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>问题名称:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>
|
||||
{{ props.data.name }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0">
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>问题状态:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>
|
||||
{{ problem_status }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>闭环方式:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>
|
||||
<a-space size="mini">
|
||||
<template v-if="problem_method.length > 0">
|
||||
<template v-for="item of problem_method">
|
||||
<a-tag :color="item === '修改文档' ? 'blue' : 'green'">{{ item }} </a-tag>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-tag color="red">还未闭环</a-tag>
|
||||
</template>
|
||||
</a-space>
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>缺陷等级:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>
|
||||
{{ problem_grade }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>缺陷类型:</a-typography-paragraph>
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
<a-typography-paragraph>
|
||||
{{ problem_type }}
|
||||
</a-typography-paragraph>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane title="问题详情" key="problem_detail">
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 操作步骤: </a-col>
|
||||
<a-col :xs="8" :md="16" :xl="12">
|
||||
{{ props.data.operation }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 期望结果: </a-col>
|
||||
<a-col :xs="8" :md="16" :xl="12">
|
||||
{{ props.data.expect }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 问题结果: </a-col>
|
||||
<a-col :xs="8" :md="16" :xl="12">
|
||||
{{ props.data.result }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 违反规则: </a-col>
|
||||
<a-col :xs="8" :md="16" :xl="12">
|
||||
{{ props.data.rules }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 修改建议: </a-col>
|
||||
<a-col :xs="8" :md="16" :xl="12">
|
||||
{{ props.data.suggest }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane title="人员信息" key="person_detail">
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 提单人员: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.postPerson }}
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 提单时间: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.postDate }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 设计师上级: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.designerPerson }}
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 签署时间: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.designDate }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 验证人员: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.verifyPerson }}
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 签署时间: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.verifyDate }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" class="flex items-center ml-0 pl-0 leading-10">
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 撤销人: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.revokePerson }}
|
||||
</a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6" class="text-center"> 签署时间: </a-col>
|
||||
<a-col :xs="12" :md="8" :xl="6">
|
||||
{{ props.data.revokeDate }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import commonApi from "@/api/common"
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const isProblemData = ref(false)
|
||||
// 当前tab栏
|
||||
const activeTab = ref("basic_detail")
|
||||
// 处理字典
|
||||
const problem_status = ref("")
|
||||
const problem_type = ref("")
|
||||
const problem_grade = ref("")
|
||||
const problem_method = ref([])
|
||||
const getDict = async () => {
|
||||
let problemStatu = await commonApi.getDict("problemStatu")
|
||||
let problemType = await commonApi.getDict("problemType")
|
||||
let problemGrade = await commonApi.getDict("problemGrade")
|
||||
let closeMethod = await commonApi.getDict("closeMethod")
|
||||
problemStatu.data.forEach((item) => {
|
||||
if (item.key === props.data.status) {
|
||||
problem_status.value = item.title
|
||||
}
|
||||
})
|
||||
problemType.data.forEach((item) => {
|
||||
if (item.key === props.data.type) {
|
||||
problem_type.value = item.title
|
||||
}
|
||||
})
|
||||
problemGrade.data.forEach((item) => {
|
||||
if (item.key === props.data.grade) {
|
||||
problem_grade.value = item.title
|
||||
}
|
||||
})
|
||||
closeMethod.data.forEach((item) => {
|
||||
for (let method in props.data.closeMethod) {
|
||||
if (item.key == props.data.closeMethod[method]) {
|
||||
problem_method.value.push(item.title)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
getDict()
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.description {
|
||||
width: 1076px;
|
||||
}
|
||||
.atabs {
|
||||
text-align: left;
|
||||
padding-left: 5px;
|
||||
}
|
||||
</style>
|
||||
53
cdTMP/src/views/project/problem/index.vue
Normal file
53
cdTMP/src/views/project/problem/index.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<a-spin :loading="loading" tip="正在加载中,请稍等...">
|
||||
<template #icon>
|
||||
<icon-sync />
|
||||
</template>
|
||||
<problemDescription :data="data"></problemDescription>
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import problemDescription from "./cpns/problemDescription.vue"
|
||||
import { useRoute } from "vue-router"
|
||||
import singleProblemApi from "@/api/project/singleProblem"
|
||||
import { Message } from "@arco-design/web-vue"
|
||||
const route = useRoute()
|
||||
const data = ref([])
|
||||
const loading = ref(true)
|
||||
const roundNumber = route.query.key.split("-")[0]
|
||||
const designDemandNumber = route.query.key.split("-")[1]
|
||||
const testDemandNumber = route.query.key.split("-")[2]
|
||||
const caseNumber = route.query.key.split("-")[3]
|
||||
const problemNumber = route.query.key.split("-")[4]
|
||||
// 请求展示problem数据函数
|
||||
const fetchProblemData = async (
|
||||
params = {
|
||||
projectId: route.query.id,
|
||||
round: roundNumber,
|
||||
designDemand: designDemandNumber,
|
||||
testDemand: testDemandNumber,
|
||||
case: caseNumber,
|
||||
problem: problemNumber
|
||||
}
|
||||
) => {
|
||||
loading.value = true
|
||||
try {
|
||||
const problemData = await singleProblemApi.getSingleProblem(params)
|
||||
data.value = problemData.data // 是个对象
|
||||
console.log(data.value);
|
||||
} catch (e) {
|
||||
Message.error("请求失败,请检测网络")
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
fetchProblemData()
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
Reference in New Issue
Block a user