222
This commit is contained in:
6
cdTMP/package-lock.json
generated
6
cdTMP/package-lock.json
generated
@@ -13,6 +13,7 @@
|
|||||||
"@tinymce/tinymce-vue": "^5.1.1",
|
"@tinymce/tinymce-vue": "^5.1.1",
|
||||||
"@vueuse/core": "^10.1.2",
|
"@vueuse/core": "^10.1.2",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
|
"axois": "^0.0.1-security",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
@@ -2015,6 +2016,11 @@
|
|||||||
"proxy-from-env": "^1.1.0"
|
"proxy-from-env": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/axois": {
|
||||||
|
"version": "0.0.1-security",
|
||||||
|
"resolved": "https://registry.npmmirror.com/axois/-/axois-0.0.1-security.tgz",
|
||||||
|
"integrity": "sha512-8Nui4fwwyxHfjAfpDlg3Jt66EJA4i1D1eJch3D+wM/Oe+qhpyp7yfiszko/O5/adYu20wc37RG9/Eg8QIJHcvA=="
|
||||||
|
},
|
||||||
"node_modules/b-tween": {
|
"node_modules/b-tween": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
"resolved": "https://registry.npmmirror.com/b-tween/-/b-tween-0.3.3.tgz",
|
"resolved": "https://registry.npmmirror.com/b-tween/-/b-tween-0.3.3.tgz",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"@tinymce/tinymce-vue": "^5.1.1",
|
"@tinymce/tinymce-vue": "^5.1.1",
|
||||||
"@vueuse/core": "^10.1.2",
|
"@vueuse/core": "^10.1.2",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
|
"axois": "^0.0.1-security",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
|
|||||||
15
cdTMP/src/api/system/fragment.ts
Normal file
15
cdTMP/src/api/system/fragment.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { request } from "@/api/request"
|
||||||
|
import { IFragSearchCondition } from "./types/fragmentTypes"
|
||||||
|
export class FragApi {
|
||||||
|
/**
|
||||||
|
* 根据参数获取文档片段
|
||||||
|
* @returns 文档片段数组
|
||||||
|
*/
|
||||||
|
static getFragList(params: IFragSearchCondition = {}) {
|
||||||
|
return request({
|
||||||
|
url: "system/userField/getFragment",
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
22
cdTMP/src/api/system/types/fragmentTypes.ts
Normal file
22
cdTMP/src/api/system/types/fragmentTypes.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* 所属产品文档名称的enum
|
||||||
|
*/
|
||||||
|
export enum FragBelongDoc {
|
||||||
|
dg = "大纲",
|
||||||
|
sm = "说明",
|
||||||
|
jl = "记录",
|
||||||
|
hsm = "回归说明",
|
||||||
|
hjl = "回归记录",
|
||||||
|
bg = "报告",
|
||||||
|
wtd = "问题单"
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口:文档片段查询条件
|
||||||
|
*/
|
||||||
|
export interface IFragSearchCondition {
|
||||||
|
belongDocName?: FragBelongDoc
|
||||||
|
name?: string
|
||||||
|
isMain?: boolean
|
||||||
|
projectId?: number
|
||||||
|
}
|
||||||
@@ -11,6 +11,16 @@ export default {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取单个项目信息
|
||||||
|
* @returns 单个项目信息
|
||||||
|
*/
|
||||||
|
getProjectById(id) {
|
||||||
|
return request({
|
||||||
|
url: "testmanage/project/findOneById/" + id,
|
||||||
|
method: "get"
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 添加项目
|
* 添加项目
|
||||||
* @returns
|
* @returns
|
||||||
@@ -43,5 +53,5 @@ export default {
|
|||||||
method: "delete",
|
method: "delete",
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
cdTMP/src/env.d.ts
vendored
7
cdTMP/src/env.d.ts
vendored
@@ -1,2 +1,7 @@
|
|||||||
declare module "@arco-design/web-vue/dist/arco-vue-icon"
|
declare module "@arco-design/web-vue/dist/arco-vue-icon"
|
||||||
declare module 'vue-virtual-scroller'
|
declare module "vue-virtual-scroller"
|
||||||
|
declare module "*.vue" {
|
||||||
|
import { DefineComponent } from "vue"
|
||||||
|
const component: DefineComponent<{}, {}, any>
|
||||||
|
export default component
|
||||||
|
}
|
||||||
|
|||||||
@@ -36,16 +36,6 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a-tooltip content="语言-暂无">
|
|
||||||
<a-button class="nav-btn" type="outline" :shape="'circle'">
|
|
||||||
<template #icon>
|
|
||||||
<icon-language />
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<!-- 这里有个下拉列表 -->
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a-tooltip content="切换主题">
|
<a-tooltip content="切换主题">
|
||||||
<a-button @click="handleChangeTheme" class="nav-btn" type="outline" :shape="'circle'">
|
<a-button @click="handleChangeTheme" class="nav-btn" type="outline" :shape="'circle'">
|
||||||
@@ -65,15 +55,6 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a-tooltip content="设置">
|
|
||||||
<a-button class="nav-btn" type="outline" :shape="'circle'" @click="setVisible">
|
|
||||||
<template #icon>
|
|
||||||
<icon-settings />
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a-dropdown trigger="click">
|
<a-dropdown trigger="click">
|
||||||
<a-avatar :size="32" :style="{ marginRight: '8px', cursor: 'pointer' }">
|
<a-avatar :size="32" :style="{ marginRight: '8px', cursor: 'pointer' }">
|
||||||
@@ -112,9 +93,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
// 测试接口导入
|
|
||||||
import dgGenerateApi from "@/api/generate/dgGenerate"
|
|
||||||
// ~~~~~~~~~
|
|
||||||
import { computed, inject } from "vue"
|
import { computed, inject } from "vue"
|
||||||
import { useAppStore } from "@/store"
|
import { useAppStore } from "@/store"
|
||||||
import { useFullscreen } from "@vueuse/core"
|
import { useFullscreen } from "@vueuse/core"
|
||||||
@@ -171,12 +149,6 @@ const toggleDrawerMenu = inject("toggleDrawerMenu")
|
|||||||
const handleClickLogo = () => {
|
const handleClickLogo = () => {
|
||||||
router.push({ name: "workplace" })
|
router.push({ name: "workplace" })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试生成文档-测试项和方法
|
|
||||||
const testCreate = async () => {
|
|
||||||
const st = await dgGenerateApi.createTestDemand()
|
|
||||||
Message.success(st.message)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|||||||
@@ -39,6 +39,20 @@ const TESTMANAGE = {
|
|||||||
noAffix: true,
|
noAffix: true,
|
||||||
title: "项目看板"
|
title: "项目看板"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 二级路由:单独显示项目所属的文档片段
|
||||||
|
{
|
||||||
|
path: "/projFragment/:projectId",
|
||||||
|
name: "projFragment",
|
||||||
|
component: () => import("@/views/testmanage/projFragment/index.vue"),
|
||||||
|
meta: {
|
||||||
|
locale: "项目文档片段",
|
||||||
|
icon: "icon-copy",
|
||||||
|
hideInMenu: true,
|
||||||
|
ignoreCache: false,
|
||||||
|
noAffix: true,
|
||||||
|
title: "项目文档片段"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
9
cdTMP/src/utils/enums/productTypes.ts
Normal file
9
cdTMP/src/utils/enums/productTypes.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export enum ProductFileEnum {
|
||||||
|
dg = "大纲",
|
||||||
|
sm = "说明",
|
||||||
|
jl = "记录",
|
||||||
|
hsm = "回归说明",
|
||||||
|
hjl = "回归记录",
|
||||||
|
bg = "报告",
|
||||||
|
wtd = "问题单"
|
||||||
|
}
|
||||||
4
cdTMP/src/utils/types/CommonType.ts
Normal file
4
cdTMP/src/utils/types/CommonType.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export interface IDictData<T> {
|
||||||
|
label: string
|
||||||
|
value: T
|
||||||
|
}
|
||||||
87
cdTMP/src/views/testmanage/projFragment/index.vue
Normal file
87
cdTMP/src/views/testmanage/projFragment/index.vue
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div class="proj-fragment-container">
|
||||||
|
<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" v-loading="isDataLoading">
|
||||||
|
<a-page-header @back="handleBackClick" :style="{ background: 'var(--color-bg-2)' }" :title="loadingData.ident">
|
||||||
|
<template #subtitle>
|
||||||
|
<a-space>
|
||||||
|
<span>{{ loadingData.name }}</span>
|
||||||
|
</a-space>
|
||||||
|
<span class="text-base ml-3 text-red-950">所属文档片段</span>
|
||||||
|
</template>
|
||||||
|
</a-page-header>
|
||||||
|
<hr/>
|
||||||
|
<ma-crud class="mt-3" :options="crudOptions" :columns="crudColumns" ref="crudRef"> </ma-crud>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { useRoute, useRouter } from "vue-router"
|
||||||
|
import { FragApi } from "@/api/system/fragment"
|
||||||
|
import { ProductFileEnum } from "@/utils/enums/productTypes"
|
||||||
|
import { IDictData } from "@/utils/types/CommonType"
|
||||||
|
import useFetchData from "@/hooks/fetchData"
|
||||||
|
import projectApi from "@/api/testmanage/project"
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const crudRef = ref(null)
|
||||||
|
// 产品文档类型写死7种
|
||||||
|
const productFileType: IDictData<ProductFileEnum>[] = Object.keys(ProductFileEnum).map((it) => ({
|
||||||
|
label: ProductFileEnum[it],
|
||||||
|
value: it as ProductFileEnum
|
||||||
|
}))
|
||||||
|
// 返回项目管理
|
||||||
|
const handleBackClick = () => {
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
|
// hook-获取单个项目信息
|
||||||
|
const fetchData = async () => {
|
||||||
|
return projectApi.getProjectById(route.params.projectId)
|
||||||
|
}
|
||||||
|
const { loadingData, isDataLoading } = useFetchData({}, fetchData)
|
||||||
|
|
||||||
|
// ma-crud配置
|
||||||
|
const crudOptions = ref<object>({
|
||||||
|
api: FragApi.getFragList,
|
||||||
|
showTools: false
|
||||||
|
})
|
||||||
|
const crudColumns = ref<any[]>([
|
||||||
|
{
|
||||||
|
title: "ID",
|
||||||
|
align: "center",
|
||||||
|
width: 50,
|
||||||
|
hide: true,
|
||||||
|
dataIndex: "id",
|
||||||
|
commonRules: [{ required: true, message: "ID必填" }],
|
||||||
|
validateTrigger: "blur"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "片段名称",
|
||||||
|
align: "center",
|
||||||
|
width: 120,
|
||||||
|
dataIndex: "name",
|
||||||
|
search: true,
|
||||||
|
commonRules: [{ required: true, message: "片段名称必填" }],
|
||||||
|
validateTrigger: "blur"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "所属文档",
|
||||||
|
align: "center",
|
||||||
|
width: 100,
|
||||||
|
dataIndex: "belong_doc",
|
||||||
|
formType: "select",
|
||||||
|
search: true,
|
||||||
|
commonRules: [{ required: true, message: "所属文档必选" }],
|
||||||
|
dict: { data: productFileType }
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "projFragment"
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -93,6 +93,7 @@
|
|||||||
工作区
|
工作区
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-link @click="previewRef.open(record)"><icon-eye />预览</a-link>
|
<a-link @click="previewRef.open(record)"><icon-eye />预览</a-link>
|
||||||
|
<a-link @click="handleFragmentClick(record)"><icon-file />片段</a-link>
|
||||||
<a-link @click="handleBoardClick(record)"><icon-dashboard />项目看板</a-link>
|
<a-link @click="handleBoardClick(record)"><icon-dashboard />项目看板</a-link>
|
||||||
</template>
|
</template>
|
||||||
</ma-crud>
|
</ma-crud>
|
||||||
@@ -338,6 +339,15 @@ const handleBoardClick = (record) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 2.跳转到项目所属文档片段
|
||||||
|
const handleFragmentClick = (record) => {
|
||||||
|
router.push({
|
||||||
|
name: "projFragment",
|
||||||
|
params: {
|
||||||
|
projectId: record.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// CRUD-OPTIONS
|
// CRUD-OPTIONS
|
||||||
const crudRef = ref()
|
const crudRef = ref()
|
||||||
@@ -482,6 +492,7 @@ const crudOptions = ref({
|
|||||||
const crudColumns = ref([
|
const crudColumns = ref([
|
||||||
{
|
{
|
||||||
title: "项目标识",
|
title: "项目标识",
|
||||||
|
align: "center",
|
||||||
width: 90,
|
width: 90,
|
||||||
sortable: { sortDirections: ["ascend"] },
|
sortable: { sortDirections: ["ascend"] },
|
||||||
dataIndex: "ident",
|
dataIndex: "ident",
|
||||||
@@ -492,6 +503,7 @@ const crudColumns = ref([
|
|||||||
{
|
{
|
||||||
title: "项目名称",
|
title: "项目名称",
|
||||||
width: 110,
|
width: 110,
|
||||||
|
align: "center",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
search: true,
|
search: true,
|
||||||
commonRules: [{ required: true, message: "名称是必填" }]
|
commonRules: [{ required: true, message: "名称是必填" }]
|
||||||
@@ -503,11 +515,13 @@ const crudColumns = ref([
|
|||||||
{
|
{
|
||||||
title: "开始日期",
|
title: "开始日期",
|
||||||
dataIndex: "beginTime",
|
dataIndex: "beginTime",
|
||||||
|
align: "center",
|
||||||
commonRules: [{ required: true, message: "开始时间必填" }],
|
commonRules: [{ required: true, message: "开始时间必填" }],
|
||||||
formType: "date"
|
formType: "date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "结束时间",
|
title: "结束时间",
|
||||||
|
align: "center",
|
||||||
dataIndex: "endTime",
|
dataIndex: "endTime",
|
||||||
formType: "date",
|
formType: "date",
|
||||||
extra: "注意:结束时间需要晚于最后一轮结束时间",
|
extra: "注意:结束时间需要晚于最后一轮结束时间",
|
||||||
@@ -537,6 +551,7 @@ const crudColumns = ref([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "责任人",
|
title: "责任人",
|
||||||
|
align: "center",
|
||||||
width: 70,
|
width: 70,
|
||||||
dataIndex: "duty_person",
|
dataIndex: "duty_person",
|
||||||
search: true,
|
search: true,
|
||||||
@@ -651,6 +666,7 @@ const crudColumns = ref([
|
|||||||
{
|
{
|
||||||
title: "报告类型",
|
title: "报告类型",
|
||||||
dataIndex: "report_type",
|
dataIndex: "report_type",
|
||||||
|
align: "center",
|
||||||
addDefaultValue: "9",
|
addDefaultValue: "9",
|
||||||
search: true,
|
search: true,
|
||||||
commonRules: [{ required: true, message: "报告类型必填" }],
|
commonRules: [{ required: true, message: "报告类型必填" }],
|
||||||
@@ -785,6 +801,7 @@ const crudColumns = ref([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
|
align: "center",
|
||||||
dataIndex: "step",
|
dataIndex: "step",
|
||||||
search: true,
|
search: true,
|
||||||
formType: "radio",
|
formType: "radio",
|
||||||
|
|||||||
Reference in New Issue
Block a user