feat:新增icon
1
.gitignore
vendored
@ -17,6 +17,7 @@ yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.prettierrc
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
|
||||
BIN
src/assets/mobile/1.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/mobile/10.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/mobile/11.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/assets/mobile/12.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/mobile/13.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/mobile/14.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/assets/mobile/15.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/mobile/16.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/mobile/17.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/mobile/18.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/mobile/19.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/mobile/2.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/mobile/20.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/mobile/21.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/mobile/22.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/mobile/3.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/mobile/4.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/mobile/5.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/mobile/6.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/mobile/7.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/mobile/8.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/mobile/9.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/mobile/warhouse-map.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
@ -1,109 +1,116 @@
|
||||
<template>
|
||||
<div class="avue-icon-select">
|
||||
<el-input :placeholder="placeholder"
|
||||
v-model="value"
|
||||
:size="size"
|
||||
:clearable="disabled?false:clearable"
|
||||
:disabled="disabled"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-button slot="append" :icon="value" @click.native="handleShow"></el-button>
|
||||
<el-input
|
||||
:placeholder="placeholder"
|
||||
v-model="value"
|
||||
:size="size"
|
||||
:clearable="disabled ? false : clearable"
|
||||
:disabled="disabled"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
:icon="value"
|
||||
@click.native="handleShow"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<el-dialog :title="placeholder"
|
||||
:modal-append-to-body="false"
|
||||
append-to-body
|
||||
:visible.sync="box"
|
||||
width="50%">
|
||||
<avue-tabs :option="option"
|
||||
@change="handleTabs"></avue-tabs>
|
||||
|
||||
<el-dialog
|
||||
:title="placeholder"
|
||||
:modal-append-to-body="false"
|
||||
append-to-body
|
||||
:visible.sync="box"
|
||||
width="50%"
|
||||
>
|
||||
<avue-tabs :option="option" @change="handleTabs"></avue-tabs>
|
||||
<div class="avue-input-icon__list">
|
||||
<div class="avue-input-icon__item"
|
||||
v-for="(item,index) in list"
|
||||
:key="index">
|
||||
<div
|
||||
class="avue-input-icon__item"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<span class="avue-icon">
|
||||
<i :class="item"
|
||||
@click="handleSubmit(item)"></i>
|
||||
<i :class="item" @click="handleSubmit(item)"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "icon-select",
|
||||
props: {
|
||||
iconList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
export default {
|
||||
name: 'icon-select',
|
||||
props: {
|
||||
iconList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
box: false,
|
||||
tabs: {}
|
||||
};
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
computed: {
|
||||
list() {
|
||||
return this.tabs.list || [];
|
||||
},
|
||||
option() {
|
||||
return {
|
||||
column: this.iconList
|
||||
};
|
||||
}
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
created() {
|
||||
this.tabs = this.iconList[0] || {};
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
methods: {
|
||||
handleTabs(tabs) {
|
||||
this.tabs = tabs;
|
||||
},
|
||||
handleSubmit(item) {
|
||||
this.box = false;
|
||||
// this.text = item;
|
||||
this.handleChange(item);
|
||||
},
|
||||
handleShow() {
|
||||
if (this.disabled || this.readonly) return;
|
||||
this.box = true;
|
||||
},
|
||||
handleChange (value) {
|
||||
let result = value;
|
||||
// this.text = result;
|
||||
if (typeof this.change === 'function') {
|
||||
this.change({ value: result, column: this.column });
|
||||
}
|
||||
this.$emit('input', result);
|
||||
this.$emit('change', result);
|
||||
}
|
||||
size: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
box: false,
|
||||
tabs: {},
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
list() {
|
||||
return this.tabs.list || []
|
||||
},
|
||||
option() {
|
||||
return {
|
||||
column: this.iconList,
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.tabs = this.iconList[0] || {}
|
||||
},
|
||||
methods: {
|
||||
handleTabs(tabs) {
|
||||
this.tabs = tabs
|
||||
},
|
||||
handleSubmit(item) {
|
||||
this.box = false
|
||||
// this.text = item;
|
||||
this.handleChange(item)
|
||||
},
|
||||
handleShow() {
|
||||
if (this.disabled || this.readonly) return
|
||||
this.box = true
|
||||
},
|
||||
handleChange(value) {
|
||||
let result = value
|
||||
// this.text = result;
|
||||
if (typeof this.change === 'function') {
|
||||
this.change({ value: result, column: this.column })
|
||||
}
|
||||
this.$emit('input', result)
|
||||
this.$emit('change', result)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -3,16 +3,17 @@
|
||||
const env = process.env
|
||||
const baseUrl = ''
|
||||
// 图表库为avue和pig2套地址
|
||||
const iconfontUrl = ['//at.alicdn.com/t/font_667895_v7uduh4zui.css', '//at.alicdn.com/t/c/font_1638883_9yea0jvav1.css', '//at.alicdn.com/t/c/font_3136813_ghvspbz1i69.css']
|
||||
const iconfontUrl = [
|
||||
'//at.alicdn.com/t/font_667895_v7uduh4zui.css',
|
||||
'//at.alicdn.com/t/c/font_1638883_9yea0jvav1.css',
|
||||
'//at.alicdn.com/t/c/font_3136813_ghvspbz1i69.css',
|
||||
]
|
||||
const codeUrl = `${window.location.origin}/code`
|
||||
const actUrl = `${window.location.origin}/act/modeler.html?modelId=`
|
||||
const publicKey= `-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCm7Go9CWVEIHyTVVxyadlYtoCXi84nlmgD8yAVOEUFnCmh0O6Nja/pMAs9QpPtLupbQlLyqN5IRI7iau9VI+XszFxGMqtcTvJ51utq5e0FXtgbRayp7jYHeBC5cQYU5Px9U8zUFezE16Z9za1UkurpDJ2D4ecf3wtFDssnnxFc6wIDAQAB-----END PUBLIC KEY-----`
|
||||
const publicKey = `-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCm7Go9CWVEIHyTVVxyadlYtoCXi84nlmgD8yAVOEUFnCmh0O6Nja/pMAs9QpPtLupbQlLyqN5IRI7iau9VI+XszFxGMqtcTvJ51utq5e0FXtgbRayp7jYHeBC5cQYU5Px9U8zUFezE16Z9za1UkurpDJ2D4ecf3wtFDssnnxFc6wIDAQAB-----END PUBLIC KEY-----`
|
||||
if (env.NODE_ENV === 'development') {
|
||||
|
||||
} else if (env.NODE_ENV === 'production') {
|
||||
|
||||
} else if (env.NODE_ENV === 'test') {
|
||||
|
||||
}
|
||||
let filePreviewService = 'http://218.4.105.218:8012'
|
||||
if (env.NODE_ENV === 'development') {
|
||||
@ -29,5 +30,5 @@ export {
|
||||
codeUrl,
|
||||
env,
|
||||
publicKey,
|
||||
filePreviewService
|
||||
filePreviewService,
|
||||
}
|
||||
|
||||
@ -1,500 +1,493 @@
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export default [
|
||||
{
|
||||
label: i18n.t('admin.aliyunIcon'),
|
||||
list: [
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quanxianguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yonghuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jiaoseguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-web-icon-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xitongguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-rizhiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-navicon-zdgl',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weibiaoti46',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-miyue',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shouji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-miyue',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-denglvlingpai',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-luyou',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-msnui-supervise',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-server',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wendang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gtsquanjushiwufuwuGTS',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caidanguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guanwang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guanwangfangwen',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guiji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-fensiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongzhonghao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-anniu_weixincaidanlianjie',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weixincaidan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xiaoxiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhexiantu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-canshu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-erji-zuhushouye',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-pay6zhifu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhifuqudaoguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-dingdan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tuikuan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-webicon14',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shouyintai',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wenjianguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mysql',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shejiyukaifa-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-record',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-biaodanbiaoqian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-TagAdd',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-sucaisads',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-huifu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bangzhushouji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-icon-p_mrpbaobiao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-liuliang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tag',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quanpingzuidahua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zuixiaohua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bug2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bofangqi-suoping',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mesicon-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-MES',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhihang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zanting',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tuiguangzhong',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-hebing1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-hebing2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongyiluxian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caozuo',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-danjuweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeiweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuanzuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-qiyeweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bohuiyuanyinguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliao_wuzi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliaobaobeidan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-icon_shibiebuliangjilu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quexiandaima',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zidingyi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bianhao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-banciweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mendianweihushuju',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weizhixinxiweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-daoru',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weihuchengben',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-24gl-printer',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-houtaiguanli-shebeiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliaotianchong',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-beipinbeijianshenling-419',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guzhangweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-lanmupeizhi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan3',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yingji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebei',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-queren',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yingjiliebiao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongdan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeidianjian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-qiehuanchengshi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zidingyi1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-cz-gjdj',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeidianjian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yilaiguanxi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-24gl-tags3',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-REXdayinmoban_',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caigoutuiliaochaxun',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caigoutuiliao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shangyi-copy',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xiayi-copy',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-huowuzhuangxiang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-fuwujihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-renwuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-kaoqinjiaban',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bumenguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-a-01changjing',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-chuku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-querenruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-querenruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jianyanjihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-entity',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: i18n.t('admin.aliyunIcon'),
|
||||
list: [
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quanxianguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yonghuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jiaoseguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-web-icon-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xitongguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-rizhiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-navicon-zdgl',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weibiaoti46',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-miyue',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shouji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-miyue',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-denglvlingpai',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-luyou',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-msnui-supervise',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-server',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wendang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gtsquanjushiwufuwuGTS',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caidanguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guanwang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guanwangfangwen',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guiji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-fensiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongzhonghao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-anniu_weixincaidanlianjie',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weixincaidan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xiaoxiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhexiantu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-canshu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-erji-zuhushouye',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-pay6zhifu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhifuqudaoguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-dingdan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tuikuan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-webicon14',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shouyintai',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wenjianguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mysql',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shejiyukaifa-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-record',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-biaodanbiaoqian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-TagAdd',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-sucaisads',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-huifu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bangzhushouji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-icon-p_mrpbaobiao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-liuliang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tag',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quanpingzuidahua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zuixiaohua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bug2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bofangqi-suoping',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mesicon-',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-MES',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zhihang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zanting',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-tuiguangzhong',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-hebing1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-hebing2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongyiluxian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caozuo',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-danjuweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeiweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuanzuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-qiyeweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bohuiyuanyinguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliao_wuzi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliaobaobeidan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-icon_shibiebuliangjilu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-quexiandaima',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zidingyi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bianhao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-banciweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-mendianweihushuju',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weizhixinxiweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-daoru',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-weihuchengben',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-24gl-printer',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-houtaiguanli-shebeiguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-wuliaotianchong',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-beipinbeijianshenling-419',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-guzhangweihu',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-lanmupeizhi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan3',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yingji',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebei',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-queren',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yingjiliebiao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongdan',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeidianjian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-qiehuanchengshi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-zidingyi1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-gongju2',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-cz-gjdj',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shebeidianjian',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ziyuan1',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-yilaiguanxi',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-24gl-tags3',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-REXdayinmoban_',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caigoutuiliaochaxun',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-caigoutuiliao',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-shangyi-copy',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-xiayi-copy',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-huowuzhuangxiang',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-fuwujihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-renwuguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-kaoqinjiaban',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-bumenguanli',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-a-01changjing',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-ruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-chuku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-querenruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-querenruku',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-jianyanjihua',
|
||||
},
|
||||
{
|
||||
label: ' ',
|
||||
value: 'icon-entity',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '移动端图标',
|
||||
list: [
|
||||
'home-item-icon-list',
|
||||
'mobile-scan-icon',
|
||||
'mobile-meeting-plan-icon',
|
||||
'mobile-meeting-task-icon',
|
||||
'mobile-meeting-dashboard-icon',
|
||||
'mobile-on-duty-change-shift-icon'
|
||||
]
|
||||
}
|
||||
list: new Array(22).fill('').map((_, index) => `icon${index + 1}`),
|
||||
},
|
||||
]
|
||||
|
||||
@ -12,102 +12,106 @@ import i18n from '@/i18n'
|
||||
axios.defaults.timeout = 300000
|
||||
// 返回其他状态吗
|
||||
axios.defaults.validateStatus = function (status) {
|
||||
return status >= 200 && status <= 500 // 默认的
|
||||
return status >= 200 && status <= 500 // 默认的
|
||||
}
|
||||
// 跨域请求,允许保存cookie
|
||||
axios.defaults.withCredentials = true
|
||||
// NProgress Configuration
|
||||
NProgress.configure({
|
||||
showSpinner: false,
|
||||
showSpinner: false,
|
||||
})
|
||||
|
||||
// HTTPrequest拦截
|
||||
axios.interceptors.request.use(
|
||||
(config) => {
|
||||
NProgress.start() // start progress bar
|
||||
const TENANT_ID = getStore({ name: 'tenantId' })
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
const token = store.getters.access_token
|
||||
if (token && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + token // token
|
||||
}
|
||||
if (TENANT_ID) {
|
||||
config.headers['TENANT-ID'] = TENANT_ID // 租户ID
|
||||
}
|
||||
// 指定瀏覽器語系
|
||||
config.headers['Accept-Language'] = navigator.language
|
||||
(config) => {
|
||||
NProgress.start() // start progress bar
|
||||
const TENANT_ID = getStore({ name: 'tenantId' })
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
const token = store.getters.access_token
|
||||
if (token && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + token // token
|
||||
}
|
||||
if (TENANT_ID) {
|
||||
config.headers['TENANT-ID'] = TENANT_ID // 租户ID
|
||||
}
|
||||
// 指定瀏覽器語系
|
||||
config.headers['Accept-Language'] = navigator.language
|
||||
|
||||
// headers中配置serialize为true开启序列化
|
||||
if (config.method === 'post' && config.headers.serialize) {
|
||||
config.data = serialize(config.data)
|
||||
delete config.data.serialize
|
||||
}
|
||||
// headers中配置serialize为true开启序列化
|
||||
if (config.method === 'post' && config.headers.serialize) {
|
||||
config.data = serialize(config.data)
|
||||
delete config.data.serialize
|
||||
}
|
||||
|
||||
if (config.method === 'get') {
|
||||
config.paramsSerializer = function (params) {
|
||||
return qs.stringify(params, { arrayFormat: 'repeat' })
|
||||
}
|
||||
}
|
||||
if (config.method === 'get') {
|
||||
config.paramsSerializer = function (params) {
|
||||
return qs.stringify(params, { arrayFormat: 'repeat' })
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// HTTPresponse拦截
|
||||
axios.interceptors.response.use(
|
||||
(res) => {
|
||||
NProgress.done()
|
||||
store.commit('SET_API_STATUS', '#00a870')
|
||||
const status = Number(res.status) || 200
|
||||
const message = res.data.msg || errorCode[status] || errorCode['default']
|
||||
(res) => {
|
||||
NProgress.done()
|
||||
store.commit('SET_API_STATUS', '#00a870')
|
||||
const status = Number(res.status) || 200
|
||||
const message = res.data.msg || errorCode[status] || errorCode['default']
|
||||
|
||||
// 后台定义 424 针对令牌过去的特殊响应码
|
||||
if (status === 424) {
|
||||
MessageBox.alert(i18n.t('wel.tokenStatusExpired'), i18n.t('wel.systemMessage'), {
|
||||
confirmButtonText: i18n.t('wel.relogin'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
// 刷新登录页面,避免多次弹框
|
||||
window.location.reload()
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
return Promise.reject(new Error(message))
|
||||
}
|
||||
// 后台定义 424 针对令牌过去的特殊响应码
|
||||
if (status === 424) {
|
||||
MessageBox.alert(
|
||||
i18n.t('wel.tokenStatusExpired'),
|
||||
i18n.t('wel.systemMessage'),
|
||||
{
|
||||
confirmButtonText: i18n.t('wel.relogin'),
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
// 刷新登录页面,避免多次弹框
|
||||
window.location.reload()
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
return Promise.reject(new Error(message))
|
||||
}
|
||||
|
||||
if(status === 426 && message === 'CHANGE_PASSWORD_REQUIRED') {
|
||||
if (status === 426 && message === 'CHANGE_PASSWORD_REQUIRED') {
|
||||
// 強制修改密碼, 不彈出訊息
|
||||
return Promise.reject(new Error(message))
|
||||
}
|
||||
|
||||
if (status !== 200 || res.data.code === 1) {
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
})
|
||||
store.commit('SET_API_STATUS', '#e34d59')
|
||||
return Promise.reject(new Error(message))
|
||||
}
|
||||
if (status !== 200 || res.data.code === 1) {
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
})
|
||||
store.commit('SET_API_STATUS', '#e34d59')
|
||||
return Promise.reject(new Error(message))
|
||||
}
|
||||
|
||||
return res
|
||||
},
|
||||
(error) => {
|
||||
// 处理 503 网络异常
|
||||
if (error.response.status === 503) {
|
||||
Message({
|
||||
message: error.response.data.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
NProgress.done()
|
||||
store.commit('SET_API_STATUS', '#e34d59')
|
||||
return Promise.reject(new Error(error))
|
||||
}
|
||||
return res
|
||||
},
|
||||
(error) => {
|
||||
// 处理 503 网络异常
|
||||
if (error.response.status === 503) {
|
||||
Message({
|
||||
message: error.response.data.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
NProgress.done()
|
||||
store.commit('SET_API_STATUS', '#e34d59')
|
||||
return Promise.reject(new Error(error))
|
||||
}
|
||||
)
|
||||
|
||||
export default axios
|
||||
|
||||
@ -1,41 +1,54 @@
|
||||
<template>
|
||||
<!-- 添加或修改菜单对话框 -->
|
||||
<div class="execution">
|
||||
<el-dialog
|
||||
:title="!form.menuId ? this.$t('common.new') : $t('admin.modify')"
|
||||
:visible.sync="visible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:inline-message="true"
|
||||
label-width="120px"
|
||||
label-suffix=":"
|
||||
hide-required-asterisk
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('admin.menuType')" prop="menuType">
|
||||
<el-radio-group v-model="form.menuType" size="small" @input="clearAllValid">
|
||||
<el-radio-button label="0">{{ $t('admin.leftMenu') }}</el-radio-button>
|
||||
<el-radio-button label="1">{{ $t('admin.button') }}</el-radio-button>
|
||||
<el-radio-button label="2">{{ $t('admin.topMenu') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="parentId">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.superiorMenu')"
|
||||
:require="rules.parentId && rules.parentId.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<!-- 添加或修改菜单对话框 -->
|
||||
<div class="execution">
|
||||
<el-dialog
|
||||
:title="!form.menuId ? this.$t('common.new') : $t('admin.modify')"
|
||||
:visible.sync="visible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:inline-message="true"
|
||||
label-width="120px"
|
||||
label-suffix=":"
|
||||
hide-required-asterisk
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('admin.menuType')" prop="menuType">
|
||||
<el-radio-group
|
||||
v-model="form.menuType"
|
||||
size="small"
|
||||
@input="clearAllValid"
|
||||
>
|
||||
<el-radio-button label="0">{{
|
||||
$t('admin.leftMenu')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="1">{{
|
||||
$t('admin.button')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="2">{{
|
||||
$t('admin.topMenu')
|
||||
}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="parentId">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.superiorMenu')"
|
||||
:require="
|
||||
rules.parentId &&
|
||||
rules.parentId.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<treeselect
|
||||
v-model="form.parentId"
|
||||
:options="menuOptions"
|
||||
@ -44,173 +57,218 @@
|
||||
:placeholder="$t('admin.selectSuperiorMenu')"
|
||||
@select="menuSelect"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item :label="$t('admin.icon')" prop="icon" v-if="form.menuType !== '1'">
|
||||
<avue-input-icon v-model="form.icon" :icon-list="iconList"></avue-input-icon>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.name')"
|
||||
:require="rules.name && rules.name.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
:placeholder="$t('admin.enterMenuName')"
|
||||
@input="clearValid($event, 'name')"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
type="text"
|
||||
icon="i carbon:earth-filled"
|
||||
style="padding: 14px 0 0 10px; font-size: 16px"
|
||||
@click.stop="language"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="path" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.routeAddress')"
|
||||
:require="rules.path && rules.path.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.path"
|
||||
:placeholder="$t('admin.enterRouteAddress')"
|
||||
@input="clearValid($event, 'path')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="permission" v-if="form.menuType === '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.permissionIdentifier')"
|
||||
:require="rules.permission && rules.permission.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.permission"
|
||||
:placeholder="$t('admin.enterPermissionIdentifier')"
|
||||
maxlength="50"
|
||||
@input="clearValid($event, 'permission')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sortOrder">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.sortOrder')"
|
||||
:require="rules.sortOrder && rules.sortOrder.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input-number v-model="form.sortOrder" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="keepAlive" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.routeCache')"
|
||||
:require="rules.keepAlive && rules.keepAlive.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.keepAlive">
|
||||
<el-radio-button label="0">{{ $t('common.promptMessage.no') }}</el-radio-button>
|
||||
<el-radio-button label="1">{{ $t('common.promptMessage.yes') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="display" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.isDisplayed')"
|
||||
:require="rules.display && rules.display.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.display">
|
||||
<el-radio-button label="0">{{ $t('common.promptMessage.no') }}</el-radio-button>
|
||||
<el-radio-button label="1">{{ $t('common.promptMessage.yes') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="newWindow" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.openMethod')"
|
||||
:require="rules.newWindow && rules.newWindow.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.newWindow">
|
||||
<el-radio-button label="0">{{ $t('admin.default') }}</el-radio-button>
|
||||
<el-radio-button label="1">{{ $t('admin.externalNewWindow') }}</el-radio-button>
|
||||
<el-radio-button label="2">{{ $t('admin.internalNewWindow') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item
|
||||
:label="$t('admin.icon')"
|
||||
prop="icon"
|
||||
v-if="form.menuType !== '1'"
|
||||
>
|
||||
<avue-input-icon
|
||||
v-model="form.icon"
|
||||
:icon-list="iconList"
|
||||
></avue-input-icon>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.name')"
|
||||
:require="rules.name && rules.name.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
:placeholder="$t('admin.enterMenuName')"
|
||||
@input="clearValid($event, 'name')"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
type="text"
|
||||
icon="i carbon:earth-filled"
|
||||
style="padding: 14px 0 0 10px; font-size: 16px"
|
||||
@click.stop="language"
|
||||
/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="path" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.routeAddress')"
|
||||
:require="rules.path && rules.path.some((rule) => rule.required)"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.path"
|
||||
:placeholder="$t('admin.enterRouteAddress')"
|
||||
@input="clearValid($event, 'path')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="permission" v-if="form.menuType === '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.permissionIdentifier')"
|
||||
:require="
|
||||
rules.permission &&
|
||||
rules.permission.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="form.permission"
|
||||
:placeholder="$t('admin.enterPermissionIdentifier')"
|
||||
maxlength="50"
|
||||
@input="clearValid($event, 'permission')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sortOrder">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.sortOrder')"
|
||||
:require="
|
||||
rules.sortOrder &&
|
||||
rules.sortOrder.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-input-number
|
||||
v-model="form.sortOrder"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="keepAlive" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.routeCache')"
|
||||
:require="
|
||||
rules.keepAlive &&
|
||||
rules.keepAlive.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.keepAlive">
|
||||
<el-radio-button label="0">{{
|
||||
$t('common.promptMessage.no')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="1">{{
|
||||
$t('common.promptMessage.yes')
|
||||
}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="display" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.isDisplayed')"
|
||||
:require="
|
||||
rules.display && rules.display.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.display">
|
||||
<el-radio-button label="0">{{
|
||||
$t('common.promptMessage.no')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="1">{{
|
||||
$t('common.promptMessage.yes')
|
||||
}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="newWindow" v-if="form.menuType !== '1'">
|
||||
<template slot="label">
|
||||
<tooltip
|
||||
:content="$t('admin.openMethod')"
|
||||
:require="
|
||||
rules.newWindow &&
|
||||
rules.newWindow.some((rule) => rule.required)
|
||||
"
|
||||
>
|
||||
</tooltip>
|
||||
</template>
|
||||
<el-radio-group v-model="form.newWindow">
|
||||
<el-radio-button label="0">{{
|
||||
$t('admin.default')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="1">{{
|
||||
$t('admin.externalNewWindow')
|
||||
}}</el-radio-button>
|
||||
<el-radio-button label="2">{{
|
||||
$t('admin.internalNewWindow')
|
||||
}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-col v-if="form.menuType !== '1'" :span="24" style="text-align: left">
|
||||
<el-button type="text" @click="addActivityOption()">{{ $t('admin.addRule') }} </el-button>
|
||||
</el-col>
|
||||
<el-table
|
||||
v-if="form.menuType !== '1'"
|
||||
size="mini"
|
||||
height="200"
|
||||
:data="form.activityOptionList"
|
||||
border
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="optionName" :label="$t('admin.rule')">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="mini" v-model="scope.row.optionName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="optionValue" :label="$t('mes.value')">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="mini" v-model="scope.row.optionValue"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('crud.menu')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
class="el-tag el-tag--danger el-tag--mini"
|
||||
style="cursor: pointer"
|
||||
@click="removeActivityOption(scope.row, scope.$index)"
|
||||
>{{ $t('common.delete') }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-col v-if="form.menuType !== '1'" :span="24" style="text-align: left">
|
||||
<el-button type="text" @click="addActivityOption()"
|
||||
>{{ $t('admin.addRule') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-table
|
||||
v-if="form.menuType !== '1'"
|
||||
size="mini"
|
||||
height="200"
|
||||
:data="form.activityOptionList"
|
||||
border
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="optionName" :label="$t('admin.rule')">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="mini" v-model="scope.row.optionName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="optionValue" :label="$t('mes.value')">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="mini" v-model="scope.row.optionValue"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('crud.menu')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
class="el-tag el-tag--danger el-tag--mini"
|
||||
style="cursor: pointer"
|
||||
@click="removeActivityOption(scope.row, scope.$index)"
|
||||
>{{ $t('common.delete') }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dataFormSubmit">{{ $t('crud.filter.submitBtn') }} </el-button>
|
||||
<el-button @click="visible = false">{{ $t('crud.filter.cancelBtn') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<lang
|
||||
:visible.sync="showLanguage"
|
||||
:menu-id="form.menuId"
|
||||
:languages="form.languages"
|
||||
@afterConfirm="setLanguage"
|
||||
/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dataFormSubmit"
|
||||
>{{ $t('crud.filter.submitBtn') }}
|
||||
</el-button>
|
||||
<el-button @click="visible = false">{{
|
||||
$t('crud.filter.cancelBtn')
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<lang
|
||||
:visible.sync="showLanguage"
|
||||
:menu-id="form.menuId"
|
||||
:languages="form.languages"
|
||||
@afterConfirm="setLanguage"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -226,193 +284,230 @@ import Lang from './language.vue'
|
||||
import tooltip from '@/components/tooltip/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'Menu',
|
||||
components: { Treeselect, TableForm, Lang, tooltip },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 菜单树选项
|
||||
menuOptions: [],
|
||||
// 是否显示弹出层
|
||||
visible: false,
|
||||
// 图标
|
||||
iconList: iconList,
|
||||
form: {
|
||||
menuId: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
icon: undefined,
|
||||
permission: undefined,
|
||||
menuType: '0',
|
||||
keepAlive: '0',
|
||||
sortOrder: 999,
|
||||
display: '1',
|
||||
newWindow: '0',
|
||||
activityOptionList: [],
|
||||
},
|
||||
initForm: {
|
||||
menuId: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
icon: undefined,
|
||||
permission: undefined,
|
||||
menuType: '0',
|
||||
keepAlive: '0',
|
||||
sortOrder: 999,
|
||||
display: '1',
|
||||
newWindow: '0',
|
||||
activityOptionList: [],
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: this.$t('admin.menuNameCannotBeEmpty'), trigger: 'change' }],
|
||||
name: 'Menu',
|
||||
components: { Treeselect, TableForm, Lang, tooltip },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 菜单树选项
|
||||
menuOptions: [],
|
||||
// 是否显示弹出层
|
||||
visible: false,
|
||||
// 图标
|
||||
iconList: iconList,
|
||||
form: {
|
||||
menuId: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
icon: undefined,
|
||||
permission: undefined,
|
||||
menuType: '0',
|
||||
keepAlive: '0',
|
||||
sortOrder: 999,
|
||||
display: '1',
|
||||
newWindow: '0',
|
||||
activityOptionList: [],
|
||||
},
|
||||
initForm: {
|
||||
menuId: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
icon: undefined,
|
||||
permission: undefined,
|
||||
menuType: '0',
|
||||
keepAlive: '0',
|
||||
sortOrder: 999,
|
||||
display: '1',
|
||||
newWindow: '0',
|
||||
activityOptionList: [],
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.menuNameCannotBeEmpty'),
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
parentId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.parentIdCannotBeEmpty'),
|
||||
trigger: [ 'change', 'blur' ]
|
||||
}
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
],
|
||||
sortOrder: [{ required: true, message: this.$t('admin.menuOrderCannotBeEmpty'), trigger: 'blur' }],
|
||||
path: [{ required: true, message: this.$t('admin.routeAddressCannotBeEmpty'), trigger: 'change' }],
|
||||
keepAlive: [{ required: true, message: this.$t('admin.routeCacheCannotBeEmpty'), trigger: 'blur' }],
|
||||
permission: [
|
||||
{ required: true, message: this.$t('admin.permissionIdentifierCannotBeEmpty'), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
showLanguage: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(isEdit, id) {
|
||||
if (id != null) {
|
||||
this.form.parentId = id
|
||||
}
|
||||
this.visible = true
|
||||
this.getTreeselect()
|
||||
this.$nextTick(() => {
|
||||
showLoading()
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (isEdit) {
|
||||
getObj(id).then((response) => {
|
||||
this.form = response.data.data
|
||||
if (this.form.icon == null) {
|
||||
this.form.icon = ''
|
||||
}
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
this.form = copyJSON(this.initForm)
|
||||
this.form.parentId = id
|
||||
hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
copyInit(id) {
|
||||
if (id != null) {
|
||||
this.form.parentId = id
|
||||
}
|
||||
this.visible = true
|
||||
this.getTreeselect()
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
sortOrder: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.menuOrderCannotBeEmpty'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
path: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.routeAddressCannotBeEmpty'),
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
keepAlive: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.routeCacheCannotBeEmpty'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
permission: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('admin.permissionIdentifierCannotBeEmpty'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
showLanguage: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(isEdit, id) {
|
||||
if (id != null) {
|
||||
this.form.parentId = id
|
||||
}
|
||||
this.visible = true
|
||||
this.getTreeselect()
|
||||
this.$nextTick(() => {
|
||||
showLoading()
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (isEdit) {
|
||||
getObj(id).then((response) => {
|
||||
this.form = response.data.data
|
||||
if (this.form.icon == null) {
|
||||
this.form.icon = ''
|
||||
}
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
this.form = copyJSON(this.initForm)
|
||||
this.form.parentId = id
|
||||
hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
copyInit(id) {
|
||||
if (id != null) {
|
||||
this.form.parentId = id
|
||||
}
|
||||
this.visible = true
|
||||
this.getTreeselect()
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
|
||||
showLoading()
|
||||
getObj(id).then((response) => {
|
||||
this.form = response.data.data
|
||||
this.form.menuId = undefined
|
||||
this.form.sortOrder = 999
|
||||
hideLoading()
|
||||
})
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (isBlank(this.form.parentId)) {
|
||||
return this.$message.error(this.$t('admin.superiorMenuCannotBeEmpty'))
|
||||
}
|
||||
if (this.form.menuId) {
|
||||
putObj(this.form).then((data) => {
|
||||
this.$message.success(this.$t('tip.successMessage.updateSuccess'))
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
})
|
||||
} else {
|
||||
addObj(this.form).then((data) => {
|
||||
this.$message.success(this.$t('tip.successMessage.createSuccess'))
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 查询菜单下拉树结构 */
|
||||
getTreeselect() {
|
||||
fetchMenuTree().then((response) => {
|
||||
this.menuOptions = []
|
||||
const menu = { id: -1, name: this.$t('admin.rootMenu'), children: [] }
|
||||
menu.children = response.data.data
|
||||
this.menuOptions.push(menu)
|
||||
})
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
}
|
||||
},
|
||||
addActivityOption() {
|
||||
let me = this
|
||||
if (!me.form.activityOptionList) {
|
||||
me.form.activityOptionList = []
|
||||
}
|
||||
let obj = { optionName: '', optionValue: '' }
|
||||
me.form.activityOptionList.push(obj)
|
||||
},
|
||||
removeActivityOption(row, index) {
|
||||
this.form.activityOptionList.splice(index, 1)
|
||||
},
|
||||
clearValid(value, prop) {
|
||||
if (isBlank(value)) {
|
||||
this.$refs['dataForm'].validateField(prop)
|
||||
} else {
|
||||
this.$refs['dataForm'].clearValidate(prop)
|
||||
}
|
||||
},
|
||||
clearAllValid() {
|
||||
setTimeout(() => {
|
||||
clearValidate.call(this, 'dataForm', ['name', 'sortOrder', 'path', 'keepAlive', 'permission', 'icon'])
|
||||
}, 100)
|
||||
},
|
||||
language() {
|
||||
this.showLanguage = true
|
||||
},
|
||||
setLanguage(data) {
|
||||
this.form.languages = data
|
||||
},
|
||||
menuSelect (node, id) {
|
||||
showLoading()
|
||||
getObj(id).then((response) => {
|
||||
this.form = response.data.data
|
||||
this.form.menuId = undefined
|
||||
this.form.sortOrder = 999
|
||||
hideLoading()
|
||||
})
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (isBlank(this.form.parentId)) {
|
||||
return this.$message.error(
|
||||
this.$t('admin.superiorMenuCannotBeEmpty')
|
||||
)
|
||||
}
|
||||
if (this.form.menuId) {
|
||||
putObj(this.form).then((data) => {
|
||||
this.$message.success(this.$t('tip.successMessage.updateSuccess'))
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
})
|
||||
} else {
|
||||
addObj(this.form).then((data) => {
|
||||
this.$message.success(this.$t('tip.successMessage.createSuccess'))
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 查询菜单下拉树结构 */
|
||||
getTreeselect() {
|
||||
fetchMenuTree().then((response) => {
|
||||
this.menuOptions = []
|
||||
const menu = { id: -1, name: this.$t('admin.rootMenu'), children: [] }
|
||||
menu.children = response.data.data
|
||||
this.menuOptions.push(menu)
|
||||
})
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
children: node.children,
|
||||
}
|
||||
},
|
||||
addActivityOption() {
|
||||
let me = this
|
||||
if (!me.form.activityOptionList) {
|
||||
me.form.activityOptionList = []
|
||||
}
|
||||
let obj = { optionName: '', optionValue: '' }
|
||||
me.form.activityOptionList.push(obj)
|
||||
},
|
||||
removeActivityOption(row, index) {
|
||||
this.form.activityOptionList.splice(index, 1)
|
||||
},
|
||||
clearValid(value, prop) {
|
||||
if (isBlank(value)) {
|
||||
this.$refs['dataForm'].validateField(prop)
|
||||
} else {
|
||||
this.$refs['dataForm'].clearValidate(prop)
|
||||
}
|
||||
},
|
||||
clearAllValid() {
|
||||
setTimeout(() => {
|
||||
clearValidate.call(this, 'dataForm', [
|
||||
'name',
|
||||
'sortOrder',
|
||||
'path',
|
||||
'keepAlive',
|
||||
'permission',
|
||||
'icon',
|
||||
])
|
||||
}, 100)
|
||||
},
|
||||
language() {
|
||||
this.showLanguage = true
|
||||
},
|
||||
setLanguage(data) {
|
||||
this.form.languages = data
|
||||
},
|
||||
menuSelect(node, id) {
|
||||
this.form.parentId = node.id
|
||||
this.$refs['dataForm'].clearValidate('parentId')
|
||||
|
||||
this.form = { ...this.form }
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-form-item__error {
|
||||
top: -8px;
|
||||
left: -10px;
|
||||
top: -8px;
|
||||
left: -10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,39 +1,70 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%; overflow: scroll;">
|
||||
<div style="background-color: rgb(248, 248, 248); position: fixed; z-index: 9999; height: 4em; width: 100%;">
|
||||
<div style="width: 100%; height: 100%; overflow: scroll">
|
||||
<div
|
||||
style="
|
||||
background-color: rgb(248, 248, 248);
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
height: 4em;
|
||||
width: 100%;
|
||||
"
|
||||
>
|
||||
<div class="header">
|
||||
<i class="el-icon-arrow-left left-text" @click="goBack"></i>
|
||||
<span>MES工作台</span>
|
||||
</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="160px" 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 v-if="isAndroidApp() && workbenchItem.navTo.includes('metting-scan')"
|
||||
@click="meetingScan">
|
||||
<div
|
||||
v-if="
|
||||
isAndroidApp() && workbenchItem.navTo.includes('metting-scan')
|
||||
"
|
||||
@click="meetingScan"
|
||||
>
|
||||
<i :class="workbenchItem.iconClass"></i>
|
||||
</div>
|
||||
<div v-else
|
||||
@click="navTo(workbenchItem.navTo)">
|
||||
<div v-else @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>
|
||||
@ -43,81 +74,83 @@
|
||||
</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: [],
|
||||
activeTab: 1
|
||||
activeTab: 1,
|
||||
}
|
||||
},
|
||||
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();
|
||||
})
|
||||
this.getUserInfo()
|
||||
},
|
||||
mounted: function () {
|
||||
if(window && window.android) {
|
||||
window.goBack = this.goBack
|
||||
// 扫码成功
|
||||
window.scanQrCodeSuccess = this.scanSuccess
|
||||
// 扫码失败
|
||||
window.scanQrCodeFail = this.scanError
|
||||
if (window && window.android) {
|
||||
window.goBack = this.goBack
|
||||
// 扫码成功
|
||||
window.scanQrCodeSuccess = this.scanSuccess
|
||||
// 扫码失败
|
||||
window.scanQrCodeFail = this.scanError
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userInfo() {
|
||||
handleImg(this.userInfo.avatar, 'thumbnail')
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'website', 'menu', 'permissions']),
|
||||
permissionList() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
isAndroidApp() {
|
||||
return window && window.android
|
||||
},
|
||||
navTo(path) {
|
||||
let that = this;
|
||||
let that = this
|
||||
that.$router.push({
|
||||
path: path
|
||||
path: path,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if(window && window.android) {
|
||||
if (window && window.android) {
|
||||
// 返回到工作台
|
||||
return window.android.backMainActivity()
|
||||
}
|
||||
this.$confirm('确定退出登录吗?', '退出登录', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
this.$router.push({ path: '/login' })
|
||||
@ -128,7 +161,7 @@ export default {
|
||||
this.$confirm('确定退出登录吗?', '退出登录', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
this.$router.push({ path: '/login' })
|
||||
@ -141,12 +174,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, "扫码失败", {
|
||||
@ -156,32 +192,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;
|
||||
@ -233,7 +268,7 @@ 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-repeat: no-repeat;
|
||||
@ -245,7 +280,7 @@ 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-repeat: no-repeat;
|
||||
@ -257,7 +292,7 @@ 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-repeat: no-repeat;
|
||||
@ -269,7 +304,7 @@ 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-repeat: no-repeat;
|
||||
@ -281,7 +316,7 @@ 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-repeat: no-repeat;
|
||||
@ -293,7 +328,260 @@ export default {
|
||||
|
||||
.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-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
border-radius: 30%;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
}
|
||||
.iconcangku_kucunshuaxin {
|
||||
display: inline-block;
|
||||
background-image: url('../../assets/mobile/warhouse-map.png');
|
||||
background-position: center;
|
||||
background-size: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-color: rgba(216, 118, 7, 0.1);
|
||||
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: 1em 1em;
|
||||
background-repeat: no-repeat;
|
||||
@ -302,7 +590,6 @@ export default {
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
}
|
||||
|
||||
.home-footer-bar {
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
|
||||
@ -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"]
|
||||
}
|
||||
|
||||
@ -2,10 +2,11 @@
|
||||
* 配置参考:
|
||||
* 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:11001/'
|
||||
// const url = 'http://192.168.100.8:11001'
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const productionGzipExtensions = ['js', 'css']
|
||||
const path = require('path')
|
||||
const FileManagerPlugin = require('filemanager-webpack-plugin')
|
||||
@ -15,22 +16,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$/)
|
||||
@ -39,7 +32,7 @@ module.exports = {
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
symbolId: 'icon-[name]',
|
||||
})
|
||||
.end()
|
||||
config.module
|
||||
@ -48,15 +41,15 @@ module.exports = {
|
||||
.use('ts-loader')
|
||||
.loader('ts-loader')
|
||||
.options({
|
||||
appendTsSuffixTo: [/\.vue$/]
|
||||
appendTsSuffixTo: [/\.vue$/],
|
||||
})
|
||||
.tap(options => {
|
||||
.tap((options) => {
|
||||
return options
|
||||
})
|
||||
},
|
||||
css: {
|
||||
// 忽略 CSS order 顺序警告
|
||||
extract: { ignoreOrder: true }
|
||||
extract: { ignoreOrder: true },
|
||||
},
|
||||
configureWebpack: (config) => {
|
||||
let deleteOriginalAssets = false
|
||||
@ -70,22 +63,26 @@ 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',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
let configure = {
|
||||
performance: {
|
||||
// 打包后最大文件大小限制
|
||||
maxAssetSize: 1024000
|
||||
maxAssetSize: 1024000,
|
||||
},
|
||||
plugins: [
|
||||
new CompressionWebpackPlugin({
|
||||
@ -94,9 +91,9 @@ module.exports = {
|
||||
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
||||
threshold: 1024, // 只有大小大于该值的资源会被处理,当前配置为对于超过1k的数据进行处理,不足1k的可能会越压缩越大
|
||||
minRatio: 0.99, // 只有压缩率小于这个值的资源才会被处理
|
||||
deleteOriginalAssets: deleteOriginalAssets // 删除原文件
|
||||
})
|
||||
]
|
||||
deleteOriginalAssets: deleteOriginalAssets, // 删除原文件
|
||||
}),
|
||||
],
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
@ -118,9 +115,9 @@ module.exports = {
|
||||
target: url,
|
||||
ws: false, // 需要websocket 开启
|
||||
pathRewrite: {
|
||||
'^/': '/'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
'^/': '/',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||