feat: 数字民警开发

ocr_2.1
xiangcongshuai 5 months ago
parent 8cd3aac10c
commit 4440104bfd

@ -7,7 +7,7 @@
--> -->
<template> <template>
<div class="HoverButton"> <div class="HoverButton" @click="getList">
<el-popover <el-popover
placement="left" placement="left"
width="240" width="240"
@ -24,7 +24,7 @@
<!-- <i class="el-icon-arrow-down el-icon--right" /> --> <!-- <i class="el-icon-arrow-down el-icon--right" /> -->
</div> </div>
<div class="case-list"> <div class="case-list">
<span v-for="(item,index) in caseList" :key="index" class="case-item" @click="openPage(item)">{{ item.name }}</span> <span v-for="(item,index) in caseList" :key="index" class="case-item" @click="openPage(item)">{{ item.caseName }}</span>
</div> </div>
</div> </div>
<div <div
@ -50,6 +50,9 @@ export default {
] ]
} }
}, },
mounted() {
this.getList()
},
methods: { methods: {
onBtnClicked() { onBtnClicked() {
this.$router.push({ this.$router.push({
@ -67,7 +70,7 @@ export default {
} }
}, },
openPage(item) { openPage(item) {
store.dispatch('user/setPermissions', ['admin']) store.dispatch('user/setConversationId', item.conversationId)
this.$router.push({ this.$router.push({
path: '/policeAi' path: '/policeAi'
}) })

@ -19,7 +19,7 @@ const state = () => ({
endTime: null, endTime: null,
avatar: null, avatar: null,
adminFlag: '', adminFlag: '',
caseId: "", conversationId: '',
permissions: [] permissions: []
}) })
const getters = { const getters = {
@ -33,7 +33,7 @@ const getters = {
unitId: (state) => state.unitId, unitId: (state) => state.unitId,
adminFlag: (state) => state.adminFlag, adminFlag: (state) => state.adminFlag,
permissions: (state) => state.permissions, permissions: (state) => state.permissions,
caseId: (state) => state.caseId conversationId: (state) => state.conversationId
} }
const mutations = { const mutations = {
setAccessToken(state, accessToken) { setAccessToken(state, accessToken) {
@ -78,7 +78,7 @@ const actions = {
setPermissions({ commit }, permissions) { setPermissions({ commit }, permissions) {
commit('setPermissions', permissions) commit('setPermissions', permissions)
}, },
setCaseId({ commit }, conversationId) { setConversationId({ commit }, conversationId) {
commit('setConversationId', conversationId) commit('setConversationId', conversationId)
}, },
async login({ commit }, userInfo) { async login({ commit }, userInfo) {

@ -51,6 +51,8 @@
<script> <script>
import { conversationList, conversationDelete } from '@/api/caseManagement' import { conversationList, conversationDelete } from '@/api/caseManagement'
import { mapGetters } from 'vuex'
import store from '@/store'
export default { export default {
name: 'HistoricalRecords', name: 'HistoricalRecords',
data() { data() {
@ -65,6 +67,11 @@ export default {
showCaseList: [] showCaseList: []
} }
}, },
computed: {
...mapGetters({
testConversationId: 'user/conversationId'
})
},
mounted() { mounted() {
this.getList() this.getList()
}, },
@ -102,6 +109,16 @@ export default {
}) })
if (res.code === 200) { if (res.code === 200) {
this.caseList = res.data.records this.caseList = res.data.records
if (this.testConversationId) {
this.selectId = this.testConversationId
for (const item of this.caseList) {
if (item.conversationId === this.testConversationId) {
this.selectCase(item)
}
}
this.testConversationId = ''
store.dispatch('user/setConversationId', '')
}
} }
}, },
changeDelFlag() { changeDelFlag() {

Loading…
Cancel
Save