|
|
@ -13,6 +13,11 @@ |
|
|
|
:preview-src-list="previewImgList" |
|
|
|
@click="clickImg(url)"> |
|
|
|
</el-image> |
|
|
|
<div v-if="dataForm.voice"> |
|
|
|
<audio controls style="height: 30px;"> |
|
|
|
<source :src="dataForm.voice" > |
|
|
|
</audio> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0" label="项目来源:" prop="ownGrid"> |
|
|
|
<div>{{dataForm.groupName}}</div> |
|
|
@ -134,196 +139,197 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import BMap from 'BMap' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline.css' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline-item.css' |
|
|
|
import 'element-ui/lib/theme-chalk/image.css' |
|
|
|
export default { |
|
|
|
name: 'itemCloseDetailView', |
|
|
|
data () { |
|
|
|
return { |
|
|
|
map: '', |
|
|
|
innerVisible: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
nickName: '', |
|
|
|
distributeTime: '', |
|
|
|
itemContent: '', |
|
|
|
handleProgressResultDTOS: [], |
|
|
|
issueProgressResultDTOS: [], |
|
|
|
images: [] |
|
|
|
}, |
|
|
|
previewImgList: [], |
|
|
|
order: '', |
|
|
|
orderField: '', |
|
|
|
pageIndex: 1, |
|
|
|
limitVal: 10, |
|
|
|
total: 0, |
|
|
|
commentsDTOs: [], |
|
|
|
timeLineList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.dataForm.id = this.$route.query.id |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
formatState (item) { |
|
|
|
if (item.type === 'project') { |
|
|
|
if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length > 0) { |
|
|
|
return '吹哨' |
|
|
|
} else if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length === 0) { |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 5) { |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 10) { |
|
|
|
return '结案' |
|
|
|
} else if (item.state === 15) { |
|
|
|
return '上报网格化平台' |
|
|
|
} else if (item.state === 20) { |
|
|
|
return '网格化平台-受理' |
|
|
|
} else if (item.state === 25) { |
|
|
|
return '网格化平台-立案' |
|
|
|
} else if (item.state === 30) { |
|
|
|
return '网格化平台-派遣' |
|
|
|
} else if (item.state === 35) { |
|
|
|
return '网格化平台-中间再派' |
|
|
|
} else if (item.state === 40) { |
|
|
|
return '网格化平台-接单' |
|
|
|
} else if (item.state === 45) { |
|
|
|
return '网格化平台-处理' |
|
|
|
} else if (item.state === 50) { |
|
|
|
return '网格化平台-中间督办' |
|
|
|
} else if (item.state === 55) { |
|
|
|
return '网格化平台-催办' |
|
|
|
} else if (item.state === 60) { |
|
|
|
return '网格化平台-结案' |
|
|
|
} |
|
|
|
} else if (item.type === 'issue' || item.type === 'init') { |
|
|
|
if (item.state === 0) { |
|
|
|
return '审核通过' |
|
|
|
} else if (item.state === 1) { |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 2) { |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 3) { |
|
|
|
return '转议题' |
|
|
|
} |
|
|
|
} else if (item.type === 'issue-project') { |
|
|
|
return '转项目' |
|
|
|
} |
|
|
|
import BMap from 'BMap' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline.css' |
|
|
|
import 'element-ui/lib/theme-chalk/timeline-item.css' |
|
|
|
import 'element-ui/lib/theme-chalk/image.css' |
|
|
|
export default { |
|
|
|
name: 'itemCloseDetailView', |
|
|
|
data () { |
|
|
|
return { |
|
|
|
map: '', |
|
|
|
innerVisible: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
nickName: '', |
|
|
|
distributeTime: '', |
|
|
|
itemContent: '', |
|
|
|
handleProgressResultDTOS: [], |
|
|
|
issueProgressResultDTOS: [], |
|
|
|
images: [], |
|
|
|
voice: '' |
|
|
|
}, |
|
|
|
previewImgList: [], |
|
|
|
order: '', |
|
|
|
orderField: '', |
|
|
|
pageIndex: 1, |
|
|
|
limitVal: 10, |
|
|
|
total: 0, |
|
|
|
commentsDTOs: [], |
|
|
|
timeLineList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.dataForm.id = this.$route.query.id |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
formatState (item) { |
|
|
|
if (item.type === 'project') { |
|
|
|
if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length > 0) { |
|
|
|
return '吹哨' |
|
|
|
} else if (item.state === 0 && item.itemDeptDTOS && item.itemDeptDTOS.length === 0) { |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 5) { |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 10) { |
|
|
|
return '结案' |
|
|
|
} else if (item.state === 15) { |
|
|
|
return '上报网格化平台' |
|
|
|
} else if (item.state === 20) { |
|
|
|
return '网格化平台-受理' |
|
|
|
} else if (item.state === 25) { |
|
|
|
return '网格化平台-立案' |
|
|
|
} else if (item.state === 30) { |
|
|
|
return '网格化平台-派遣' |
|
|
|
} else if (item.state === 35) { |
|
|
|
return '网格化平台-中间再派' |
|
|
|
} else if (item.state === 40) { |
|
|
|
return '网格化平台-接单' |
|
|
|
} else if (item.state === 45) { |
|
|
|
return '网格化平台-处理' |
|
|
|
} else if (item.state === 50) { |
|
|
|
return '网格化平台-中间督办' |
|
|
|
} else if (item.state === 55) { |
|
|
|
return '网格化平台-催办' |
|
|
|
} else if (item.state === 60) { |
|
|
|
return '网格化平台-结案' |
|
|
|
} |
|
|
|
} else if (item.type === 'issue' || item.type === 'init') { |
|
|
|
if (item.state === 0) { |
|
|
|
return '审核通过' |
|
|
|
} else if (item.state === 1) { |
|
|
|
return '回应' |
|
|
|
} else if (item.state === 2) { |
|
|
|
return '关闭' |
|
|
|
} else if (item.state === 3) { |
|
|
|
return '转议题' |
|
|
|
} |
|
|
|
} else if (item.type === 'issue-project') { |
|
|
|
return '转项目' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
back () { |
|
|
|
this.$parent.init() |
|
|
|
// this.$router.push({ path: this.$route.path }) |
|
|
|
}, |
|
|
|
initBmap (latitude, longitude) { |
|
|
|
this.map = new BMap.Map('map') |
|
|
|
const point = new BMap.Point(longitude, latitude) |
|
|
|
var marker = new BMap.Marker(point) |
|
|
|
this.map.addOverlay(marker) |
|
|
|
this.map.centerAndZoom(point, 13) |
|
|
|
this.map.enableScrollWheelZoom(true) |
|
|
|
}, |
|
|
|
init () { |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.getInfo() |
|
|
|
this.getCommentList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
clickImg (url) { |
|
|
|
this.previewImgList = [] |
|
|
|
this.previewImgList.push(url) |
|
|
|
}, |
|
|
|
deleteComment (val) { |
|
|
|
this.$confirm('确定要屏蔽该评论吗?屏蔽后不可恢复。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http['post']('/events/item/deleteComment', { commentIds: [val] }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getCommentList() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
back () { |
|
|
|
this.$parent.init() |
|
|
|
// this.$router.push({ path: this.$route.path }) |
|
|
|
}, |
|
|
|
initBmap (latitude, longitude) { |
|
|
|
this.map = new BMap.Map('map') |
|
|
|
const point = new BMap.Point(longitude, latitude) |
|
|
|
var marker = new BMap.Marker(point) |
|
|
|
this.map.addOverlay(marker) |
|
|
|
this.map.centerAndZoom(point, 13) |
|
|
|
this.map.enableScrollWheelZoom(true) |
|
|
|
}, |
|
|
|
init () { |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.getInfo() |
|
|
|
this.getCommentList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
clickImg (url) { |
|
|
|
this.previewImgList = [] |
|
|
|
this.previewImgList.push(url) |
|
|
|
}, |
|
|
|
deleteComment (val) { |
|
|
|
this.$confirm('确定要屏蔽该评论吗?屏蔽后不可恢复。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http['post']('/events/item/deleteComment', { commentIds: [val] }).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getCommentList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/events/item/contentDetail/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
this.dataForm.handleProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'issue-project' |
|
|
|
} else { |
|
|
|
item.type = 'project' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.dataForm.issueProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'init' |
|
|
|
} else { |
|
|
|
item.type = 'issue' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.timeLineList = [...this.dataForm.handleProgressResultDTOS, ...this.dataForm.issueProgressResultDTOS] |
|
|
|
this.$nextTick(() => { |
|
|
|
this.timeLineList.forEach((item, index) => { |
|
|
|
const oDiv = document.getElementById(`content${index}`) |
|
|
|
const oBorder = oDiv.parentNode.parentNode.parentNode.firstChild |
|
|
|
console.log(111) |
|
|
|
if (item.type === 'issue' || item.type === 'issue-project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #ffa546' |
|
|
|
} else if (item.type === 'project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #009688' |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.initBmap(this.dataForm.issueLatitude, this.dataForm.issueLongitude) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
pageSizeChangeHandleNew (val) { |
|
|
|
this.pageIndex = 1 |
|
|
|
this.limitVal = val |
|
|
|
this.getCommentList() |
|
|
|
}, |
|
|
|
pageCurrentChangeHandleNew (val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getCommentList() |
|
|
|
}, |
|
|
|
getCommentList () { |
|
|
|
this.$http.get('/events/item/comments', { params: { id: this.dataForm.id, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal } |
|
|
|
}).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
this.commentsDTOs = [] |
|
|
|
this.total = 0 |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.commentsDTOs = res.data.list |
|
|
|
this.total = res.data.total |
|
|
|
}).catch(() => {}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/events/item/contentDetail/${this.dataForm.id}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
this.dataForm.handleProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'issue-project' |
|
|
|
} else { |
|
|
|
item.type = 'project' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.dataForm.issueProgressResultDTOS.forEach((item, index, arr) => { |
|
|
|
if (index === arr.length - 1) { |
|
|
|
item.type = 'init' |
|
|
|
} else { |
|
|
|
item.type = 'issue' |
|
|
|
} |
|
|
|
}) |
|
|
|
this.timeLineList = [...this.dataForm.handleProgressResultDTOS, ...this.dataForm.issueProgressResultDTOS] |
|
|
|
this.$nextTick(() => { |
|
|
|
this.timeLineList.forEach((item, index) => { |
|
|
|
const oDiv = document.getElementById(`content${index}`) |
|
|
|
const oBorder = oDiv.parentNode.parentNode.parentNode.firstChild |
|
|
|
console.log(111) |
|
|
|
if (item.type === 'issue' || item.type === 'issue-project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #ffa546' |
|
|
|
} else if (item.type === 'project') { |
|
|
|
oBorder.style.borderLeft = '1px solid #009688' |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.initBmap(this.dataForm.issueLatitude, this.dataForm.issueLongitude) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
pageSizeChangeHandleNew (val) { |
|
|
|
this.pageIndex = 1 |
|
|
|
this.limitVal = val |
|
|
|
this.getCommentList() |
|
|
|
}, |
|
|
|
pageCurrentChangeHandleNew (val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getCommentList() |
|
|
|
}, |
|
|
|
getCommentList () { |
|
|
|
this.$http.get('/events/item/comments', { params: { id: this.dataForm.id, order: this.order, orderField: this.orderField, page: this.pageIndex, limit: this.limitVal } |
|
|
|
}).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
this.commentsDTOs = [] |
|
|
|
this.total = 0 |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.commentsDTOs = res.data.list |
|
|
|
this.total = res.data.total |
|
|
|
}).catch(() => {}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|