Browse Source

添加语音播报

master
wanggongfeng 4 years ago
parent
commit
fd3cb87fe7
  1. 8
      src/views/modules/events/issue-close-detail-view.vue
  2. 8
      src/views/modules/events/issue-process-detail-view.vue
  3. 8
      src/views/modules/events/issue-reject-detail-view.vue
  4. 8
      src/views/modules/events/issue-review-detail-view.vue
  5. 8
      src/views/modules/events/item-close-detail-view.vue
  6. 8
      src/views/modules/events/item-deal-detail-view.vue
  7. 378
      src/views/modules/events/item-timeout-detail-view.vue
  8. 12
      src/views/modules/events/itemfusingdelay-detail-view.vue

8
src/views/modules/events/issue-close-detail-view.vue

@ -13,6 +13,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item label="所属网格:" prop="ownGrid"> <el-form-item label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div> <div>{{dataForm.allDeptNames}}</div>
@ -176,7 +181,8 @@ export default {
issueContent: '', issueContent: '',
handleProgressResultDTOS: [], handleProgressResultDTOS: [],
issueProgressResultDTOS: [], issueProgressResultDTOS: [],
images: [] images: [],
voice: ''
}, },
previewImgList: [], previewImgList: [],
order: '', order: '',

8
src/views/modules/events/issue-process-detail-view.vue

@ -14,6 +14,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item label="所属网格:" <el-form-item label="所属网格:"
prop="ownGrid"> prop="ownGrid">
@ -161,7 +166,8 @@ export default {
state: '', state: '',
handlerDeptIdRule: '', handlerDeptIdRule: '',
issueProgressResultDTOS: [], issueProgressResultDTOS: [],
images: [] images: [],
voice: ''
}, },
isAble: false, isAble: false,
previewImgList: [], previewImgList: [],

8
src/views/modules/events/issue-reject-detail-view.vue

@ -13,6 +13,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item label="所属网格:" prop="ownGrid"> <el-form-item label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div> <div>{{dataForm.allDeptNames}}</div>
@ -67,7 +72,8 @@ export default {
advice: '', advice: '',
eventState: '', eventState: '',
createdTime: '', createdTime: '',
images: [] images: [],
voice: ''
}, },
previewImgList: [] previewImgList: []
} }

8
src/views/modules/events/issue-review-detail-view.vue

@ -12,6 +12,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item label="所属网格:" prop="ownGrid"> <el-form-item label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div> <div>{{dataForm.allDeptNames}}</div>
@ -93,7 +98,8 @@ export default {
handlerDeptIdRule: '', handlerDeptIdRule: '',
eventState: '4', eventState: '4',
handlerDept: '', handlerDept: '',
handlerDeptId: '' handlerDeptId: '',
voice: ''
}, },
isAble: false, isAble: false,
categoryIds: [], categoryIds: [],

8
src/views/modules/events/item-close-detail-view.vue

@ -13,6 +13,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0" label="项目来源:" prop="ownGrid"> <el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0" label="项目来源:" prop="ownGrid">
<div>{{dataForm.groupName}}</div> <div>{{dataForm.groupName}}</div>
@ -151,7 +156,8 @@ export default {
itemContent: '', itemContent: '',
handleProgressResultDTOS: [], handleProgressResultDTOS: [],
issueProgressResultDTOS: [], issueProgressResultDTOS: [],
images: [] images: [],
voice: ''
}, },
previewImgList: [], previewImgList: [],
order: '', order: '',

8
src/views/modules/events/item-deal-detail-view.vue

@ -15,6 +15,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0" <el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0"
label="项目来源:" label="项目来源:"
@ -308,7 +313,8 @@ export default {
handleCategory: '', handleCategory: '',
issueLatitude: '', issueLatitude: '',
issueLongitude: '', issueLongitude: '',
handlerDeptIdRule: '' handlerDeptIdRule: '',
voice: ''
}, },
isAble: false, isAble: false,
previewImgList: [], previewImgList: [],

378
src/views/modules/events/item-timeout-detail-view.vue

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

12
src/views/modules/events/itemfusingdelay-detail-view.vue

@ -15,6 +15,11 @@
:preview-src-list="previewImgList" :preview-src-list="previewImgList"
@click="clickImg(url)"> @click="clickImg(url)">
</el-image> </el-image>
<div v-if="dataForm.voice">
<audio controls style="height: 30px;">
<source :src="dataForm.voice" >
</audio>
</div>
</el-form-item> </el-form-item>
<el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0" <el-form-item v-if="dataForm.groupName && dataForm.groupName.length > 0"
label="项目来源:" label="项目来源:"
@ -268,7 +273,8 @@ export default {
handleCategory: '', handleCategory: '',
issueLatitude: '', issueLatitude: '',
issueLongitude: '', issueLongitude: '',
handlerDeptIdRule: '' handlerDeptIdRule: '',
voice: ''
}, },
isAble: false, isAble: false,
previewImgList: [], previewImgList: [],
@ -329,7 +335,7 @@ export default {
return '网格化平台-结案' return '网格化平台-结案'
} else if (item.state === 85) { } else if (item.state === 85) {
return '项目延期-审核通过' return '项目延期-审核通过'
}else if (item.state === 90) { } else if (item.state === 90) {
return '项目熔断-审核通过' return '项目熔断-审核通过'
} }
} else if (item.type === 'issue' || item.type === 'init') { } else if (item.type === 'issue' || item.type === 'init') {
@ -534,7 +540,7 @@ export default {
}) })
}).catch(() => { }) }).catch(() => { })
}).catch(() => { }).catch(() => {
}) })
}, },
pageSizeChangeHandleNew (val) { pageSizeChangeHandleNew (val) {

Loading…
Cancel
Save