Commit 3b967bfd authored by renjintao's avatar renjintao

bug detail

parent ac8d22c2
<template>
<div style="width:100%;overflow:auto">
<div style="width:100%;overflow:auto">
<div style="width:80%; border-right:1px solid #ccc;padding-right:30px;float:left">
<Form :model="bugForm" :label-width="5" ref="formValidate">
<Row>
<Col span="9">
<FormItem label>
<span style="float:left">{{l('title')}}&nbsp;</span>
{{bugForm.title}}
</FormItem>
</Col>
<Col span="6">
<FormItem label>
级别
<Rate v-model="bugForm.level" disabled />
</FormItem>
</Col>
<Col span="9">
<FormItem label>
<span style="float:left">地址&nbsp;</span>
{{bugForm.pagePath}}
</FormItem>
</Col>
</Row>
<Row>
<FormItem label>
<span style="float:left">内容&nbsp;</span>
<dl v-html="bugForm.content" style="margin-left:40px;"></dl>
</FormItem>
</Row>
<Row>
<FormItem label>
<span style="float:left">附件&nbsp;</span>
<files ref="refFile" :parms="parms" unClosable />
</FormItem>
</Row>
<Row></Row>
<Row>
<FormItem label>
bug处理
<Input v-model="bugForm.remark" placeholder="请输入bug详情" type="textarea" :rows="5" />
</FormItem>
</Row>
<Row>
<Col span="12">
<FormItem label>
<radioButton code="Test.but.statusOper" v-model="bugForm.statusNew"></radioButton>
</FormItem>
</Col>
<Col span="12">
工时
<InputNumber :min="1" v-model="bugForm.time"></InputNumber>
</Col>
</Row>
</Form>
<Form :model="bugForm" :label-width="5" ref="formValidate">
<Row>
<Col span="9">
<FormItem label>
<span style="float:left">{{l('title')}}&nbsp;</span>
{{bugForm.title}}
</FormItem>
</Col>
<Col span="6">
<FormItem label>
级别
<Rate v-model="bugForm.level" disabled />
</FormItem>
</Col>
<Col span="9">
<FormItem label>
<span style="float:left">地址&nbsp;</span>
{{bugForm.pagePath}}
</FormItem>
</Col>
</Row>
<Row>
<FormItem label>
<span style="float:left">内容&nbsp;</span>
<dl v-html="bugForm.content" style="margin-left:40px;"></dl>
</FormItem>
</Row>
<Row>
<FormItem label>
<span style="float:left">附件&nbsp;</span>
<files ref="refFile" :parms="parms" unClosable />
</FormItem>
</Row>
<Row></Row>
<Row>
<FormItem label>
bug处理
<Input v-model="bugForm.remark" placeholder="请输入bug详情" type="textarea" :rows="5" />
</FormItem>
</Row>
<Row>
<Col span="12">
<FormItem label>
<radioButton code="Test.but.statusOper" v-model="bugForm.statusNew"></radioButton>
</FormItem>
</Col>
<Col span="12">
工时
<InputNumber :min="1" v-model="bugForm.time"></InputNumber>
</Col>
</Row>
</Form>
</div>
<div class="rightDiv" :style="{height:divHeight}">
<Timeline>
<TimelineItem v-for="(item,index) in timeLineList" :key="index">
<a class="time" v-if="item.action===2" @click="searchInfo(item)">
<state code="Test.bug.statusHistory" :value="item.action" type="text"></state>
</a>
<p class="time" v-else>
<state code="Test.bug.statusHistory" :value="item.action" type="text"></state>
</p>
<p class="content">{{item.actionName}}</p>
<p class="content">{{item.creationTime}}</p>
</TimelineItem>
</Timeline>
<Timeline>
<TimelineItem v-for="(item,index) in timeLineList" :key="index">
<a class="time" v-if="item.action===2" @click="searchInfo(item)">
<state code="Test.bug.statusHistory" :value="item.action" type="text"></state>
</a>
<p class="time" v-else>
<state code="Test.bug.statusHistory" :value="item.action" type="text"></state>
</p>
<Tooltip max-width="400" :content="item.remark" v-if="item.remark">
<a>查看</a>
</Tooltip>
<p class="content">{{item.actionName}}</p>
<p class="content">{{item.creationTime}}</p>
</TimelineItem>
</Timeline>
</div>
<Modal v-model="showInfo" title="处理信息">
<Form :model="detailForm" :label-width="5" ref="formValidate">
<Row>
<FormItem label>
<span style="float:left">处理结果&nbsp;</span>
{{detailForm.remark}}
</FormItem>
</Row>
<Row>
<FormItem label>
<Col span="11">
<span style="float:left">处理人&nbsp;</span>
{{detailForm.actionName}}
</Col>
<Col span="13">
<span style="float:left">处理时间&nbsp;</span>
{{detailForm.creationTime}}
</Col>
<Col span="24">
<span style="float:left">工时&nbsp;</span>
{{detailForm.workHours}}
</Col>
</FormItem>
</Row>
</Form>
<div slot="footer">
<Button @click="showInfo=false">关闭</Button>
</div>
<Form :model="detailForm" :label-width="5" ref="formValidate">
<Row>
<FormItem label>
<span style="float:left">处理结果&nbsp;</span>
{{detailForm.remark}}
</FormItem>
</Row>
<Row>
<FormItem label>
<Col span="11">
<span style="float:left">处理人&nbsp;</span>
{{detailForm.actionName}}
</Col>
<Col span="13">
<span style="float:left">处理时间&nbsp;</span>
{{detailForm.creationTime}}
</Col>
<Col span="24">
<span style="float:left">工时&nbsp;</span>
{{detailForm.workHours}}
</Col>
</FormItem>
</Row>
</Form>
<div slot="footer">
<Button @click="showInfo=false">关闭</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
export default {
name: 'detail',
components: {},
data() {
return {
showInfo: false,
detailForm: {
remark: '',
actionName: '',
creationTime:'',
workHours: 0
},
divHeight: '200px',
parms: {
app: 'bug',
eid: null,
name: ''
},
postUrl:
fileUrl + '/?token=Bearer ' + window.sessionStorage.getItem('token'),
downUrl: fileUrlDown,
fileUrlPath: '',
bugForm: {
id: null,
title: '',
pagePath: '',
content: '',
imgPaths: [],
level: 1,
createor: '',
statusNew: null,
time: 1,
remark: ''
},
timeLineList: [],
nameList: []
}
},
computed: {},
methods: {
detailInfo(value) {
this.nameList = []
this.parms.eid = value.id
this.$http.bug.get({ id: value.id }).then((res) => {
if (res.result) {
this.bugForm = res.result
//this.bugForm.statusNew=res.result.level
name: 'detail',
components: {},
data() {
return {
showInfo: false,
detailForm: {
remark: '',
actionName: '',
creationTime: '',
workHours: 0
},
divHeight: '200px',
parms: {
app: 'bug',
eid: null,
name: ''
},
postUrl: fileUrl + '/?token=Bearer ' + window.sessionStorage.getItem('token'),
downUrl: fileUrlDown,
fileUrlPath: '',
bugForm: {
id: null,
title: '',
pagePath: '',
content: '',
imgPaths: [],
level: 1,
createor: '',
statusNew: null,
time: 1,
remark: ''
},
timeLineList: [],
nameList: []
}
})
},
computed: {},
methods: {
detailInfo(value) {
this.nameList = []
this.parms.eid = value.id
this.$http.bug.get({
id: value.id
}).then((res) => {
if (res.result) {
this.bugForm = res.result
//this.bugForm.statusNew=res.result.level
}
})
this.$refs.refFile.intFiles()
this.$refs.refFile.intFiles()
let id = value.id
if (id != null) {
//增加确定
this.$http.bug.getallaction({ id: id }).then((res) => {
if (res.result) {
this.timeLineLista = []
this.timeLineList = res.result
} else {
this.$Message.error('操作失败!')
}
this.modalDetail = false
})
} else {
this.$Message.error('操作失败!')
}
},
//新增或修改返回数据
addBugInfo() {
return this.bugForm
},
downFile(checked, name) {
this.fileUrlPath = this.downUrl + '/' + name
},
searchInfo(value) {
this.showInfo = true
this.detailForm = {
remark: value.remark,
actionName: value.actionName,
creationTime:value.creationTime,
workHours: value.workHours
}
let id = value.id
if (id != null) {
//增加确定
this.$http.bug.getallaction({
id: id
}).then((res) => {
if (res.result) {
this.timeLineLista = []
this.timeLineList = res.result
} else {
this.$Message.error('操作失败!')
}
this.modalDetail = false
})
} else {
this.$Message.error('操作失败!')
}
},
//新增或修改返回数据
addBugInfo() {
return this.bugForm
},
downFile(checked, name) {
this.fileUrlPath = this.downUrl + '/' + name
},
searchInfo(value) {
this.showInfo = true
this.detailForm = {
remark: value.remark,
actionName: value.actionName,
creationTime: value.creationTime,
workHours: value.workHours
}
},
l(key) {
key = 'bug' + '.' + key
return this.$t(key)
}
},
l(key) {
key = 'bug' + '.' + key
return this.$t(key)
}
},
created() {
this.divHeight = window.innerHeight - 150 + 'px'
},
mounted() {
window.onresize = () => {
return (() => {
created() {
this.divHeight = window.innerHeight - 150 + 'px'
})()
},
mounted() {
window.onresize = () => {
return (() => {
this.divHeight = window.innerHeight - 150 + 'px'
})()
}
}
}
}
</script>
<style scoped>
.time {
font-size: 14px;
font-weight: bold;
font-size: 14px;
font-weight: bold;
}
.content {
padding-left: 5px;
padding-left: 5px;
}
.rightDiv {
width: 18%;
float: left;
padding-left: 50px;
overflow: auto;
width: 18%;
float: left;
padding-left: 50px;
}
</style>
\ No newline at end of file
</style>
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