Commit 3b967bfd authored by renjintao's avatar renjintao

bug detail

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