Initial Commit
This commit is contained in:
		
						commit
						2bf6bc222d
					
				
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | .direnv/* | ||||||
|  | __pycache__/* | ||||||
|  | .env | ||||||
|  | *.pyc | ||||||
|  | files.json | ||||||
|  | .ropeproject/ | ||||||
							
								
								
									
										
											BIN
										
									
								
								css/fonts/element-icons.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								css/fonts/element-icons.ttf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								css/fonts/element-icons.woff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								css/fonts/element-icons.woff
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										1
									
								
								css/index.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								css/index.css
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										33
									
								
								index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | |||||||
|  | <!doctype html> | ||||||
|  | <html lang="en"> | ||||||
|  |     <head> | ||||||
|  |         <meta charset="utf-8"> | ||||||
|  |         <title>NRB Currently Opened File List</title> | ||||||
|  |         <link rel="stylesheet" href="css/index.css"> | ||||||
|  |         <script src="js/vue.js"></script> | ||||||
|  |         <script src="js/axios.min.js"></script> | ||||||
|  |         <script src="js/index.js"></script> | ||||||
|  |         <script src="js/en.js"></script> | ||||||
|  |         <script src="js/data-tables.min.js"></script> | ||||||
|  |     </head> | ||||||
|  |     <body style="font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,SimSun,sans-serif;"> | ||||||
|  |         <div id='app'> | ||||||
|  |             <data-tables  | ||||||
|  |                          :data='tableData' | ||||||
|  |                          :table-props='tableProps' | ||||||
|  |                          :pagination-def="paginationDef" | ||||||
|  |                          :checkbox-filter-def='getCheckFilterDef()' | ||||||
|  |                          :row-action-def='getRowActionsDef()'> | ||||||
|  |                 <el-table-column prop="share" label="Share" sortable="custom" width="128px"> | ||||||
|  |                 </el-table-column> | ||||||
|  |                 <!-- <el-table-column prop="computer" label="Computer" sortable="custom" width="128px"> | ||||||
|  |                     </el-table-column> --> | ||||||
|  |                 <el-table-column prop="user" label="User" sortable="custom" width="128px"> | ||||||
|  |                 </el-table-column> | ||||||
|  |                 <el-table-column prop="file" label="File" sortable="custom"> | ||||||
|  |                 </el-table-column> | ||||||
|  |             </data-tables> | ||||||
|  |         </div> | ||||||
|  |         <script src="js/app.js"></script> | ||||||
|  |     </body> | ||||||
|  | </html> | ||||||
							
								
								
									
										102
									
								
								js/app.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								js/app.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,102 @@ | |||||||
|  | var dataTables = DataTables.default; | ||||||
|  | 
 | ||||||
|  | ELEMENT.locale(ELEMENT.lang.en) | ||||||
|  | 
 | ||||||
|  | var app = new Vue({ | ||||||
|  |     components: {dataTables}, | ||||||
|  |     data() { | ||||||
|  |         return { | ||||||
|  |             tableData: [], | ||||||
|  |             tableProps: { | ||||||
|  |                 size: 'mini', | ||||||
|  |                 stripe: true, | ||||||
|  |             }, | ||||||
|  |             paginationDef: { | ||||||
|  |                 pageSize: 20, | ||||||
|  |                 pageSizes: [10,20,50,100,250,500] | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     }, | ||||||
|  |     created() { | ||||||
|  |         axios.get('/files.json')  | ||||||
|  |             .then(response => { | ||||||
|  |                 this.tableData = response.data.data | ||||||
|  |             }) | ||||||
|  |             .catch(e => { | ||||||
|  |                 this.errors.push(e) | ||||||
|  |             }) | ||||||
|  |     }, | ||||||
|  |     methods: { | ||||||
|  |         getActionsDef() { | ||||||
|  |             let self = this; | ||||||
|  |             return { | ||||||
|  |                 width: 5, | ||||||
|  |                 def: [{ | ||||||
|  |                     name: 'new', | ||||||
|  |                     handler() { | ||||||
|  |                         self.$message('new clicked') | ||||||
|  |                     }, | ||||||
|  |                     icon: 'plus' | ||||||
|  |                 }, { | ||||||
|  |                     name: 'import', | ||||||
|  |                     handler() { | ||||||
|  |                         self.$message('import clicked') | ||||||
|  |                     }, | ||||||
|  |                     icon: 'upload' | ||||||
|  |                 }] | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         getCheckFilterDef() { | ||||||
|  |             return { | ||||||
|  |                 width: 14, | ||||||
|  |                 props: 'share', | ||||||
|  |                 def: [                { | ||||||
|  |                     'code': 'acad', | ||||||
|  |                     'name': 'ACAD' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'almar', | ||||||
|  |                     'name': 'Almar' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'commercial', | ||||||
|  |                     'name': 'Commercial' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'common', | ||||||
|  |                     'name': 'Common' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'costing', | ||||||
|  |                     'name': 'Costing' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'marketing', | ||||||
|  |                     'name': 'Marketing' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'photos', | ||||||
|  |                     'name': 'Photos' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'production', | ||||||
|  |                     'name': 'Production' | ||||||
|  |                 }, { | ||||||
|  |                     'code': 'scans', | ||||||
|  |                     'name': 'Scans' | ||||||
|  |                 }] | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         getRowActionsDef() { | ||||||
|  |             let self = this | ||||||
|  |             return [{ | ||||||
|  |                 type: 'primary', | ||||||
|  |                 handler(row) { | ||||||
|  |                     self.$message('Edit clicked') | ||||||
|  |                     console.log('Edit in row clicked', row) | ||||||
|  |                 }, | ||||||
|  |                 name: 'Edit' | ||||||
|  |             }, { | ||||||
|  |                 type: 'primary', | ||||||
|  |                 handler(row) { | ||||||
|  |                     self.$message('RUA in row clicked') | ||||||
|  |                     console.log('RUA in row clicked', row) | ||||||
|  |                 }, | ||||||
|  |                 name: 'RUA' | ||||||
|  |             }] | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | }).$mount('#app'); | ||||||
							
								
								
									
										9
									
								
								js/axios.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								js/axios.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										12
									
								
								js/data-tables.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								js/data-tables.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										128
									
								
								js/en.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										128
									
								
								js/en.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,128 @@ | |||||||
|  | (function (global, factory) { | ||||||
|  |   if (typeof define === "function" && define.amd) { | ||||||
|  |     define('element/locale/en', ['module', 'exports'], factory); | ||||||
|  |   } else if (typeof exports !== "undefined") { | ||||||
|  |     factory(module, exports); | ||||||
|  |   } else { | ||||||
|  |     var mod = { | ||||||
|  |       exports: {} | ||||||
|  |     }; | ||||||
|  |     factory(mod, mod.exports); | ||||||
|  |     global.ELEMENT.lang = global.ELEMENT.lang || {};  | ||||||
|  |     global.ELEMENT.lang.en = mod.exports; | ||||||
|  |   } | ||||||
|  | })(this, function (module, exports) { | ||||||
|  |   'use strict'; | ||||||
|  | 
 | ||||||
|  |   exports.__esModule = true; | ||||||
|  |   exports.default = { | ||||||
|  |     el: { | ||||||
|  |       colorpicker: { | ||||||
|  |         confirm: 'OK', | ||||||
|  |         clear: 'Clear' | ||||||
|  |       }, | ||||||
|  |       datepicker: { | ||||||
|  |         now: 'Now', | ||||||
|  |         today: 'Today', | ||||||
|  |         cancel: 'Cancel', | ||||||
|  |         clear: 'Clear', | ||||||
|  |         confirm: 'OK', | ||||||
|  |         selectDate: 'Select date', | ||||||
|  |         selectTime: 'Select time', | ||||||
|  |         startDate: 'Start Date', | ||||||
|  |         startTime: 'Start Time', | ||||||
|  |         endDate: 'End Date', | ||||||
|  |         endTime: 'End Time', | ||||||
|  |         prevYear: 'Previous Year', | ||||||
|  |         nextYear: 'Next Year', | ||||||
|  |         prevMonth: 'Previous Month', | ||||||
|  |         nextMonth: 'Next Month', | ||||||
|  |         year: '', | ||||||
|  |         month1: 'January', | ||||||
|  |         month2: 'February', | ||||||
|  |         month3: 'March', | ||||||
|  |         month4: 'April', | ||||||
|  |         month5: 'May', | ||||||
|  |         month6: 'June', | ||||||
|  |         month7: 'July', | ||||||
|  |         month8: 'August', | ||||||
|  |         month9: 'September', | ||||||
|  |         month10: 'October', | ||||||
|  |         month11: 'November', | ||||||
|  |         month12: 'December', | ||||||
|  |         // week: 'week',
 | ||||||
|  |         weeks: { | ||||||
|  |           sun: 'Sun', | ||||||
|  |           mon: 'Mon', | ||||||
|  |           tue: 'Tue', | ||||||
|  |           wed: 'Wed', | ||||||
|  |           thu: 'Thu', | ||||||
|  |           fri: 'Fri', | ||||||
|  |           sat: 'Sat' | ||||||
|  |         }, | ||||||
|  |         months: { | ||||||
|  |           jan: 'Jan', | ||||||
|  |           feb: 'Feb', | ||||||
|  |           mar: 'Mar', | ||||||
|  |           apr: 'Apr', | ||||||
|  |           may: 'May', | ||||||
|  |           jun: 'Jun', | ||||||
|  |           jul: 'Jul', | ||||||
|  |           aug: 'Aug', | ||||||
|  |           sep: 'Sep', | ||||||
|  |           oct: 'Oct', | ||||||
|  |           nov: 'Nov', | ||||||
|  |           dec: 'Dec' | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       select: { | ||||||
|  |         loading: 'Loading', | ||||||
|  |         noMatch: 'No matching data', | ||||||
|  |         noData: 'No data', | ||||||
|  |         placeholder: 'Select' | ||||||
|  |       }, | ||||||
|  |       cascader: { | ||||||
|  |         noMatch: 'No matching data', | ||||||
|  |         loading: 'Loading', | ||||||
|  |         placeholder: 'Select' | ||||||
|  |       }, | ||||||
|  |       pagination: { | ||||||
|  |         goto: 'Go to', | ||||||
|  |         pagesize: '/page', | ||||||
|  |         total: 'Total {total}', | ||||||
|  |         pageClassifier: '' | ||||||
|  |       }, | ||||||
|  |       messagebox: { | ||||||
|  |         title: 'Message', | ||||||
|  |         confirm: 'OK', | ||||||
|  |         cancel: 'Cancel', | ||||||
|  |         error: 'Illegal input' | ||||||
|  |       }, | ||||||
|  |       upload: { | ||||||
|  |         deleteTip: 'press delete to remove', | ||||||
|  |         delete: 'Delete', | ||||||
|  |         preview: 'Preview', | ||||||
|  |         continue: 'Continue' | ||||||
|  |       }, | ||||||
|  |       table: { | ||||||
|  |         emptyText: 'No Data', | ||||||
|  |         confirmFilter: 'Confirm', | ||||||
|  |         resetFilter: 'Reset', | ||||||
|  |         clearFilter: 'All', | ||||||
|  |         sumText: 'Sum' | ||||||
|  |       }, | ||||||
|  |       tree: { | ||||||
|  |         emptyText: 'No Data' | ||||||
|  |       }, | ||||||
|  |       transfer: { | ||||||
|  |         noMatch: 'No matching data', | ||||||
|  |         noData: 'No data', | ||||||
|  |         titles: ['List 1', 'List 2'], // to be translated
 | ||||||
|  |         filterPlaceholder: 'Enter keyword', // to be translated
 | ||||||
|  |         noCheckedFormat: '{total} items', // to be translated
 | ||||||
|  |         hasCheckedFormat: '{checked}/{total} checked' // to be translated
 | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }; | ||||||
|  |   module.exports = exports['default']; | ||||||
|  | }); | ||||||
							
								
								
									
										1
									
								
								js/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								js/index.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user