584
This commit is contained in:
@@ -2,7 +2,7 @@ import { request } from "@/api/request"
|
|||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns 测试用例数据
|
* @returns 大纲测试项数据
|
||||||
*/
|
*/
|
||||||
createTestDemand(params = {}) {
|
createTestDemand(params = {}) {
|
||||||
return request({
|
return request({
|
||||||
@@ -11,4 +11,26 @@ export default {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns 大纲依据数据
|
||||||
|
*/
|
||||||
|
createYiju(params = {}) {
|
||||||
|
return request({
|
||||||
|
url: `/generate/create/yiju`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns 生成联系方式
|
||||||
|
*/
|
||||||
|
createContact(params = {}) {
|
||||||
|
return request({
|
||||||
|
url: `/generate/create/contact`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,8 +148,11 @@ const close = () => {
|
|||||||
form.value = {}
|
form.value = {}
|
||||||
}
|
}
|
||||||
const add = () => {
|
const add = () => {
|
||||||
|
const strArr = ["新增编辑", "编辑新增", "新增新增", "编辑编辑", "编辑", "新增"]
|
||||||
if (!actionTitle.value) {
|
if (!actionTitle.value) {
|
||||||
actionTitle.value = "新增"
|
actionTitle.value = "新增"
|
||||||
|
} else if (strArr.includes(actionTitle.value)) {
|
||||||
|
actionTitle.value = "新增"
|
||||||
} else {
|
} else {
|
||||||
actionTitle.value += "新增"
|
actionTitle.value += "新增"
|
||||||
}
|
}
|
||||||
@@ -158,8 +161,11 @@ const add = () => {
|
|||||||
open()
|
open()
|
||||||
}
|
}
|
||||||
const edit = (data) => {
|
const edit = (data) => {
|
||||||
|
const strArr = ["新增编辑", "编辑新增", "新增新增", "编辑编辑", "编辑", "新增"]
|
||||||
if (!actionTitle.value) {
|
if (!actionTitle.value) {
|
||||||
actionTitle.value = "编辑"
|
actionTitle.value = "编辑"
|
||||||
|
} else if (strArr.includes(actionTitle.value)) {
|
||||||
|
actionTitle.value = "编辑"
|
||||||
} else {
|
} else {
|
||||||
actionTitle.value += "编辑"
|
actionTitle.value += "编辑"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,10 +158,12 @@ const handleClickLogo = () => {
|
|||||||
router.push({ name: "Workplace" })
|
router.push({ name: "Workplace" })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试生成文档
|
// 测试生成文档-测试项和方法
|
||||||
const testCreate = ()=>{
|
const testCreate = async ()=>{
|
||||||
dgGenerateApi.createTestDemand()
|
const st = await dgGenerateApi.createTestDemand()
|
||||||
|
Message.success(st.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ const crudOptions = ref({
|
|||||||
rowSelection: { showCheckedAll: true },
|
rowSelection: { showCheckedAll: true },
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
operationWidth: 160,
|
operationWidth: 160,
|
||||||
operationColumnAlign:'center',
|
operationColumnAlign: "center",
|
||||||
beforeAdd: (form) => {
|
beforeAdd: (form) => {
|
||||||
form.id = currentRow.value?.id
|
form.id = currentRow.value?.id
|
||||||
},
|
},
|
||||||
add: { show: true, api: dictApi.saveDictItem },
|
add: { show: true, api: dictApi.saveDictItem },
|
||||||
edit: { show: true, api: dictApi.updateDictItemData },
|
edit: { show: true, api: dictApi.updateDictItemData },
|
||||||
delete: { show: true, api: dictApi.realDeleteItem },
|
delete: { show: true, api: dictApi.realDeleteItem }
|
||||||
})
|
})
|
||||||
// crudColumns
|
// crudColumns
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
@@ -84,15 +84,14 @@ const columns = ref([
|
|||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
search: true,
|
search: true,
|
||||||
width: 220,
|
width: 150,
|
||||||
commonRules: [{ required: true, message: "字典标签必填" }]
|
commonRules: [{ required: true, message: "字典标签必填" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:"字段缩写",
|
title: "字段缩写",
|
||||||
dataIndex:"show_title",
|
dataIndex: "show_title",
|
||||||
width: 220,
|
|
||||||
align: "center",
|
align: "center",
|
||||||
search: true,
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "字典键值",
|
title: "字典键值",
|
||||||
@@ -101,7 +100,6 @@ const columns = ref([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
search: true,
|
search: true,
|
||||||
width: 220,
|
|
||||||
commonRules: [{ required: true, message: "字典键值必填" }]
|
commonRules: [{ required: true, message: "字典键值必填" }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -110,7 +108,7 @@ const columns = ref([
|
|||||||
dataIndex: "sort",
|
dataIndex: "sort",
|
||||||
formType: "input-number",
|
formType: "input-number",
|
||||||
addDefaultValue: 1,
|
addDefaultValue: 1,
|
||||||
width: 180,
|
width: 130,
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 1000
|
max: 1000
|
||||||
},
|
},
|
||||||
@@ -123,7 +121,7 @@ const columns = ref([
|
|||||||
formType: "radio",
|
formType: "radio",
|
||||||
dict: { name: "data_status", props: { label: "title", value: "key" } },
|
dict: { name: "data_status", props: { label: "title", value: "key" } },
|
||||||
addDefaultValue: "1",
|
addDefaultValue: "1",
|
||||||
width: 180
|
width: 70
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "备注",
|
title: "备注",
|
||||||
@@ -140,7 +138,28 @@ const columns = ref([
|
|||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
search: true,
|
search: true,
|
||||||
formType: "range",
|
formType: "range",
|
||||||
width: 180
|
width: 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "文档名称",
|
||||||
|
dataIndex: "doc_name",
|
||||||
|
align: "center",
|
||||||
|
search: false,
|
||||||
|
placeholder: "如果不是标准则不填"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "发布日期",
|
||||||
|
dataIndex: "publish_date",
|
||||||
|
align: "center",
|
||||||
|
search: false,
|
||||||
|
placeholder: "如果不是标准则不填"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "标准来源",
|
||||||
|
dataIndex: "source",
|
||||||
|
align: "center",
|
||||||
|
search: false,
|
||||||
|
placeholder: "如果不是标准则不填"
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const crudOptions = ref({
|
|||||||
rowSelection: { showCheckedAll: true },
|
rowSelection: { showCheckedAll: true },
|
||||||
searchColNumber: 4,
|
searchColNumber: 4,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
operationColumn: true,
|
operationColumn: true
|
||||||
})
|
})
|
||||||
|
|
||||||
const crudColumns = ref([
|
const crudColumns = ref([
|
||||||
@@ -107,7 +107,7 @@ const crudColumns = ref([
|
|||||||
search: true,
|
search: true,
|
||||||
formType: "range",
|
formType: "range",
|
||||||
width: 180
|
width: 180
|
||||||
}
|
},
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ const crudColumns = ref([
|
|||||||
search: true,
|
search: true,
|
||||||
width: 220,
|
width: 220,
|
||||||
commonRules: [{ required: true, message: "法人必填" }]
|
commonRules: [{ required: true, message: "法人必填" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'地址',
|
||||||
|
align:'center',
|
||||||
|
dataIndex:'addr',
|
||||||
|
search:true,
|
||||||
|
width:200,
|
||||||
|
commonRules: [{ required: true, message: "公司地址必填" }]
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<template #operationBeforeExtend="{ record }">
|
<template #operationBeforeExtend="{ record }">
|
||||||
<a-link @click="enterWorkPlant(record)">进入工作区</a-link>
|
<a-link @click="enterWorkPlant(record)">进入工作区</a-link>
|
||||||
<a-link @click="previewRef.open(record, crudColumns)"><icon-eye />预览</a-link>
|
<a-link @click="previewRef.open(record, crudColumns)"><icon-eye />预览</a-link>
|
||||||
|
<a-link @click="createYiju(record)"><icon-eye />【测试】生成依据文件</a-link>
|
||||||
|
<a-link @click="createContact(record)"><icon-eye />【测试】联系方式</a-link>
|
||||||
</template>
|
</template>
|
||||||
</ma-crud>
|
</ma-crud>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,6 +19,8 @@ import { ref } from "vue"
|
|||||||
import { useRoute, useRouter } from "vue-router"
|
import { useRoute, useRouter } from "vue-router"
|
||||||
import projectApi from "@/api/testmanage/project"
|
import projectApi from "@/api/testmanage/project"
|
||||||
import preview from "./cpns/preview.vue"
|
import preview from "./cpns/preview.vue"
|
||||||
|
import dgGenerateApi from "@/api/generate/dgGenerate"
|
||||||
|
import { Message } from "@arco-design/web-vue"
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
// 定义预览组件的Ref
|
// 定义预览组件的Ref
|
||||||
const previewRef = ref(null)
|
const previewRef = ref(null)
|
||||||
@@ -28,6 +32,17 @@ const enterWorkPlant = function (record) {
|
|||||||
router.push({ name: "project", query: record })
|
router.push({ name: "project", query: record })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ~~~~~~~~测试生成文档~~~~~~~~
|
||||||
|
const createYiju = async (record) => {
|
||||||
|
const st = await dgGenerateApi.createYiju({ id: record.id })
|
||||||
|
Message.success(st.message)
|
||||||
|
}
|
||||||
|
const createContact = async (record) => {
|
||||||
|
const st = await dgGenerateApi.createContact({ id: record.id })
|
||||||
|
Message.success(st.message)
|
||||||
|
}
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// CRUD-OPTIONS
|
// CRUD-OPTIONS
|
||||||
const crudRef = ref()
|
const crudRef = ref()
|
||||||
const crudOptions = ref({
|
const crudOptions = ref({
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
class Student:
|
|
||||||
def func1(self):
|
|
||||||
print("我是实例方法1111")
|
|
||||||
|
|
||||||
def fn(cls):
|
|
||||||
print("我是实例方法2222")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
stu1 = Student()
|
|
||||||
Reference in New Issue
Block a user