584
This commit is contained in:
@@ -2,7 +2,7 @@ import { request } from "@/api/request"
|
||||
export default {
|
||||
/**
|
||||
*
|
||||
* @returns 测试用例数据
|
||||
* @returns 大纲测试项数据
|
||||
*/
|
||||
createTestDemand(params = {}) {
|
||||
return request({
|
||||
@@ -11,4 +11,26 @@ export default {
|
||||
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 = {}
|
||||
}
|
||||
const add = () => {
|
||||
const strArr = ["新增编辑", "编辑新增", "新增新增", "编辑编辑", "编辑", "新增"]
|
||||
if (!actionTitle.value) {
|
||||
actionTitle.value = "新增"
|
||||
} else if (strArr.includes(actionTitle.value)) {
|
||||
actionTitle.value = "新增"
|
||||
} else {
|
||||
actionTitle.value += "新增"
|
||||
}
|
||||
@@ -158,8 +161,11 @@ const add = () => {
|
||||
open()
|
||||
}
|
||||
const edit = (data) => {
|
||||
const strArr = ["新增编辑", "编辑新增", "新增新增", "编辑编辑", "编辑", "新增"]
|
||||
if (!actionTitle.value) {
|
||||
actionTitle.value = "编辑"
|
||||
} else if (strArr.includes(actionTitle.value)) {
|
||||
actionTitle.value = "编辑"
|
||||
} else {
|
||||
actionTitle.value += "编辑"
|
||||
}
|
||||
|
||||
@@ -158,10 +158,12 @@ const handleClickLogo = () => {
|
||||
router.push({ name: "Workplace" })
|
||||
}
|
||||
|
||||
// 测试生成文档
|
||||
const testCreate = ()=>{
|
||||
dgGenerateApi.createTestDemand()
|
||||
// 测试生成文档-测试项和方法
|
||||
const testCreate = async ()=>{
|
||||
const st = await dgGenerateApi.createTestDemand()
|
||||
Message.success(st.message)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
@@ -68,13 +68,13 @@ const crudOptions = ref({
|
||||
rowSelection: { showCheckedAll: true },
|
||||
operationColumn: true,
|
||||
operationWidth: 160,
|
||||
operationColumnAlign:'center',
|
||||
operationColumnAlign: "center",
|
||||
beforeAdd: (form) => {
|
||||
form.id = currentRow.value?.id
|
||||
},
|
||||
add: { show: true, api: dictApi.saveDictItem },
|
||||
edit: { show: true, api: dictApi.updateDictItemData },
|
||||
delete: { show: true, api: dictApi.realDeleteItem },
|
||||
delete: { show: true, api: dictApi.realDeleteItem }
|
||||
})
|
||||
// crudColumns
|
||||
const columns = ref([
|
||||
@@ -84,15 +84,14 @@ const columns = ref([
|
||||
align: "center",
|
||||
dataIndex: "title",
|
||||
search: true,
|
||||
width: 220,
|
||||
width: 150,
|
||||
commonRules: [{ required: true, message: "字典标签必填" }]
|
||||
},
|
||||
{
|
||||
title:"字段缩写",
|
||||
dataIndex:"show_title",
|
||||
width: 220,
|
||||
title: "字段缩写",
|
||||
dataIndex: "show_title",
|
||||
align: "center",
|
||||
search: true,
|
||||
search: true
|
||||
},
|
||||
{
|
||||
title: "字典键值",
|
||||
@@ -101,7 +100,6 @@ const columns = ref([
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
search: true,
|
||||
width: 220,
|
||||
commonRules: [{ required: true, message: "字典键值必填" }]
|
||||
},
|
||||
{
|
||||
@@ -110,7 +108,7 @@ const columns = ref([
|
||||
dataIndex: "sort",
|
||||
formType: "input-number",
|
||||
addDefaultValue: 1,
|
||||
width: 180,
|
||||
width: 130,
|
||||
min: 0,
|
||||
max: 1000
|
||||
},
|
||||
@@ -123,7 +121,7 @@ const columns = ref([
|
||||
formType: "radio",
|
||||
dict: { name: "data_status", props: { label: "title", value: "key" } },
|
||||
addDefaultValue: "1",
|
||||
width: 180
|
||||
width: 70
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
@@ -140,7 +138,28 @@ const columns = ref([
|
||||
editDisplay: false,
|
||||
search: true,
|
||||
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 },
|
||||
searchColNumber: 4,
|
||||
tablePagination: false,
|
||||
operationColumn: true,
|
||||
operationColumn: true
|
||||
})
|
||||
|
||||
const crudColumns = ref([
|
||||
@@ -107,7 +107,7 @@ const crudColumns = ref([
|
||||
search: true,
|
||||
formType: "range",
|
||||
width: 180
|
||||
}
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
|
||||
@@ -45,6 +45,14 @@ const crudColumns = ref([
|
||||
search: true,
|
||||
width: 220,
|
||||
commonRules: [{ required: true, message: "法人必填" }]
|
||||
},
|
||||
{
|
||||
title:'地址',
|
||||
align:'center',
|
||||
dataIndex:'addr',
|
||||
search:true,
|
||||
width:200,
|
||||
commonRules: [{ required: true, message: "公司地址必填" }]
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
<template #operationBeforeExtend="{ record }">
|
||||
<a-link @click="enterWorkPlant(record)">进入工作区</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>
|
||||
</ma-crud>
|
||||
</div>
|
||||
@@ -17,6 +19,8 @@ import { ref } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import projectApi from "@/api/testmanage/project"
|
||||
import preview from "./cpns/preview.vue"
|
||||
import dgGenerateApi from "@/api/generate/dgGenerate"
|
||||
import { Message } from "@arco-design/web-vue"
|
||||
const router = useRouter()
|
||||
// 定义预览组件的Ref
|
||||
const previewRef = ref(null)
|
||||
@@ -28,6 +32,17 @@ const enterWorkPlant = function (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
|
||||
const crudRef = 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