调整了icon

This commit is contained in:
tsiji 2024-12-16 15:48:10 +08:00
parent 7fb321c5bb
commit 5fe536e337
27 changed files with 378 additions and 103 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ node_modules
.env.local
.env.*.local
.prettierrc
# Log files
npm-debug.log*
yarn-debug.log*

BIN
src/assets/mobile/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/mobile/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/mobile/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/mobile/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/mobile/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/mobile/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/assets/mobile/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/mobile/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/mobile/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/mobile/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/mobile/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/mobile/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/mobile/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/mobile/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/mobile/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/mobile/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/mobile/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/mobile/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/mobile/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
src/assets/mobile/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/mobile/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
src/assets/mobile/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,35 +1,66 @@
<template>
<div style="width: 100%; height: 100%; overflow: scroll;">
<div style="background-color: rgb(248, 248, 248); position: fixed; z-index: 1999; height: 3em; width: 100%;">
<div style="width: 100%; height: 100%; overflow: scroll">
<div
style="
background-color: rgb(248, 248, 248);
position: fixed;
z-index: 1999;
height: 3em;
width: 100%;
"
>
<div class="header">
<span>MES工作台</span>
<i class="el-icon-switch-button" style="font-size: 20px;font-weight:bold;" @click="goBack"></i>
<i
class="el-icon-switch-button"
style="font-size: 20px; font-weight: bold"
@click="goBack"
></i>
</div>
</div>
<div style="margin: 5px; margin-top: 0px; margin-bottom: 40px;">
<div style="margin: 5px; margin-top: 0px; margin-bottom: 40px">
<div>
<el-carousel height="130px" indicator-position="outside">
<el-carousel-item v-for="item in bannerList" :key="item.name"
style="background-position: center center;width: 100%;height: 100%;background-size: cover">
<el-carousel-item
v-for="item in bannerList"
:key="item.name"
style="
background-position: center center;
width: 100%;
height: 100%;
background-size: cover;
"
>
<el-image
style="width: 100%;height: 100%;"
style="width: 100%; height: 100%"
:src="item.src"
fit="cover">
fit="cover"
>
</el-image>
</el-carousel-item>
</el-carousel>
</div>
<div v-for="(workbench,index) in this.workBenchList" :key="index">
<div v-if="workbench.title" class="workbench-group-title">{{ workbench.title }}</div>
<div v-for="(workbench, index) in this.workBenchList" :key="index">
<div v-if="workbench.title" class="workbench-group-title">
{{ workbench.title }}
</div>
<el-row :gutter="10">
<el-col v-for="(workbenchItem,index1) in workbench.workbenchItems" :key="index1" :xs="8" :sm="8" :md="6"
:lg="4" :xl="4">
<el-col
v-for="(workbenchItem, index1) in workbench.workbenchItems"
:key="index1"
:xs="8"
:sm="8"
:md="6"
:lg="4"
:xl="4"
>
<div class="home-item-style">
<div
@click="navTo(workbenchItem.navTo)">
<div @click="navTo(workbenchItem.navTo)">
<i :class="workbenchItem.iconClass"></i>
</div>
<span class="home-item-text">{{ workbenchItem.description }}</span>
<span class="home-item-text">{{
workbenchItem.description
}}</span>
</div>
</el-col>
</el-row>
@ -39,28 +70,30 @@
</template>
<script>
import {mapGetters} from 'vuex'
import {getWorkbench} from './workbench-menu-config'
import { mapGetters } from 'vuex'
import { getWorkbench } from './workbench-menu-config'
import MainTabBar from './main-tab-bar.vue'
import {handleImg} from "@/util";
import {isBlank} from "@/util/string";
import {isMobileTerminal} from "@/util/validate";
import { handleImg } from '@/util'
import { isBlank } from '@/util/string'
import { isMobileTerminal } from '@/util/validate'
export default {
name: 'home',
components: {MainTabBar},
components: { MainTabBar },
data() {
return {
bannerList: [
{
name: "banner1",
src: "./img/bg/mobile-banner1.jpg"
}, {
name: "banner2",
src: "./img/bg/mobile-banner2.jpg"
}, {
name: "banner3",
src: "./img/bg/mobile-banner3.jpg"
name: 'banner1',
src: './img/bg/mobile-banner1.jpg'
},
{
name: 'banner2',
src: './img/bg/mobile-banner2.jpg'
},
{
name: 'banner3',
src: './img/bg/mobile-banner3.jpg'
}
],
workBenchList: [],
@ -68,16 +101,14 @@ export default {
}
},
created() {
this.$store.dispatch("GetMenu", {type: true, id: null}).then((data) => {
this.$store.dispatch('GetMenu', { type: true, id: null }).then((data) => {
if (data.length !== 0) {
this.workBenchList = getWorkbench(data);
this.workBenchList = getWorkbench(data)
}
});
this.getUserInfo();
},
mounted: function () {
})
this.getUserInfo()
},
mounted: function () {},
watch: {
userInfo() {
handleImg(this.userInfo.avatar, 'thumbnail')
@ -91,13 +122,13 @@ export default {
},
methods: {
navTo(path) {
let that = this;
let that = this
that.$router.push({
path: path
})
},
goBack() {
if(window && window.android) {
if (window && window.android) {
// 返回到工作台
return window.android.backMainActivity()
}
@ -120,12 +151,15 @@ export default {
},
meetingScan() {
if (window != undefined && typeof window.android !== 'undefined') {
window.android.scanQrCode();
window.android.scanQrCode()
}
},
scanSuccess(text) {
let urlParams = this.getParams(text);
this.$router.push({path: '/mobile/app-sign-in', query: {handle: urlParams["handle"]}})
let urlParams = this.getParams(text)
this.$router.push({
path: '/mobile/app-sign-in',
query: { handle: urlParams['handle'] }
})
},
scanError(text) {
// this.$alert(text, "扫码失败", {
@ -135,32 +169,31 @@ export default {
// });
},
getParams(path) {
let pObj = {};
let splitStr = path.split("?");
pObj.url = splitStr[0];
let pObj = {}
let splitStr = path.split('?')
pObj.url = splitStr[0]
if (splitStr.length > 1) {
for(let i = 1; i <= splitStr.length - 1; i++) {
let str = splitStr[i];
let strs = str.split("&");
for(let i = 0; i < strs.length; i ++) {
pObj[strs[i].split("=")[0]]=strs[i].split("=")[1];
for (let i = 1; i <= splitStr.length - 1; i++) {
let str = splitStr[i]
let strs = str.split('&')
for (let i = 0; i < strs.length; i++) {
pObj[strs[i].split('=')[0]] = strs[i].split('=')[1]
}
}
}
if(isBlank(pObj.viewClass)){
pObj.viewClass = 'icon-color03';
if (isBlank(pObj.viewClass)) {
pObj.viewClass = 'icon-color03'
}
if(isBlank(pObj.iconClass)){
pObj.iconClass = 'home-item-icon-list';
if (isBlank(pObj.iconClass)) {
pObj.iconClass = 'home-item-icon-list'
}
return pObj;
return pObj
}
}
}
</script>
<style>
.header {
background-color: #ffffff;
display: flex;
@ -212,9 +245,9 @@ export default {
.home-item-icon-list {
display: inline-block;
background-image: url("../../assets/mobile/mobile-list.png");
background-image: url('../../assets/mobile/mobile-list.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(0, 150, 250, 0.1);
border-radius: 30%;
@ -224,9 +257,9 @@ export default {
.mobile-scan-icon {
display: inline-block;
background-image: url("../../assets/mobile/scan.png");
background-image: url('../../assets/mobile/scan.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(70, 216, 7, 0.1);
border-radius: 30%;
@ -236,9 +269,9 @@ export default {
.mobile-meeting-plan-icon {
display: inline-block;
background-image: url("../../assets/mobile/meeting-plan.png");
background-image: url('../../assets/mobile/meeting-plan.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(0, 150, 250, 0.1);
border-radius: 30%;
@ -248,9 +281,9 @@ export default {
.mobile-meeting-task-icon {
display: inline-block;
background-image: url("../../assets/mobile/meeting-task.png");
background-image: url('../../assets/mobile/meeting-task.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(250, 83, 0, 0.1);
border-radius: 30%;
@ -260,9 +293,9 @@ export default {
.mobile-meeting-dashboard-icon {
display: inline-block;
background-image: url("../../assets/mobile/meeting-dashboard.png");
background-image: url('../../assets/mobile/meeting-dashboard.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(70, 216, 7, 0.1);
border-radius: 30%;
@ -270,11 +303,265 @@ export default {
height: 2.5em;
}
.iconcangku_kucunshuaxin {
display: inline-block;
background-image: url('../../assets/mobile/warhouse-map.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon1 {
display: inline-block;
background-image: url('../../assets/mobile/1.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon2 {
display: inline-block;
background-image: url('../../assets/mobile/2.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon3 {
display: inline-block;
background-image: url('../../assets/mobile/3.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon4 {
display: inline-block;
background-image: url('../../assets/mobile/4.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon5 {
display: inline-block;
background-image: url('../../assets/mobile/5.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon6 {
display: inline-block;
background-image: url('../../assets/mobile/6.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon7 {
display: inline-block;
background-image: url('../../assets/mobile/7.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon8 {
display: inline-block;
background-image: url('../../assets/mobile/8.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon9 {
display: inline-block;
background-image: url('../../assets/mobile/9.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon10 {
display: inline-block;
background-image: url('../../assets/mobile/10.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon11 {
display: inline-block;
background-image: url('../../assets/mobile/11.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon12 {
display: inline-block;
background-image: url('../../assets/mobile/12.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon13 {
display: inline-block;
background-image: url('../../assets/mobile/13.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon14 {
display: inline-block;
background-image: url('../../assets/mobile/14.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon15 {
display: inline-block;
background-image: url('../../assets/mobile/15.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon16 {
display: inline-block;
background-image: url('../../assets/mobile/16.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon17 {
display: inline-block;
background-image: url('../../assets/mobile/17.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon18 {
display: inline-block;
background-image: url('../../assets/mobile/18.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon19 {
display: inline-block;
background-image: url('../../assets/mobile/19.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon20 {
display: inline-block;
background-image: url('../../assets/mobile/20.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon21 {
display: inline-block;
background-image: url('../../assets/mobile/21.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.icon22 {
display: inline-block;
background-image: url('../../assets/mobile/22.png');
background-position: center;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(127, 127, 127, 0.06);
border-radius: 30%;
width: 2.5em;
height: 2.5em;
}
.mobile-on-duty-change-shift-icon {
display: inline-block;
background-image: url("../../assets/mobile/change-shift1.png");
background-image: url('../../assets/mobile/change-shift1.png');
background-position: center;
background-size: 1em 1em;
background-size: 24px;
background-repeat: no-repeat;
background-color: rgba(216, 118, 7, 0.1);
border-radius: 30%;
@ -290,5 +577,4 @@ export default {
height: 4em;
width: 100%;
}
</style>

View File

@ -6,18 +6,11 @@
"strict": true,
"allowJs": true,
"baseUrl": "./",
"types": [
"webpack-env"
],
"types": ["webpack-env"],
"paths": {
"@/*": [
"src/*"
]
"@/*": ["src/*"]
},
"lib": [
"dom",
"es2016"
]
"lib": ["dom", "es2016"]
},
"include": [
"src/**/*.js",
@ -26,7 +19,5 @@
"src/**/*.vue",
"src/**/*.d.ts"
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}

View File

@ -2,7 +2,8 @@
* 配置参考:
* https://cli.vuejs.org/zh/config/
*/
const url = 'http://mom-gateway:9999'
//const url = 'http://mom-gateway:9999'
const url = 'http://192.168.110.148:11006'
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css']
const path = require('path')
@ -13,22 +14,14 @@ function resolve(dir) {
}
module.exports = {
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => {
chainWebpack: (config) => {
const entry = config.entry('app')
entry
.add('babel-polyfill')
.end()
entry
.add('classlist-polyfill')
.end()
entry.add('babel-polyfill').end()
entry.add('classlist-polyfill').end()
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/assets/icons'))
.end()
config.module.rule('svg').exclude.add(resolve('src/assets/icons')).end()
config.module
.rule('icons')
.test(/\.svg$/)
@ -48,7 +41,7 @@ module.exports = {
.options({
appendTsSuffixTo: [/\.vue$/]
})
.tap(options => {
.tap((options) => {
return options
})
},
@ -68,14 +61,18 @@ module.exports = {
onEnd: {
delete: ['./target'],
mkdir: ['./target'],
copy: [{
source: './dist',
destination: './target/dist/dist/'
}],
archive: [{
source: './target/dist',
destination: './target/dist.zip'
}]
copy: [
{
source: './dist',
destination: './target/dist/dist/'
}
],
archive: [
{
source: './target/dist',
destination: './target/dist.zip'
}
]
}
}
})