小程序产品库台账
This commit is contained in:
		
							
								
								
									
										67
									
								
								project/oms/apps/AppWechatApps/AppWechatApps.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								project/oms/apps/AppWechatApps/AppWechatApps.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="AppWechatApps"> | ||||||
|  |     <ai-list> | ||||||
|  |       <ai-title slot="title" title="小程序产品库" isShowBottomBorder/> | ||||||
|  |       <template #content> | ||||||
|  |         <ai-search-bar> | ||||||
|  |           <template #right> | ||||||
|  |             <el-input size="small" placeholder="搜索应用" v-model="search.name" clearable | ||||||
|  |                       @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"/> | ||||||
|  |       </template> | ||||||
|  |     </ai-list> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | import {mapState} from "vuex"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "AppWechatApps", | ||||||
|  |   label: "小程序产品库", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |     permissions: Function | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     ...mapState(['user']) | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       search: {name: ""}, | ||||||
|  |       page: {current: 1, size: 10, total: 0}, | ||||||
|  |       tableData: [], | ||||||
|  |       colConfigs: [ | ||||||
|  |         {label: "应用名称", prop: "label", width: 200}, | ||||||
|  |         {label: "应用模块名", prop: "name", width: 200}, | ||||||
|  |         {label: "生产环境路径", prop: "path"}, | ||||||
|  |         {label: "产品库目录", prop: "libPath"}, | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     getTableData() { | ||||||
|  |       this.instance.post("/node/wechatapps/list", null, { | ||||||
|  |         params: {...this.page, ...this.search} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.tableData = res.data?.records.map(e => ({...e, count: 0})) | ||||||
|  |           this.page.total = res.data.total | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getTableData() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .AppWechatApps { | ||||||
|  | } | ||||||
|  | </style> | ||||||
		Reference in New Issue
	
	Block a user