├── src ├── assets │ ├── printer.gif │ └── qrcode.jpg ├── segement │ ├── test.html │ └── circle_progress.html ├── main.js ├── views │ └── Home.vue ├── components │ ├── payment.vue │ ├── printerStatus.vue │ ├── progressBar.vue │ ├── breadScrum.vue │ ├── uploadFile.vue │ └── submit.vue ├── store │ └── index.js ├── router │ └── index.js └── App.vue ├── babel.config.js ├── .gitignore ├── README.md ├── public └── index.html └── package.json /src/assets/printer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rebnerd/print_shop/HEAD/src/assets/printer.gif -------------------------------------------------------------------------------- /src/assets/qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rebnerd/print_shop/HEAD/src/assets/qrcode.jpg -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/segement/test.html: -------------------------------------------------------------------------------- 1 |
    2 |
  1. 1
  2. 3 |
  3. 2
  4. 4 |
  5. 3
  6. 5 |
6 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store' 5 | 6 | createApp(App).use(store).use(router).mount('#app') 7 | -------------------------------------------------------------------------------- /src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # print_shop 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /src/components/payment.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import {createStore} from 'vuex' 2 | 3 | export default createStore({ 4 | state: { 5 | // printer: 'http://v49o743002.qicp.vip', 6 | // printer: 'http://localhost:8080', 7 | // For cors reason 8 | printer: 'http://192.168.66.196:4500', 9 | jobId: '', 10 | money: '0' 11 | }, 12 | mutations: { 13 | // call the handler commit to store it 14 | setJobId(state, jobId) { 15 | state.jobId = jobId 16 | }, 17 | setMoney(state, money) { 18 | state.money = money 19 | } 20 | }, 21 | actions: {}, 22 | modules: {}, 23 | }) 24 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import {createRouter, createWebHashHistory} from 'vue-router' 2 | import printerStatus from "../components/printerStatus"; 3 | import submit from "../components/submit"; 4 | import payment from "../components/payment"; 5 | import uploadFile from "../components/uploadFile"; 6 | 7 | const routes = [ 8 | { 9 | path: '/', 10 | component:printerStatus 11 | }, 12 | { 13 | path:'/create-job', 14 | component: submit 15 | }, 16 | { 17 | path:'/pay', 18 | component: payment, 19 | }, 20 | { 21 | path:'/upload', 22 | component: uploadFile 23 | } 24 | ] 25 | 26 | const router = createRouter({ 27 | history: createWebHashHistory(process.env.BASE_URL), 28 | routes 29 | }) 30 | 31 | export default router 32 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 13 | <%= htmlWebpackPlugin.options.title %> 14 | 15 | 16 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "print_shop", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.24.0", 12 | "core-js": "^3.6.5", 13 | "vue": "^3.0.0", 14 | "vue-router": "^4.0.12", 15 | "vue-status-indicator": "^1.2.1", 16 | "vuex": "^4.0.0-0" 17 | }, 18 | "devDependencies": { 19 | "@vue/cli-plugin-babel": "~4.5.0", 20 | "@vue/cli-plugin-eslint": "~4.5.0", 21 | "@vue/cli-plugin-router": "~4.5.0", 22 | "@vue/cli-plugin-vuex": "~4.5.0", 23 | "@vue/cli-service": "~4.5.0", 24 | "@vue/compiler-sfc": "^3.0.0", 25 | "babel-eslint": "^10.1.0", 26 | "eslint": "^6.7.2", 27 | "eslint-plugin-vue": "^7.0.0" 28 | }, 29 | "eslintConfig": { 30 | "root": true, 31 | "env": { 32 | "node": true 33 | }, 34 | "extends": [ 35 | "plugin:vue/vue3-essential", 36 | "eslint:recommended" 37 | ], 38 | "parserOptions": { 39 | "parser": "babel-eslint" 40 | }, 41 | "rules": {} 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not dead" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | 57 | -------------------------------------------------------------------------------- /src/components/printerStatus.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 54 | 55 | -------------------------------------------------------------------------------- /src/segement/circle_progress.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | 30 | -------------------------------------------------------------------------------- /src/components/progressBar.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 73 | 74 | -------------------------------------------------------------------------------- /src/components/breadScrum.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 39 | 40 | -------------------------------------------------------------------------------- /src/components/uploadFile.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 89 | -------------------------------------------------------------------------------- /src/components/submit.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 121 | 122 | --------------------------------------------------------------------------------