Commit 865ad754 authored by 晓彤's avatar 晓彤

更细提测文档

parent 20dc9568
...@@ -14,3 +14,35 @@ export function addTestDescription(data) { ...@@ -14,3 +14,35 @@ export function addTestDescription(data) {
data data
}) })
} }
// 编辑提测文档接口
export function editTestDescription(data) {
return holmesRequest({
url: '/quality/testInstruction/update',
method: 'post',
data
})
}
// 删除提测文档接口
export function delTestDescription(data) {
return holmesRequest({
url: '/quality/testInstruction/delete',
method: 'post',
data
})
}
// 提测文档详情接口
export function detailTestDescription(queryInfo) {
return holmesRequest({
url: '/quality/testInstruction/detail',
method: 'get',
params: queryInfo
})
}
// 根据jira项目关键字获取项目列表接口
export function getTestProjectNameList(queryInfo) {
return holmesRequest({
url: '/quality/testInstruction/getProjectNameList',
method: 'get',
params: queryInfo
})
}
...@@ -59,6 +59,9 @@ import DataList from '../views/confluence/DataList' ...@@ -59,6 +59,9 @@ import DataList from '../views/confluence/DataList'
import BindAddress from '../views/yxm/BindAddress' import BindAddress from '../views/yxm/BindAddress'
// 新添加提测说明功能页面(2021-10-29) // 新添加提测说明功能页面(2021-10-29)
import TestDescription from '../views/qa/TestDescription' import TestDescription from '../views/qa/TestDescription'
// 新添加提测说明详情页面(2021-11-10)
import DetailTestDescription from '../views/qa/DetailTestDescription'
const originalPush = Router.prototype.push const originalPush = Router.prototype.push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
...@@ -310,6 +313,12 @@ const router = new Router({ ...@@ -310,6 +313,12 @@ const router = new Router({
path: '/qa/testDescription', path: '/qa/testDescription',
name: '提测说明', name: '提测说明',
component: TestDescription component: TestDescription
},
// 提测文档详情页面(2021-11-10)
{
path: '/qa/detailTestDescription',
name: DetailTestDescription,
component: DetailTestDescription
} }
] ]
} }
......
...@@ -190,7 +190,6 @@ export default { ...@@ -190,7 +190,6 @@ export default {
// 添加模块 // 添加模块
addModul(this.addModelForm) addModul(this.addModelForm)
.then((resp) => { .then((resp) => {
console.log('保存信息', this.modelForm)
if (resp.data.data === true) { if (resp.data.data === true) {
this.DialogVisible = false this.DialogVisible = false
this.$message.success('新增成功!') this.$message.success('新增成功!')
......
<template>
<div class="description_text">
<div v-if="title" class="title">{{title}}</div>
<el-row :gutter="gutter">
<el-col :key="key" :span="+col" v-for="(item, key) in dataSource">
<div class="term">{ { item.term}}</div>
<div class="detail">{ { item.detail}}</div>Î
</el-col>
</el-row>
</div>
</template>
<script>
const handleArrayObj = (data) => {
return data
.filter((item) => item.tag === 'Description')
.map((item) => ({
tag: item.tag,
term: (item.data && item.data.attrs.term) || '暂无',
detail: (item.children && item.children[0].text) || '暂无'
}))
}
export default {
name: 'Description',
props: {
title: String,
content: [Object, Array],
gutter: {
type: [Number, String],
default: 20
},
col: {
type: [Number, String],
default: 8
}
},
data() {
return {
dataSource: handleArrayObj(this.$slots.default || [])
}
},
watch: {
content() {
this.dataSource = handleArrayObj(this.$slots.default || [])
} // 监听重渲染
}
}
</script>
<style lang="less" scoped>
.description_text {
.title {
font-weight: 700;
font-size: 16px;
line-height: 1.5;
margin-bottom: 20px;
color: rgba(0, 0, 0, 0.85);
}
.term {
color: rgba(0, 0, 0, 0.85);
font-weight: 400;
font-size: 14px;
line-height: 22px;
padding-bottom: 16px;
margin-right: 8px;
white-space: nowrap;
display: table-cell;
&:after {
content: ':';
margin: 0 8px 0 2px;
position: relative;
top: -0.5px;
}
}
.detail {
font-size: 14px;
line-height: 1.5;
width: 100%;
padding-bottom: 16px;
color: rgba(0, 0, 0, 0.65);
display: table-cell;
}
}
</style>
<template>
<div>
<el-card>
<div style="font-size:18px;color:303133">提测说明详情</div>
<el-row>
<el-col :span="4">
<div style="margin-top:40px;margin-left:40px">jira项目名称:</div>
</el-col>
<el-col :span="6">
<div class="col2-style"> {{jiraProjectName}}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">项目名称:</div>
</el-col>
<el-col :span="6">
<div class="col2-style">
{{projectName}}
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">服务及分支:</div>
</el-col>
<el-col :span="18">
<el-table :data="serviceAndBranch" border style="width:90%;margin-top:20px;margin-left:-50px">
<el-table-column label="服务名称" prop="serviceName" width="300"></el-table-column>
<el-table-column label="服务分支" prop="branch" width="300"></el-table-column>
<el-table-column label="开发负责人" prop="developer" width="170"></el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">apollo变更:</div>
</el-col>
<el-col :span="18">
<el-table :data="apollo" border style="width:90%;margin-top:20px;margin-left:-50px">
<el-table-column label="项目名称" prop="projectName" width="300"></el-table-column>
<el-table-column label="apollo Key" prop="key" width="300"></el-table-column>
<el-table-column label="apollo value" prop="value" width="170"></el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">数据库变更:</div>
</el-col>
<el-col :span="18">
<el-table :data="database" border style="width:90%;margin-top:20px;margin-left:-50px">
<el-table-column label="数据库名称" prop="db" width="300"></el-table-column>
<el-table-column label="sql" prop="sql" width="470"></el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">需求地址:</div>
</el-col>
<el-col :span="6">
<div class="col2-style">{{requirement}}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">接口地址:</div>
</el-col>
<el-col :span="6">
<div class="col2-style">{{api}}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<div class="col-style">其 它:</div>
</el-col>
<el-col :span="6">
<div class="col2-style">{{scope}}</div>
</el-col>
</el-row>
</el-card>
</div>
</template>
<script>
import { detailTestDescription } from '@/api/TestDesciption'
import bus from '@/utils/bus'
export default {
data() {
return {
projectName: '',
jiraProjectName: '',
requirement: '',
api: '',
scope: '',
apollo: [],
database: [],
serviceAndBranch: []
}
},
created() {
bus.$on('msg', (row) => {
detailTestDescription({
projectName: row.projectName,
jiraProjectKey: row.jiraProjectKey
}).then((resp) => {
var data = resp.data.data
this.projectName = data.projectName
this.jiraProjectName = data.jiraProjectName
this.requirement = data.requirement
this.api = data.api
this.scope = data.scope
this.serviceAndBranch = JSON.parse(data.serviceAndBranch)
this.apollo = JSON.parse(data.apollo)
this.database = JSON.parse(data.database)
})
})
},
methods: {}
}
</script>
<style lang="sss" scoped>
.col-style {
margin-top: 20px;
margin-left: 40px;
}
.col2-style {
margin-top: 20px;
margin-left: -50px;
}
</style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment