任务详情
This commit is contained in:
		| @@ -9,6 +9,7 @@ | ||||
| <script> | ||||
| import List from './components/List' | ||||
| import Add from './components/Add' | ||||
| import Detail from './components/Detail' | ||||
|  | ||||
| export default { | ||||
|   label: '播发记录', | ||||
| @@ -20,7 +21,7 @@ export default { | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       component: 'List', | ||||
|       component: 'Detail', | ||||
|       params: {}, | ||||
|       include: [], | ||||
|     } | ||||
| @@ -28,7 +29,8 @@ export default { | ||||
|  | ||||
|   components: { | ||||
|     Add, | ||||
|     List | ||||
|     List, | ||||
|     Detail | ||||
|   }, | ||||
|   methods: { | ||||
|     onChange(data) { | ||||
| @@ -37,6 +39,11 @@ export default { | ||||
|         this.params = data.params | ||||
|       } | ||||
|  | ||||
|       if (data.type === 'detail') { | ||||
|         this.component = 'Detail' | ||||
|         this.params = data.params | ||||
|       } | ||||
|  | ||||
|       if (data.type == 'list') { | ||||
|         this.component = 'List' | ||||
|         this.params = data.params | ||||
|   | ||||
							
								
								
									
										96
									
								
								packages/device/AppBroadcast/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								packages/device/AppBroadcast/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| <template> | ||||
|   <ai-detail isHasSidebar> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="任务详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)"> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar> | ||||
|       <div v-show="currIndex == 0"> | ||||
|         <ai-card title="播发任务" v-show="currIndex === 0"> | ||||
|           <template #content> | ||||
|             <!-- <ai-wrapper | ||||
|               label-width="120px"> | ||||
|               <ai-info-item label="姓名" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="上报时间" :value="info.createTime"></ai-info-item> | ||||
|               <ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item> | ||||
|               <ai-info-item label="所属地区" :value="info.areaName"></ai-info-item> | ||||
|               <ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item> | ||||
|             </ai-wrapper> --> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </div> | ||||
|       <ai-card title="播发设备" v-show="currIndex == 1"> | ||||
|         <template #content> | ||||
|           <ai-table | ||||
|             class="detail-table__table" | ||||
|             :tableData="tableData" | ||||
|             :col-configs="colConfigs" | ||||
|             :total="total" | ||||
|             :current.sync="search.current" | ||||
|             :size.sync="search.size" | ||||
|             @getList="getList"> | ||||
|             <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|               <template slot-scope="{ row }"> | ||||
|                 <div class="table-options"> | ||||
|                   <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|                 </div> | ||||
|               </template> | ||||
|             </el-table-column> | ||||
|           </ai-table> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|       <ai-card title="播发素材" v-show="currIndex == 2"> | ||||
|         <template #content> | ||||
|           <ai-table | ||||
|             class="detail-table__table" | ||||
|             :tableData="tableData" | ||||
|             :col-configs="colConfigs" | ||||
|             :total="total" | ||||
|             :current.sync="search.current" | ||||
|             :size.sync="search.size" | ||||
|             @getList="getList"> | ||||
|             <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|               <template slot-scope="{ row }"> | ||||
|                 <div class="table-options"> | ||||
|                   <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|                 </div> | ||||
|               </template> | ||||
|             </el-table-column> | ||||
|           </ai-table> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'Detail', | ||||
|   components: {}, | ||||
|   props: { | ||||
|     dict: Object, | ||||
|     params: Object, | ||||
|     instance: Function, | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       tabList: ['播发任务','播发设备','播发素材'] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     cancel(isRefresh) { | ||||
|       this.$emit('change', { | ||||
|         type: 'list', | ||||
|         isRefresh: !!isRefresh, | ||||
|       }) | ||||
|     }, | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .Detail { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -31,6 +31,7 @@ | ||||
|           <el-table-column slot="options" label="操作" align="center" width="180" fixed="right"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button type="text" @click="onAdd(row.broadcastId)">复制</el-button> | ||||
|               <el-button type="text" @click="toDetail(row.broadcastId)">详情</el-button> | ||||
|               <el-button type="text" @click="cancel(row.broadcastId)" | ||||
|                          v-if="row.broadcastStatus == 0 || row.broadcastStatus == 1 || row.broadcastStatus == 2">撤回 | ||||
|               </el-button> | ||||
| @@ -126,6 +127,14 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toDetail(id) { | ||||
|       this.$emit('change', { | ||||
|         type: 'detail', | ||||
|         params: { | ||||
|           id: id || '' | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     cancel(id) { | ||||
|       this.$confirm('确定撤回该广播?').then(() => { | ||||
|         this.instance.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => { | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|  | ||||
| <script> | ||||
| import List from './components/List' | ||||
| import taskList from './components/taskList' | ||||
| import TaskList from './components/TaskList' | ||||
|  | ||||
| export default { | ||||
|   label: '广播设备管理', | ||||
| @@ -20,7 +20,7 @@ export default { | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       component: 'taskList', | ||||
|       component: 'TaskList', | ||||
|       params: {}, | ||||
|       include: [], | ||||
|     } | ||||
| @@ -28,12 +28,12 @@ export default { | ||||
|  | ||||
|   components: { | ||||
|     List, | ||||
|     taskList, | ||||
|     TaskList, | ||||
|   }, | ||||
|   methods: { | ||||
|     onChange(data) { | ||||
|       if (data.type === 'taskList') { | ||||
|         this.component = 'taskList' | ||||
|         this.component = 'TaskList' | ||||
|         this.params = data.params | ||||
|       } | ||||
|  | ||||
|   | ||||
| @@ -164,7 +164,16 @@ export default { | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|      | ||||
|     close(id) { | ||||
|       this.$confirm('确定停播该设备?').then(() => { | ||||
|         this.instance.post(`/app/appdlbquipment/stop?deviceId=${id}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success('停播成功!') | ||||
|             this.getList() | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|     }, | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appdlbquipment/getDlbDeviceList`, null, { | ||||
|         params: { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <template> | ||||
|   <section class="taskList"> | ||||
|   <section class="TaskList"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"/> | ||||
|       <ai-title slot="title" title="任务列表" isShowBack isShowBottomBorder @onBackClick="cancel(true)"/> | ||||
|       <template #content> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template slot="right"> | ||||
| @@ -26,7 +26,7 @@ | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'taskList', | ||||
|   name: 'TaskList', | ||||
|   components: {}, | ||||
|   props: { | ||||
|     dict: Object, | ||||
| @@ -115,7 +115,7 @@ export default { | ||||
|     }, | ||||
|     cancel(isRefresh) { | ||||
|       this.$emit('change', { | ||||
|         type: 'List', | ||||
|         type: 'list', | ||||
|         isRefresh: !!isRefresh, | ||||
|       }) | ||||
|     }, | ||||
| @@ -124,7 +124,7 @@ export default { | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .taskList { | ||||
| .TaskList { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user