Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		| @@ -21,7 +21,7 @@ export default { | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       component: 'Detail', | ||||
|       component: 'List', | ||||
|       params: {}, | ||||
|       include: [], | ||||
|     } | ||||
|   | ||||
| @@ -9,18 +9,26 @@ | ||||
|       <div v-show="currIndex == 0"> | ||||
|         <ai-card title="播发任务" v-show="currIndex === 0"> | ||||
|           <template #content> | ||||
|             <!-- <ai-wrapper | ||||
|             <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="播发级别" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="播放方式" :value="info.createTime"></ai-info-item> | ||||
|               <ai-info-item label="开始日期" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="播放天数" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="开始时间" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="结束时间" :value="info.areaName"></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="起止时间" :value="info.name"></ai-info-item> | ||||
|               <ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item> | ||||
|             </ai-wrapper> --> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </div> | ||||
|       <ai-card title="播发设备" v-show="currIndex == 1"> | ||||
|         <template #right> | ||||
|            <div style="color: #333;font-size: 15px;">共<span style="color: #0082ff;font-size: 15px;">10</span>个设备</div> | ||||
|         </template> | ||||
|         <template #content> | ||||
|           <ai-table | ||||
|             class="detail-table__table" | ||||
| @@ -30,34 +38,14 @@ | ||||
|             :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> | ||||
|           <div class="audios"> | ||||
|             <ai-audio :src="info.url"  skin="flat"/> | ||||
|           </div> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|     </template> | ||||
| @@ -75,7 +63,17 @@ export default { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       tabList: ['播发任务','播发设备','播发素材'] | ||||
|       tabList: ['播发任务','播发设备','播发素材'], | ||||
|       currIndex: 0, | ||||
|       info: {}, | ||||
|       tableData: [], | ||||
|       search: {}, | ||||
|       total: 0, | ||||
|       colConfigs: [ | ||||
|         {prop: 'messageName', label: '设备名称', width: 400}, | ||||
|         {prop: 'messageType', label: '行政区划', align: 'center', dict: "dlbResourceType"}, | ||||
|         {prop: 'messageUrgency', label: '状态', align: 'center', dict: "dlbMessageUrgency"}, | ||||
|       ], | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|   | ||||
| @@ -20,7 +20,7 @@ export default { | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       component: 'taskList', | ||||
|       component: 'List', | ||||
|       params: {}, | ||||
|       include: [], | ||||
|     } | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|                          :selectList="$dict.getDict('dlbMessageUrgency')"></ai-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="行政区划" prop="areaId"> | ||||
|               <ai-area-get v-model="areaId" :root="areaRootId"  :instance="instance" @select="handleAreaSelect" multiple  size="small" placeholder="全部地区"/> | ||||
|               <ai-area-get v-model="areaId" :root="areaRootId"  :instance="instance" @select="handleAreaSelect" size="small" placeholder="全部地区"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="播放方式" prop="taskType" class="buildingTypes"> | ||||
|               <el-radio-group v-model="formData.taskType"> | ||||
|   | ||||
							
								
								
									
										162
									
								
								project/sanjianxi/apps/AppTvMsg/AppTvMsg.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								project/sanjianxi/apps/AppTvMsg/AppTvMsg.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,162 @@ | ||||
| <template> | ||||
|   <section class="AppTvMsg"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="极光推送"/> | ||||
|       <template #content> | ||||
|         <ai-search-bar class="mar-t8"> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||
|             <el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除</el-button> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <ai-select v-model="search.type" :selectList="typeList" placeholder="请选择推送分类" @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getTableData"  | ||||
|           :col-configs="colConfigs" :dict="dict" @selection-change="v=>search.ids=v.map(e=>e.id).toString()"> | ||||
|           <el-table-column slot="type" label="推送分类"  align="center" width="200"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <span v-if="row.type == 15" style="color:#42D784;">核酸监测</span> | ||||
|               <span v-else style="color:#4E8EEE;">主动报备提醒</span> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center" width="200"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="handleDelete(row.id)">删除</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|        | ||||
|     </ai-list> | ||||
|     <ai-dialog title="推送信息" :visible.sync="dialog" @closed="formInit" @onConfirm="submit" width="600px"> | ||||
|         <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|           <el-form-item label="推送分类" prop="type"> | ||||
|             <ai-select v-model="form.type" :selectList="typeList" placeholder="请选择推送分类"/> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="消息内容" prop="msgContent"> | ||||
|               <el-input type="text" v-model="form.msgContent" maxlength="200" /> | ||||
|             </el-form-item> | ||||
|           <template v-if="form.type == 15"> | ||||
|             <el-form-item label="日期" prop="msgTime"> | ||||
|               <el-input type="text" v-model="form.msgTime" maxlength="30" /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="地点" prop="msgPlace"> | ||||
|               <el-input type="text" v-model="form.msgPlace" maxlength="100" /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="按钮标题" prop="msgBtnText"> | ||||
|               <el-input type="text" v-model="form.msgBtnText" maxlength="20" /> | ||||
|             </el-form-item> | ||||
|           </template> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|  | ||||
| export default { | ||||
|   name: "AppTvMsg", | ||||
|   label: "极光推送", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {type: 'selection'}, | ||||
|         {slot: "type"}, | ||||
|         {label: "消息内容", prop: "content", align:'center'}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: { | ||||
|         type: '', | ||||
|         msgContent: '', | ||||
|         msgTime: '', | ||||
|         msgPlace: '', | ||||
|         msgBtnText: '', | ||||
|       }, | ||||
|       rules: { | ||||
|         type: {required: true, message: "请选择推送分类"}, | ||||
|         msgContent: {required: true, message: "请输入消息内容"}, | ||||
|         msgTime: {required: true, message: "请选择日期"}, | ||||
|         msgPlace: {required: true, message: "请输入地点"}, | ||||
|         msgBtnText: {required: true, message: "请输入按钮标题"}, | ||||
|       }, | ||||
|       typeList: [{dictName: '核酸监测', dictValue: '15' }, {dictName: '主动报备提醒', dictValue: '10' }], | ||||
|       search: {ids: [], type: ''} | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appiptvjpush/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要删除推送消息?").then(() => { | ||||
|         this.instance.post("/app/appiptvjpush/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success("删除成功!") | ||||
|             this.getTableData() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           let loading = this.$loading({text: "提交中..."}) | ||||
|           this.instance.post("/app/appiptvjpush/addOrUpdate", this.form).then(res => { | ||||
|             loading.close() | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.page.current = 1 | ||||
|               this.getTableData() | ||||
|             } | ||||
|           }).catch(() => loading.close()) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     formInit() { | ||||
|       for(let key in this.form) { | ||||
|         this.form[key] = '' | ||||
|       }  | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppTvMsg { | ||||
|   height: 100%; | ||||
|  | ||||
|   ::v-deep.mar-t16 { | ||||
|     margin-top: 16px; | ||||
|   } | ||||
|  | ||||
|   ::v-deep.mar-t8 { | ||||
|     margin-top: 8px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user