大纲模版完成
This commit is contained in:
@@ -308,4 +308,15 @@ export default {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns 生成-代码质量度量分析表
|
||||||
|
*/
|
||||||
|
createIndicates(params = {}) {
|
||||||
|
return request({
|
||||||
|
url: `/generate/create/indicators`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,17 @@
|
|||||||
<a-button type="primary" @click="visible = true">
|
<a-button type="primary" @click="visible = true">
|
||||||
<template #icon><icon-select-all /></template>{{ props.text }}
|
<template #icon><icon-select-all /></template>{{ props.text }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-tag size="large" color="blue" v-if="props.isEcho">已选择 {{ isArray(selecteds) ? selecteds.length : 0 }} 位</a-tag>
|
<a-tag size="large" color="blue" v-if="props.isEcho"
|
||||||
<a-input-tag v-model="userList" v-if="props.isEcho" :style="{ width:'320px' }" :placeholder="'请点击前面按钮' + props.text" :max-tag-count="3" disabled/>
|
>已选择 {{ isArray(selecteds) ? selecteds.length : 0 }} 位</a-tag
|
||||||
|
>
|
||||||
|
<a-input-tag
|
||||||
|
v-model="userList"
|
||||||
|
v-if="props.isEcho"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
:placeholder="'请点击前面按钮' + props.text"
|
||||||
|
:max-tag-count="3"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|
||||||
<a-modal v-model:visible="visible" width="1000px" draggable :on-before-ok="close" unmountOnClose>
|
<a-modal v-model:visible="visible" width="1000px" draggable :on-before-ok="close" unmountOnClose>
|
||||||
@@ -27,20 +36,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from "vue"
|
||||||
import commonApi from '@/api/common'
|
import commonApi from "@/api/common"
|
||||||
import { Message } from '@arco-design/web-vue'
|
import { Message } from "@arco-design/web-vue"
|
||||||
import { isArray, isEmpty } from 'lodash-es'
|
import { isArray, isEmpty } from "lodash-es"
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: { type: Array },
|
modelValue: { type: Array },
|
||||||
isEcho: { type: Boolean, default: false },
|
isEcho: { type: Boolean, default: false },
|
||||||
multiple: { type: Boolean, default: true },
|
multiple: { type: Boolean, default: true },
|
||||||
onlyId: { type: Boolean, default: true },
|
onlyId: { type: Boolean, default: true },
|
||||||
text: { type: String, default: '选择用户' }
|
text: { type: String, default: "选择用户" }
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'success'])
|
const emit = defineEmits(["update:modelValue", "success"])
|
||||||
|
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const selecteds = ref([])
|
const selecteds = ref([])
|
||||||
@@ -52,7 +61,7 @@
|
|||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
val => {
|
(val) => {
|
||||||
if (props.isEcho && props.onlyId) selecteds.value = val
|
if (props.isEcho && props.onlyId) selecteds.value = val
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -65,19 +74,19 @@
|
|||||||
if (isArray(selecteds.value) && selecteds.value.length > 0) {
|
if (isArray(selecteds.value) && selecteds.value.length > 0) {
|
||||||
const response = await commonApi.getUserInfoByIds({ ids: selecteds.value })
|
const response = await commonApi.getUserInfoByIds({ ids: selecteds.value })
|
||||||
if (!isEmpty(response) && isArray(response.data)) {
|
if (!isEmpty(response) && isArray(response.data)) {
|
||||||
userList.value = response.data.map( item => {
|
userList.value = response.data.map((item) => {
|
||||||
return `${item.username}(${item.id})`
|
return `${item.username}(${item.id})`
|
||||||
})
|
})
|
||||||
if (props.onlyId) {
|
if (props.onlyId) {
|
||||||
emit('update:modelValue', selecteds.value)
|
emit("update:modelValue", selecteds.value)
|
||||||
} else {
|
} else {
|
||||||
emit('update:modelValue', response.data)
|
emit("update:modelValue", response.data)
|
||||||
}
|
}
|
||||||
emit('success', true)
|
emit("success", true)
|
||||||
Message.success('选择成功')
|
Message.success("选择成功")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
emit('update:modelValue', [])
|
emit("update:modelValue", [])
|
||||||
userList.value = []
|
userList.value = []
|
||||||
}
|
}
|
||||||
done(true)
|
done(true)
|
||||||
@@ -86,38 +95,38 @@
|
|||||||
const crud = ref({
|
const crud = ref({
|
||||||
showIndex: false,
|
showIndex: false,
|
||||||
api: commonApi.getUserList,
|
api: commonApi.getUserList,
|
||||||
rowSelection: props.multiple ? { type: 'checkbox', showCheckedAll: true } : { type: 'radio' }
|
rowSelection: props.multiple ? { type: "checkbox", showCheckedAll: true } : { type: "radio" }
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ title: '账户', dataIndex: 'username', search: true },
|
{ title: "账户", dataIndex: "username", search: true },
|
||||||
{ title: '昵称', dataIndex: 'nickname', search: true },
|
{ title: "昵称", dataIndex: "nickname", search: true },
|
||||||
{ title: '手机', dataIndex: 'phone', search: true },
|
{ title: "手机", dataIndex: "phone", search: true },
|
||||||
{ title: '邮箱', dataIndex: 'email', search: true },
|
{ title: "邮箱", dataIndex: "email", search: true },
|
||||||
{
|
{
|
||||||
title: '部门',
|
title: "部门",
|
||||||
dataIndex: 'dept_id',
|
dataIndex: "dept_id",
|
||||||
search: true,
|
search: true,
|
||||||
formType: 'tree-select',
|
formType: "tree-select",
|
||||||
hide: true,
|
hide: true,
|
||||||
dict: { url: 'system/common/getDeptTreeList' }
|
dict: { url: "system/common/getDeptTreeList" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '角色',
|
title: "角色",
|
||||||
dataIndex: 'role_id',
|
dataIndex: "role_id",
|
||||||
search: true,
|
search: true,
|
||||||
formType: 'select',
|
formType: "select",
|
||||||
hide: true,
|
hide: true,
|
||||||
dict: { url: 'system/common/getRoleList', props: { label: 'name', value: 'code' } }
|
dict: { url: "system/common/getRoleList", props: { label: "name", value: "code" } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位',
|
title: "岗位",
|
||||||
dataIndex: 'post_id',
|
dataIndex: "post_id",
|
||||||
search: true,
|
search: true,
|
||||||
formType: 'select',
|
formType: "select",
|
||||||
hide: true,
|
hide: true,
|
||||||
dict: { url: 'system/common/getPostList', props: { label: 'name', value: 'code' } }
|
dict: { url: "system/common/getPostList", props: { label: "name", value: "code" } }
|
||||||
},
|
}
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default function useCrudRef(currentRow: Ref<{ id: number | string; name:
|
|||||||
dataIndex: "sort",
|
dataIndex: "sort",
|
||||||
formType: "input-number",
|
formType: "input-number",
|
||||||
addDefaultValue: 1,
|
addDefaultValue: 1,
|
||||||
width: 130,
|
width: 150,
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 1000
|
max: 1000
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export default function (crudOrFormRef: any) {
|
|||||||
dataIndex: "testMethod",
|
dataIndex: "testMethod",
|
||||||
formType: "select",
|
formType: "select",
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
maxTagCount: 5,
|
||||||
dict: { name: "testMethod", props: { label: "title", value: "key" }, translation: true }
|
dict: { name: "testMethod", props: { label: "title", value: "key" }, translation: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -120,7 +121,7 @@ export default function (crudOrFormRef: any) {
|
|||||||
title: "操作与预期",
|
title: "操作与预期",
|
||||||
dataIndex: "subStep",
|
dataIndex: "subStep",
|
||||||
formType: "steptable"
|
formType: "steptable"
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -95,12 +95,14 @@ export default function (crudOrFormRef: any) {
|
|||||||
{
|
{
|
||||||
title: "接口类型",
|
title: "接口类型",
|
||||||
dataIndex: "type",
|
dataIndex: "type",
|
||||||
hide: true
|
hide: true,
|
||||||
|
placeholder:"请填写接口类型或协议,例如:UART"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "接口内容",
|
title: "接口数据",
|
||||||
dataIndex: "protocal",
|
dataIndex: "protocal",
|
||||||
hide: true
|
hide: true,
|
||||||
|
placeholder:"请填写接口的交互数据,例如:XX分级数据"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,21 @@
|
|||||||
</a-list-item>
|
</a-list-item>
|
||||||
<a-list-item v-for="(frag, index) in fragmentList" :key="index">
|
<a-list-item v-for="(frag, index) in fragmentList" :key="index">
|
||||||
<div class="fragment-item">
|
<div class="fragment-item">
|
||||||
<div class="fragment-name">{{ frag.name }}</div>
|
<div class="fragment-name text-center">{{ frag.name }}</div>
|
||||||
|
<a-divider direction="vertical" />
|
||||||
|
<template v-if="frag.isLock">
|
||||||
|
<!-- 表示已经被锁住了 -->
|
||||||
|
<a-popover title="片段被锁定">
|
||||||
|
<icon-lock style="color: red" size="20" />
|
||||||
|
<template #content>
|
||||||
|
<p>文档片段已经被设置为锁定(word中开发工具>属性解锁)</p>
|
||||||
|
<p style="color: red">注意:被锁定的片段无法被平台数据覆盖!</p>
|
||||||
|
</template>
|
||||||
|
</a-popover>
|
||||||
|
</template>
|
||||||
|
<template v-else="frag.isLock">
|
||||||
|
<icon-unlock style="color: green" size="20" />
|
||||||
|
</template>
|
||||||
<a-divider direction="vertical" />
|
<a-divider direction="vertical" />
|
||||||
<a-switch v-model="frag.isCover"></a-switch>
|
<a-switch v-model="frag.isCover"></a-switch>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,6 +102,7 @@ import useSeitaiModal from "../hooks/useSeitaiModal"
|
|||||||
export interface IFragmentItem {
|
export interface IFragmentItem {
|
||||||
name: string
|
name: string
|
||||||
isCover: boolean
|
isCover: boolean
|
||||||
|
isLock: boolean // 是否锁定
|
||||||
}
|
}
|
||||||
|
|
||||||
// ~~~~1.文档片段展示功能~~~~
|
// ~~~~1.文档片段展示功能~~~~
|
||||||
@@ -114,9 +129,10 @@ const open = async (documentType: DocumentType, id: number) => {
|
|||||||
documentType
|
documentType
|
||||||
})
|
})
|
||||||
// 填充到fragmentList
|
// 填充到fragmentList
|
||||||
fragmentList.value = data.map((it: string) => ({
|
fragmentList.value = data.map((it: { frag_name: string; isLock: boolean }) => ({
|
||||||
name: it,
|
name: it.frag_name,
|
||||||
isCover: false
|
isCover: false,
|
||||||
|
isLock: it.isLock // 是否锁定
|
||||||
}))
|
}))
|
||||||
fragmentListPending.value = false
|
fragmentListPending.value = false
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default {
|
|||||||
window.URL.revokeObjectURL(url) // 释放 URL 对象
|
window.URL.revokeObjectURL(url) // 释放 URL 对象
|
||||||
// 上面是触发下载
|
// 上面是触发下载
|
||||||
isComplete.value = true
|
isComplete.value = true
|
||||||
Message.success("文档生成并下载成功!")
|
Message.success("文档生成并下载成功,请打开问题全选->F9更新其中的域!")
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
isComplete.value = true
|
isComplete.value = true
|
||||||
visible.value = false
|
visible.value = false
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const useGenerateSecond = function () {
|
|||||||
dgGenerateApi.createPerformance({ id }), // 生成-被测软件性能
|
dgGenerateApi.createPerformance({ id }), // 生成-被测软件性能
|
||||||
dgGenerateApi.createBaseInformation({ id }), // 生成-被测软件基本信息
|
dgGenerateApi.createBaseInformation({ id }), // 生成-被测软件基本信息
|
||||||
dgGenerateApi.createLevelAndType({ id }), // 生成-测试级别和测试类型 -【修改】
|
dgGenerateApi.createLevelAndType({ id }), // 生成-测试级别和测试类型 -【修改】
|
||||||
dgGenerateApi.createStrategy({ id }), // 生成-测试级别和测试类型 -【新增】
|
dgGenerateApi.createStrategy({ id }), // 生成-测试策略 -【新增】
|
||||||
dgGenerateApi.createYzComparison({ id }), // 生成-研总-测试项对照表
|
dgGenerateApi.createYzComparison({ id }), // 生成-研总-测试项对照表
|
||||||
dgGenerateApi.createXqComparison({ id }), // 生成-需求规格说明-测试项对照表
|
dgGenerateApi.createXqComparison({ id }), // 生成-需求规格说明-测试项对照表
|
||||||
dgGenerateApi.createFanXqComparison({ id }), // 生成-反向测试项-需求规格说明对照表
|
dgGenerateApi.createFanXqComparison({ id }), // 生成-反向测试项-需求规格说明对照表
|
||||||
@@ -56,6 +56,8 @@ const useGenerateSecond = function () {
|
|||||||
dgGenerateApi.createDynamicHard({ id }), // 生成-动态硬件和固件项
|
dgGenerateApi.createDynamicHard({ id }), // 生成-动态硬件和固件项
|
||||||
dgGenerateApi.createTestData({ id }), // 生成-测评数据
|
dgGenerateApi.createTestData({ id }), // 生成-测评数据
|
||||||
dgGenerateApi.createEnvDiff({ id }), // 生成-环境差异性分析
|
dgGenerateApi.createEnvDiff({ id }), // 生成-环境差异性分析
|
||||||
|
// 2025年4月21日新增
|
||||||
|
dgGenerateApi.createIndicates({ id }) // 生成主要功能和性能指标(包括摸底)
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
isGenerating.value = false
|
isGenerating.value = false
|
||||||
isDgLoading.value = false
|
isDgLoading.value = false
|
||||||
|
|||||||
Reference in New Issue
Block a user