Merge branch 'build' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into build
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="AppEquipmentManage">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,38 +17,13 @@ export default {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
include: [],
|
||||
}
|
||||
computed: {
|
||||
currentPage: v => v.$route.hash == "#taskList" ? taskList : List
|
||||
},
|
||||
|
||||
components: {
|
||||
List,
|
||||
taskList,
|
||||
},
|
||||
methods: {
|
||||
onChange(data) {
|
||||
if (data.type === 'taskList') {
|
||||
this.component = 'taskList'
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type == 'list') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -49,9 +49,7 @@ export default {
|
||||
props: {
|
||||
dict: Object,
|
||||
instance: Function,
|
||||
params: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
isAdd: false,
|
||||
@@ -113,17 +111,13 @@ export default {
|
||||
locate: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
|
||||
created() {
|
||||
this.dict.load('dlbDevStatus', 'yesOrNo').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
this.dict.load('dlbDevStatus', 'yesOrNo')
|
||||
},
|
||||
|
||||
methods: {
|
||||
bind(item) {
|
||||
this.areaId = ''
|
||||
@@ -186,13 +180,7 @@ export default {
|
||||
},
|
||||
|
||||
toTaskList(id) {
|
||||
this.$emit('change', {
|
||||
type: 'taskList',
|
||||
params: {
|
||||
id: id || '',
|
||||
// areaId: this.areaId,
|
||||
},
|
||||
})
|
||||
this.$router.push({hash: "#taskList", query: {id}})
|
||||
},
|
||||
update() {
|
||||
this.btnLoading = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<section class="taskList">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(true)"/>
|
||||
<ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel"/>
|
||||
<template #content>
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="right">
|
||||
@@ -25,13 +25,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapMutations} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'taskList',
|
||||
components: {},
|
||||
props: {
|
||||
dict: Object,
|
||||
instance: Function,
|
||||
params: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -103,19 +103,16 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$dict.load('dlbDyclingType','dlbMessageUrgency','dlbBroadcastStatus','dlbResourceType').then(()=>{
|
||||
this.setPageTitle("设备任务列表")
|
||||
this.dict.load('dlbDyclingType', 'dlbMessageUrgency', 'dlbBroadcastStatus', 'dlbResourceType')
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(['setPageTitle']),
|
||||
getList() {
|
||||
this.instance.post(`/app/appzyvideobroadcast/list?deviceId`,null,{
|
||||
params: {
|
||||
...this.page,
|
||||
...this.search,
|
||||
deviceId: this.params.deviceId
|
||||
}
|
||||
const {id: deviceId} = this.$route.query
|
||||
this.instance.post(`/app/appzyvideobroadcast/list`, null, {
|
||||
params: {...this.page, ...this.search, deviceId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
@@ -123,7 +120,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
reset(id) {
|
||||
this.$confirm('确定要撤回该任务吗?').then(() => {
|
||||
this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => {
|
||||
@@ -134,11 +130,8 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
cancel() {
|
||||
this.$router.push({})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user