vue版本上线
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
"pre": "yarn --registry https://registry.npm.taobao.org || cnpm install || npm install --registry https://registry.npm.taobao.org ",
|
"pre": "yarn --registry https://registry.npm.taobao.org || cnpm install || npm install --registry https://registry.npm.taobao.org ",
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build-index": "vue-cli-service build index",
|
"build-index": "vue-cli-service build index",
|
||||||
"build-car": "vue-cli-service build car",
|
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
<template>
|
|
||||||
<a-card :bordered="false" class="card-area">
|
|
||||||
<!-- 查询区域 -->
|
|
||||||
<div class="table-page-search-wrapper">
|
|
||||||
<!-- 搜索区域 -->
|
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :md="6" :sm="8">
|
|
||||||
<a-form-item label="车牌号码" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
|
||||||
<a-input placeholder="请输入车牌号码" v-model="queryParam.carNumber"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
||||||
<a-col :md="6" :sm="24">
|
|
||||||
<a-button type="primary" @click="searchQuery">查询</a-button>
|
|
||||||
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
|
|
||||||
</a-col>
|
|
||||||
</span>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
<!-- 操作按钮区域 -->
|
|
||||||
<div class="table-operator" style="margin-top: 5px">
|
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
<a-button style="margin-left: 8px">
|
|
||||||
批量操作 <a-icon type="down" />
|
|
||||||
</a-button>
|
|
||||||
</a-dropdown>
|
|
||||||
</div>
|
|
||||||
<!-- table区域-begin -->
|
|
||||||
<div>
|
|
||||||
<a-table
|
|
||||||
ref="table"
|
|
||||||
size="middle"
|
|
||||||
bordered
|
|
||||||
rowKey="id"
|
|
||||||
:columns="columns"
|
|
||||||
:dataSource="dataSource"
|
|
||||||
:pagination="ipagination"
|
|
||||||
:loading="loading"
|
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
||||||
@change="handleTableChange">
|
|
||||||
<span slot="action" slot-scope="text, record">
|
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
|
||||||
<a-divider type="vertical" />
|
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
||||||
<a>删除</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</span>
|
|
||||||
</a-table>
|
|
||||||
</div>
|
|
||||||
<!-- table区域-end -->
|
|
||||||
</a-card>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
||||||
export default {
|
|
||||||
name: "Car",
|
|
||||||
mixins:[JeecgListMixin],
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
// 查询条件
|
|
||||||
queryParam: {carNumber:''},
|
|
||||||
// 表头
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '#',
|
|
||||||
dataIndex: '',
|
|
||||||
key:'rowIndex',
|
|
||||||
width:60,
|
|
||||||
align:"center",
|
|
||||||
customRender:function (t,r,index) {
|
|
||||||
return parseInt(index)+1;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{title: '车牌号码', dataIndex: 'carNumber', width: 100},
|
|
||||||
{title: '驾驶员', dataIndex: 'carDriver', width: 100},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
dataIndex: 'action',
|
|
||||||
width: 200,
|
|
||||||
align:"center",
|
|
||||||
scopedSlots: { customRender: 'action' },
|
|
||||||
}
|
|
||||||
],
|
|
||||||
url: {
|
|
||||||
list: "/api/plugin/car-plugin/car/list"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
console.log(123)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
@import '~@assets/less/common.less'
|
|
||||||
</style>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
||||||
<!-- 全局配置 -->
|
|
||||||
<script>
|
|
||||||
window._CONFIG = {};
|
|
||||||
window._CONFIG['domianURL'] = '/jshERP-boot';
|
|
||||||
let sysTitle;
|
|
||||||
let ajax = new XMLHttpRequest();
|
|
||||||
let url = window._CONFIG['domianURL'] + '/platformConfig/getPlatformName'
|
|
||||||
ajax.onreadystatechange = function () {
|
|
||||||
if (ajax.readyState===4 &&ajax.status===200) {
|
|
||||||
sysTitle = ajax.responseText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ajax.open('get', url, false);
|
|
||||||
ajax.send(null);
|
|
||||||
window.SYS_TITLE = sysTitle;
|
|
||||||
document.title = window.SYS_TITLE;
|
|
||||||
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas';
|
|
||||||
window._CONFIG['onlinePreviewDomainURL'] = 'http://fileview.jeecg.com/onlinePreview'
|
|
||||||
window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static';
|
|
||||||
window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe';
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>
|
|
||||||
<strong>We're sorry but vue-cli3 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
||||||
</noscript>
|
|
||||||
<div id="app"></div>
|
|
||||||
<!-- built files will be auto injected -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import Car from './Car.vue'
|
|
||||||
import Storage from 'vue-ls'
|
|
||||||
import router from './router'
|
|
||||||
import store from './store'
|
|
||||||
|
|
||||||
import { VueAxios } from "@/utils/request"
|
|
||||||
|
|
||||||
import Antd from 'ant-design-vue'
|
|
||||||
import Viser from 'viser-vue'
|
|
||||||
import 'ant-design-vue/dist/antd.less';
|
|
||||||
|
|
||||||
import '@/permission' // permission control
|
|
||||||
import '@/utils/filter' // base filter
|
|
||||||
import Print from 'vue-print-nb-jeecg'
|
|
||||||
import preview from 'vue-photo-preview'
|
|
||||||
import 'vue-photo-preview/dist/skin.css'
|
|
||||||
|
|
||||||
import {
|
|
||||||
ACCESS_TOKEN,
|
|
||||||
DEFAULT_COLOR,
|
|
||||||
DEFAULT_THEME,
|
|
||||||
DEFAULT_LAYOUT_MODE,
|
|
||||||
DEFAULT_COLOR_WEAK,
|
|
||||||
SIDEBAR_TYPE,
|
|
||||||
DEFAULT_FIXED_HEADER,
|
|
||||||
DEFAULT_FIXED_HEADER_HIDDEN,
|
|
||||||
DEFAULT_FIXED_SIDEMENU,
|
|
||||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
|
||||||
DEFAULT_MULTI_PAGE
|
|
||||||
} from "@/store/mutation-types"
|
|
||||||
import config from '@/defaultSettings'
|
|
||||||
|
|
||||||
import hasPermission from '@/utils/hasPermission'
|
|
||||||
import vueBus from '@/utils/vueBus';
|
|
||||||
import JeecgComponents from '@/components/jeecg/index'
|
|
||||||
import '@/assets/less/JAreaLinkage.less'
|
|
||||||
import VueAreaLinkage from 'vue-area-linkage'
|
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
|
||||||
Vue.use(Storage, config.storageOptions)
|
|
||||||
Vue.use(Antd)
|
|
||||||
Vue.use(VueAxios, router)
|
|
||||||
Vue.use(Viser)
|
|
||||||
Vue.use(hasPermission)
|
|
||||||
Vue.use(Print)
|
|
||||||
Vue.use(preview)
|
|
||||||
Vue.use(vueBus);
|
|
||||||
Vue.use(JeecgComponents);
|
|
||||||
Vue.use(VueAreaLinkage);
|
|
||||||
|
|
||||||
new Vue({
|
|
||||||
router,
|
|
||||||
store,
|
|
||||||
mounted () {
|
|
||||||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
|
||||||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
|
||||||
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
|
|
||||||
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader))
|
|
||||||
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar))
|
|
||||||
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth))
|
|
||||||
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader))
|
|
||||||
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
|
|
||||||
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
|
|
||||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
|
||||||
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
|
|
||||||
},
|
|
||||||
render: h => h(Car)
|
|
||||||
}).$mount('#app')
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'page1'
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import Router from 'vue-router'
|
|
||||||
import Page from './page1.vue'
|
|
||||||
|
|
||||||
Vue.use(Router)
|
|
||||||
|
|
||||||
export default new Router({
|
|
||||||
mode: 'history',
|
|
||||||
base: process.env.BASE_URL,
|
|
||||||
routes: [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
name: 'page',
|
|
||||||
component: Page
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import Vuex from 'vuex'
|
|
||||||
|
|
||||||
Vue.use(Vuex)
|
|
||||||
|
|
||||||
export default new Vuex.Store({
|
|
||||||
state: {
|
|
||||||
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@@ -14,13 +14,6 @@ let objectProject = {
|
|||||||
title: 'Index Page',
|
title: 'Index Page',
|
||||||
// 在这个页面中包含的块,默认情况下会包含,提取出来的通用 chunk 和 vendor chunk。
|
// 在这个页面中包含的块,默认情况下会包含,提取出来的通用 chunk 和 vendor chunk。
|
||||||
chunks: ['chunk-vendors', 'chunk-common', 'index']
|
chunks: ['chunk-vendors', 'chunk-common', 'index']
|
||||||
},
|
|
||||||
car: {
|
|
||||||
entry: 'src/views/plugin/car/main.js',
|
|
||||||
template: 'src/views/plugin/car/car.html',
|
|
||||||
filename: 'car.html',
|
|
||||||
title: 'Car Page',
|
|
||||||
chunks: ['chunk-vendors', 'chunk-common', 'car']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let page = {}
|
let page = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user