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. 376
      src/views/modules/events/item-timeout-detail-view.vue
  8. 10
      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"
@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 label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div>
@ -176,7 +181,8 @@ export default {
issueContent: '',
handleProgressResultDTOS: [],
issueProgressResultDTOS: [],
images: []
images: [],
voice: ''
},
previewImgList: [],
order: '',

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

@ -14,6 +14,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 label="所属网格:"
prop="ownGrid">
@ -161,7 +166,8 @@ export default {
state: '',
handlerDeptIdRule: '',
issueProgressResultDTOS: [],
images: []
images: [],
voice: ''
},
isAble: false,
previewImgList: [],

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

@ -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 label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div>
@ -67,7 +72,8 @@ export default {
advice: '',
eventState: '',
createdTime: '',
images: []
images: [],
voice: ''
},
previewImgList: []
}

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

@ -12,6 +12,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 label="所属网格:" prop="ownGrid">
<div>{{dataForm.allDeptNames}}</div>
@ -93,7 +98,8 @@ export default {
handlerDeptIdRule: '',
eventState: '4',
handlerDept: '',
handlerDeptId: ''
handlerDeptId: '',
voice: ''
},
isAble: false,
categoryIds: [],

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

@ -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>
@ -151,7 +156,8 @@ export default {
itemContent: '',
handleProgressResultDTOS: [],
issueProgressResultDTOS: [],
images: []
images: [],
voice: ''
},
previewImgList: [],
order: '',

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

@ -15,6 +15,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="项目来源:"
@ -308,7 +313,8 @@ export default {
handleCategory: '',
issueLatitude: '',
issueLongitude: '',
handlerDeptIdRule: ''
handlerDeptIdRule: '',
voice: ''
},
isAble: false,
previewImgList: [],

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

@ -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">

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

@ -15,6 +15,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="项目来源:"
@ -268,7 +273,8 @@ export default {
handleCategory: '',
issueLatitude: '',
issueLongitude: '',
handlerDeptIdRule: ''
handlerDeptIdRule: '',
voice: ''
},
isAble: false,
previewImgList: [],
@ -329,7 +335,7 @@ export default {
return '网格化平台-结案'
} else if (item.state === 85) {
return '项目延期-审核通过'
}else if (item.state === 90) {
} else if (item.state === 90) {
return '项目熔断-审核通过'
}
} else if (item.type === 'issue' || item.type === 'init') {

Loading…
Cancel
Save