Commit a43f6108 by 胡悦

Merge branch 'master' of 192.168.3.233:micro-customization-system/micro-trialrun

2 parents 858ac8c6 563b3fd6
......@@ -20,8 +20,8 @@
<span @click="goToPage('/app-vue-history/about')">app-vue-history About</span>
</p>
</div> -->
<keep-alive>
<router-view />
<keep-alive :include="keepAlives">
<router-view v-if="!$route.meta.isKeepAlive" />
</keep-alive>
</div>
</template>
......@@ -33,6 +33,14 @@ export default {
data() {
return {
isQiankun: window.__POWERED_BY_QIANKUN__,
keepAlives: []
}
},
watch: {
$route(to, from) {
if(to.meta.keepAlives) {
this.keepAlives.push(to.name);
}
}
},
methods: {
......
......@@ -25,7 +25,8 @@ const SPECIALSHOP_API = {
GET_FENCE_DETAIL: '/trialdrive/specialshop/info',
SAVE_FENCE: '/trialdrive/specialshop/add',
UPDATE_FENCE: '/trialdrive/specialshop/edit',
EXPORT_TABLE: '/trialdrive/specialshop/export'
EXPORT_TABLE: '/trialdrive/specialshop/export',
DELETE_SPECIAL_SHOP: '/trialdrive/specialshop/delete'
}
// 试驾报表
const REPORT_API = {
......
......@@ -8,59 +8,92 @@ const routes = [
{
path: '/',
name: 'specialShop',
component: () => import('../views/specialShop/index.vue')
component: () => import('../views/specialShop/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/todo',
name: 'toDo',
component: () => import('../views/toDo/index.vue')
component: () => import('../views/toDo/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/vehicleManage',
name: 'vehicleManage',
component: () => import('../views/vehicleManage/index.vue')
component: () => import('../views/vehicleManage/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/vehicleSubmit',
name: 'vehicleSubmit',
component: () => import('../views/vehicleSubmit/index.vue')
component: () => import('../views/vehicleSubmit/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/vehicleSubmit/addVehicle',
name: 'addVehicle',
meta: {title: '新增车辆'},
component: () => import('../views/vehicleSubmit/addVehicle/index.vue')
component: () => import('../views/vehicleSubmit/addVehicle/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/vehicleCheck',
name: 'vehicleCheck',
component: () => import('../views/vehicleSubmit/vehicleCheck/index.vue')
component: () => import('../views/vehicleSubmit/vehicleCheck/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/reportManage',
name: 'reportManage',
component: () => import('../views/reportManage/index.vue')
component: () => import('../views/reportManage/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/specialShop',
name: 'specialShop',
meta: {title: '新增特约店'},
component: () => import('../views/specialShop/index.vue')
component: () => import('../views/specialShop/index.vue'),
meta: {
keepAlive: true
}
},
{
path: '/specialShop/addShop',
name: 'addShop',
component: () => import('../views/specialShop/addShop/index.vue')
component: () => import('../views/specialShop/addShop/index.vue'),
meta: {
keepAlive: false
}
},
{
path: '/testDrive/checkList',
name: 'testDriveCheckList',
component: () => import('../views/testDrive/checkList.vue')
component: () => import('../views/testDrive/checkList.vue'),
meta: {
keepAlive: true
}
},
{
path: '/alarmCenter/removeAlarm',
name: 'removeAlarm',
component: () => import('../views/alarmCenter/removeAlarm.vue')
component: () => import('../views/alarmCenter/removeAlarm.vue'),
meta: {
keepAlive: true
}
}
]
......
......@@ -22,4 +22,9 @@ function updateFence (params) {
return request(params, url, 'post')
}
export { getList, getFenceDetailById, saveFence, updateFence }
function deleteSpecialShop (params) {
const url = SPECIALSHOP_API.DELETE_SPECIAL_SHOP
return request(params, url, 'get')
}
export { getList, getFenceDetailById, saveFence, updateFence, deleteSpecialShop }
......@@ -295,6 +295,7 @@ export default {
this.form.msgtel = data.telNumbers;
this.form.specialShopId = data.shopCode;
this.form.specialShopName = data.shopName;
this.form.shopLevel = data.shopLevel;
if(form.shapeType === 1){
this.mapData = {
......@@ -532,5 +533,5 @@ export default {
background-color: #fdfdfd;
margin-left: 220px;
padding-right: 260px;
}
}
</style>
\ No newline at end of file
......@@ -75,7 +75,7 @@
>{{item.name}}</el-button>
</h3>
<basic-table
ref="roleTable"
ref="shopTable"
:tableParams="shopTableParams"
:getListApi="getListApi"
:searchForm="searchForm"
......@@ -109,7 +109,7 @@
</template>
<script>
import { getList } from 'services/specialshop'
import { getList, deleteSpecialShop } from 'services/specialshop'
import { getSimpleRoot, getSimpleList } from 'services/common'
import { SPECIALSHOP_API } from '@/config/config'
import store from '@/store'
......@@ -215,9 +215,7 @@ export default {
this.searchForm = {}
},
btnClick(pType, scope) {
if(scope) {
const { shopId } = scope;
}
const shopId = scope && scope.shopId;
switch (pType) {
case 'create':
this.$router.push({ name: 'addShop' })
......@@ -241,6 +239,19 @@ export default {
query: { id: shopId, readonlyStatus: true }
})
break
case 'delete':
deleteSpecialShop({shopId}).then(res => {
const { code, message } = res;
if(code == 200) {
this.$refs.shopTable.refreshTable()
} else {
this.$message({
message,
type: 'error'
});
}
})
break
}
},
change(name, val) {
......
......@@ -44,8 +44,8 @@
slot-scope="scope"
>
<template v-for="(j, idx) in testDriveTableParams.tableOption.btnList">
<!-- approvalStatus为1也就是未审核状态才展示通过/驳回 -->
<template v-if="(j.pType == 'pass' || j.pType == 'reject') && scope.scope.approvalStatus == 1">
<!-- approvalStatus为1也就是未审核状态展示全部按钮 -->
<template v-if="scope.scope.approvalStatus == 1">
<el-button
:key="idx"
:type="j.type || 'text'"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!