1、页面lint格式修复
This commit is contained in:
parent
66af30d79e
commit
17e849e638
@ -20,13 +20,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品id集合,逗号分隔" prop="productIds">
|
<el-form-item label="商品id集合,逗号分隔" prop="productIds">
|
||||||
<el-input
|
<el-input v-model="queryParams.productIds" placeholder="请输入商品id集合,逗号分隔" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.productIds"
|
|
||||||
placeholder="请输入商品id集合,逗号分隔"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="优惠券金额" prop="couponAmount">
|
<el-form-item label="优惠券金额" prop="couponAmount">
|
||||||
<el-input v-model="queryParams.couponAmount" placeholder="请输入优惠券金额" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.couponAmount" placeholder="请输入优惠券金额" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
@ -133,9 +127,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" class-name="small-padding fixed-width">
|
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['act:memberCoupon:edit']"
|
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['act:memberCoupon:edit']">修改 </el-button>
|
||||||
>修改
|
|
||||||
</el-button>
|
|
||||||
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['act:memberCoupon:remove']"
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['act:memberCoupon:remove']"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -1,28 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sales-top">
|
<div class="sales-top">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header" class="clearfix">
|
<template v-slot:header>
|
||||||
|
<div class="clearfix">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div style="font-size: large">
|
<div style="font-size: large">
|
||||||
<el-radio-group v-model="params.statType" size="small" @change="getData">
|
<el-radio-group v-model="params.statType" size="small" @change="getData">
|
||||||
<el-radio-button label="2">商品销量榜</el-radio-button>
|
<el-radio-button label="2">商品销量榜</el-radio-button>
|
||||||
<el-radio-button label="1">规格销量榜</el-radio-button>
|
<el-radio-button label="1">规格销量榜</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-radio-group v-model="params.type" size="small" @change="getData">
|
<el-radio-group v-model="params.type" size="small" @change="getData">
|
||||||
<el-radio-button label="0">今日</el-radio-button>
|
<el-radio-button label="0">今日</el-radio-button>
|
||||||
<el-radio-button label="7">近七日</el-radio-button>
|
<el-radio-button label="7">近七日</el-radio-button>
|
||||||
<el-radio-button label="30">近三十日</el-radio-button>
|
<el-radio-button label="30">近三十日</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
<el-table v-loading="loading" :data="salesTopData" :border="false">
|
<el-table v-loading="loading" :data="salesTopData" :border="false">
|
||||||
<el-table-column type="index" width="80"></el-table-column>
|
<el-table-column type="index" width="80"></el-table-column>
|
||||||
<el-table-column prop="productName" label="商品名称"></el-table-column>
|
<el-table-column prop="productName" label="商品名称"></el-table-column>
|
||||||
@ -32,14 +33,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="主图" align="center" prop="pic">
|
<el-table-column label="主图" align="center" prop="pic">
|
||||||
<template slot-scope="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img circle-img"/>
|
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img circle-img" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="totalSales" label="销量" width="120">
|
<el-table-column prop="totalSales" label="销量" width="120">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }"> {{ row.totalSales }} 件 </template>
|
||||||
{{ row.totalSales }} 件
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -47,7 +46,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {goodsStatistics} from "@/api/statistics";
|
import { goodsStatistics } from '@/api/statistics';
|
||||||
import dateUtil from '@/utils/DateUtil';
|
import dateUtil from '@/utils/DateUtil';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -57,7 +56,7 @@ export default {
|
|||||||
salesTopData: [],
|
salesTopData: [],
|
||||||
params: {
|
params: {
|
||||||
statType: 1,
|
statType: 1,
|
||||||
type:0,
|
type: 0,
|
||||||
size: 10,
|
size: 10,
|
||||||
startDate: '2023-02-01',
|
startDate: '2023-02-01',
|
||||||
endDate: '2023-06-01'
|
endDate: '2023-06-01'
|
||||||
@ -66,20 +65,20 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getData()
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(){
|
getData() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
let range= Number(this.params.type)
|
const range = Number(this.params.type);
|
||||||
this.params.startDate = dateUtil.getAfterDate(-range)
|
this.params.startDate = dateUtil.getAfterDate(-range);
|
||||||
this.params.endDate = dateUtil.getAfterDate(0)
|
this.params.endDate = dateUtil.getAfterDate(0);
|
||||||
goodsStatistics(this.params).then(res => {
|
goodsStatistics(this.params).then((res) => {
|
||||||
this.salesTopData = res
|
this.salesTopData = res;
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">New Visits</div>
|
||||||
New Visits
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -19,9 +17,7 @@
|
|||||||
<svg-icon icon-class="message" class-name="card-panel-icon" />
|
<svg-icon icon-class="message" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">Messages</div>
|
||||||
Messages
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,9 +28,7 @@
|
|||||||
<svg-icon icon-class="money" class-name="card-panel-icon" />
|
<svg-icon icon-class="money" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">Purchases</div>
|
||||||
Purchases
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,9 +39,7 @@
|
|||||||
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
|
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">Shoppings</div>
|
||||||
Shoppings
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CountTo from 'vue-count-to'
|
import CountTo from 'vue-count-to';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -64,10 +56,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSetLineChartData(type) {
|
handleSetLineChartData(type) {
|
||||||
this.$emit('handleSetLineChartData', type)
|
this.$emit('handleSetLineChartData', type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -86,8 +78,8 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #666;
|
color: #666;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||||
border-color: rgba(0, 0, 0, .05);
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.card-panel-icon-wrapper {
|
.card-panel-icon-wrapper {
|
||||||
@ -107,7 +99,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-shopping {
|
.icon-shopping {
|
||||||
background: #34bfa3
|
background: #34bfa3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +116,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-shopping {
|
.icon-shopping {
|
||||||
color: #34bfa3
|
color: #34bfa3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-panel-icon-wrapper {
|
.card-panel-icon-wrapper {
|
||||||
@ -160,7 +152,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:550px) {
|
@media (max-width: 550px) {
|
||||||
.card-panel-description {
|
.card-panel-description {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -178,4 +170,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,3 +1,284 @@
|
|||||||
const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
|
const elementIcons = [
|
||||||
|
'platform-eleme',
|
||||||
|
'eleme',
|
||||||
|
'delete-solid',
|
||||||
|
'delete',
|
||||||
|
's-tools',
|
||||||
|
'setting',
|
||||||
|
'user-solid',
|
||||||
|
'user',
|
||||||
|
'phone',
|
||||||
|
'phone-outline',
|
||||||
|
'more',
|
||||||
|
'more-outline',
|
||||||
|
'star-on',
|
||||||
|
'star-off',
|
||||||
|
's-goods',
|
||||||
|
'goods',
|
||||||
|
'warning',
|
||||||
|
'warning-outline',
|
||||||
|
'question',
|
||||||
|
'info',
|
||||||
|
'remove',
|
||||||
|
'circle-plus',
|
||||||
|
'success',
|
||||||
|
'error',
|
||||||
|
'zoom-in',
|
||||||
|
'zoom-out',
|
||||||
|
'remove-outline',
|
||||||
|
'circle-plus-outline',
|
||||||
|
'circle-check',
|
||||||
|
'circle-close',
|
||||||
|
's-help',
|
||||||
|
'help',
|
||||||
|
'minus',
|
||||||
|
'plus',
|
||||||
|
'check',
|
||||||
|
'close',
|
||||||
|
'picture',
|
||||||
|
'picture-outline',
|
||||||
|
'picture-outline-round',
|
||||||
|
'upload',
|
||||||
|
'upload2',
|
||||||
|
'download',
|
||||||
|
'camera-solid',
|
||||||
|
'camera',
|
||||||
|
'video-camera-solid',
|
||||||
|
'video-camera',
|
||||||
|
'message-solid',
|
||||||
|
'bell',
|
||||||
|
's-cooperation',
|
||||||
|
's-order',
|
||||||
|
's-platform',
|
||||||
|
's-fold',
|
||||||
|
's-unfold',
|
||||||
|
's-operation',
|
||||||
|
's-promotion',
|
||||||
|
's-home',
|
||||||
|
's-release',
|
||||||
|
's-ticket',
|
||||||
|
's-management',
|
||||||
|
's-open',
|
||||||
|
's-shop',
|
||||||
|
's-marketing',
|
||||||
|
's-flag',
|
||||||
|
's-comment',
|
||||||
|
's-finance',
|
||||||
|
's-claim',
|
||||||
|
's-custom',
|
||||||
|
's-opportunity',
|
||||||
|
's-data',
|
||||||
|
's-check',
|
||||||
|
's-grid',
|
||||||
|
'menu',
|
||||||
|
'share',
|
||||||
|
'd-caret',
|
||||||
|
'caret-left',
|
||||||
|
'caret-right',
|
||||||
|
'caret-bottom',
|
||||||
|
'caret-top',
|
||||||
|
'bottom-left',
|
||||||
|
'bottom-right',
|
||||||
|
'back',
|
||||||
|
'right',
|
||||||
|
'bottom',
|
||||||
|
'top',
|
||||||
|
'top-left',
|
||||||
|
'top-right',
|
||||||
|
'arrow-left',
|
||||||
|
'arrow-right',
|
||||||
|
'arrow-down',
|
||||||
|
'arrow-up',
|
||||||
|
'd-arrow-left',
|
||||||
|
'd-arrow-right',
|
||||||
|
'video-pause',
|
||||||
|
'video-play',
|
||||||
|
'refresh',
|
||||||
|
'refresh-right',
|
||||||
|
'refresh-left',
|
||||||
|
'finished',
|
||||||
|
'sort',
|
||||||
|
'sort-up',
|
||||||
|
'sort-down',
|
||||||
|
'rank',
|
||||||
|
'loading',
|
||||||
|
'view',
|
||||||
|
'c-scale-to-original',
|
||||||
|
'date',
|
||||||
|
'edit',
|
||||||
|
'edit-outline',
|
||||||
|
'folder',
|
||||||
|
'folder-opened',
|
||||||
|
'folder-add',
|
||||||
|
'folder-remove',
|
||||||
|
'folder-delete',
|
||||||
|
'folder-checked',
|
||||||
|
'tickets',
|
||||||
|
'document-remove',
|
||||||
|
'document-delete',
|
||||||
|
'document-copy',
|
||||||
|
'document-checked',
|
||||||
|
'document',
|
||||||
|
'document-add',
|
||||||
|
'printer',
|
||||||
|
'paperclip',
|
||||||
|
'takeaway-box',
|
||||||
|
'search',
|
||||||
|
'monitor',
|
||||||
|
'attract',
|
||||||
|
'mobile',
|
||||||
|
'scissors',
|
||||||
|
'umbrella',
|
||||||
|
'headset',
|
||||||
|
'brush',
|
||||||
|
'mouse',
|
||||||
|
'coordinate',
|
||||||
|
'magic-stick',
|
||||||
|
'reading',
|
||||||
|
'data-line',
|
||||||
|
'data-board',
|
||||||
|
'pie-chart',
|
||||||
|
'data-analysis',
|
||||||
|
'collection-tag',
|
||||||
|
'film',
|
||||||
|
'suitcase',
|
||||||
|
'suitcase-1',
|
||||||
|
'receiving',
|
||||||
|
'collection',
|
||||||
|
'files',
|
||||||
|
'notebook-1',
|
||||||
|
'notebook-2',
|
||||||
|
'toilet-paper',
|
||||||
|
'office-building',
|
||||||
|
'school',
|
||||||
|
'table-lamp',
|
||||||
|
'house',
|
||||||
|
'no-smoking',
|
||||||
|
'smoking',
|
||||||
|
'shopping-cart-full',
|
||||||
|
'shopping-cart-1',
|
||||||
|
'shopping-cart-2',
|
||||||
|
'shopping-bag-1',
|
||||||
|
'shopping-bag-2',
|
||||||
|
'sold-out',
|
||||||
|
'sell',
|
||||||
|
'present',
|
||||||
|
'box',
|
||||||
|
'bank-card',
|
||||||
|
'money',
|
||||||
|
'coin',
|
||||||
|
'wallet',
|
||||||
|
'discount',
|
||||||
|
'price-tag',
|
||||||
|
'news',
|
||||||
|
'guide',
|
||||||
|
'male',
|
||||||
|
'female',
|
||||||
|
'thumb',
|
||||||
|
'cpu',
|
||||||
|
'link',
|
||||||
|
'connection',
|
||||||
|
'open',
|
||||||
|
'turn-off',
|
||||||
|
'set-up',
|
||||||
|
'chat-round',
|
||||||
|
'chat-line-round',
|
||||||
|
'chat-square',
|
||||||
|
'chat-dot-round',
|
||||||
|
'chat-dot-square',
|
||||||
|
'chat-line-square',
|
||||||
|
'message',
|
||||||
|
'postcard',
|
||||||
|
'position',
|
||||||
|
'turn-off-microphone',
|
||||||
|
'microphone',
|
||||||
|
'close-notification',
|
||||||
|
'bangzhu',
|
||||||
|
'time',
|
||||||
|
'odometer',
|
||||||
|
'crop',
|
||||||
|
'aim',
|
||||||
|
'switch-button',
|
||||||
|
'full-screen',
|
||||||
|
'copy-document',
|
||||||
|
'mic',
|
||||||
|
'stopwatch',
|
||||||
|
'medal-1',
|
||||||
|
'medal',
|
||||||
|
'trophy',
|
||||||
|
'trophy-1',
|
||||||
|
'first-aid-kit',
|
||||||
|
'discover',
|
||||||
|
'place',
|
||||||
|
'location',
|
||||||
|
'location-outline',
|
||||||
|
'location-information',
|
||||||
|
'add-location',
|
||||||
|
'delete-location',
|
||||||
|
'map-location',
|
||||||
|
'alarm-clock',
|
||||||
|
'timer',
|
||||||
|
'watch-1',
|
||||||
|
'watch',
|
||||||
|
'lock',
|
||||||
|
'unlock',
|
||||||
|
'key',
|
||||||
|
'service',
|
||||||
|
'mobile-phone',
|
||||||
|
'bicycle',
|
||||||
|
'truck',
|
||||||
|
'ship',
|
||||||
|
'basketball',
|
||||||
|
'football',
|
||||||
|
'soccer',
|
||||||
|
'baseball',
|
||||||
|
'wind-power',
|
||||||
|
'light-rain',
|
||||||
|
'lightning',
|
||||||
|
'heavy-rain',
|
||||||
|
'sunrise',
|
||||||
|
'sunrise-1',
|
||||||
|
'sunset',
|
||||||
|
'sunny',
|
||||||
|
'cloudy',
|
||||||
|
'partly-cloudy',
|
||||||
|
'cloudy-and-sunny',
|
||||||
|
'moon',
|
||||||
|
'moon-night',
|
||||||
|
'dish',
|
||||||
|
'dish-1',
|
||||||
|
'food',
|
||||||
|
'chicken',
|
||||||
|
'fork-spoon',
|
||||||
|
'knife-fork',
|
||||||
|
'burger',
|
||||||
|
'tableware',
|
||||||
|
'sugar',
|
||||||
|
'dessert',
|
||||||
|
'ice-cream',
|
||||||
|
'hot-water',
|
||||||
|
'water-cup',
|
||||||
|
'coffee-cup',
|
||||||
|
'cold-drink',
|
||||||
|
'goblet',
|
||||||
|
'goblet-full',
|
||||||
|
'goblet-square',
|
||||||
|
'goblet-square-full',
|
||||||
|
'refrigerator',
|
||||||
|
'grape',
|
||||||
|
'watermelon',
|
||||||
|
'cherry',
|
||||||
|
'apple',
|
||||||
|
'pear',
|
||||||
|
'orange',
|
||||||
|
'coffee',
|
||||||
|
'ice-tea',
|
||||||
|
'ice-drink',
|
||||||
|
'milk-tea',
|
||||||
|
'potato-strips',
|
||||||
|
'lollipop',
|
||||||
|
'ice-cream-square',
|
||||||
|
'ice-cream-round'
|
||||||
|
];
|
||||||
|
|
||||||
export default elementIcons
|
export default elementIcons;
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="icons-container">
|
<div class="icons-container">
|
||||||
<aside>
|
<aside>
|
||||||
<a href="#" target="_blank">Add and use
|
<a href="#" target="_blank">Add and use </a>
|
||||||
</a>
|
|
||||||
</aside>
|
</aside>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="Icons">
|
<el-tab-pane label="Icons">
|
||||||
<div v-for="item of svgIcons" :key="item">
|
<div v-for="item of svgIcons" :key="item">
|
||||||
<el-tooltip placement="top">
|
<el-tooltip placement="top">
|
||||||
<div slot="content">
|
<template v-slot:content>
|
||||||
{{ generateIconCode(item) }}
|
<div>
|
||||||
</div>
|
{{ generateIconCode(item) }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="icon-item">
|
<div class="icon-item">
|
||||||
<svg-icon :icon-class="item" class-name="disabled" />
|
<svg-icon :icon-class="item" class-name="disabled" />
|
||||||
<span>{{ item }}</span>
|
<span>{{ item }}</span>
|
||||||
@ -21,9 +22,11 @@
|
|||||||
<el-tab-pane label="Element-UI Icons">
|
<el-tab-pane label="Element-UI Icons">
|
||||||
<div v-for="item of elementIcons" :key="item">
|
<div v-for="item of elementIcons" :key="item">
|
||||||
<el-tooltip placement="top">
|
<el-tooltip placement="top">
|
||||||
<div slot="content">
|
<template v-slot:content>
|
||||||
{{ generateElementIconCode(item) }}
|
<div>
|
||||||
</div>
|
{{ generateElementIconCode(item) }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="icon-item">
|
<div class="icon-item">
|
||||||
<i :class="'el-icon-' + item" />
|
<i :class="'el-icon-' + item" />
|
||||||
<span>{{ item }}</span>
|
<span>{{ item }}</span>
|
||||||
@ -36,8 +39,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import svgIcons from './svg-icons'
|
import svgIcons from './svg-icons';
|
||||||
import elementIcons from './element-icons'
|
import elementIcons from './element-icons';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Icons',
|
name: 'Icons',
|
||||||
@ -45,17 +48,17 @@ export default {
|
|||||||
return {
|
return {
|
||||||
svgIcons,
|
svgIcons,
|
||||||
elementIcons
|
elementIcons
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateIconCode(symbol) {
|
generateIconCode(symbol) {
|
||||||
return `<svg-icon icon-class="${symbol}" />`
|
return `<svg-icon icon-class="${symbol}" />`;
|
||||||
},
|
},
|
||||||
generateElementIconCode(symbol) {
|
generateElementIconCode(symbol) {
|
||||||
return `<i class="el-icon-${symbol}" />`
|
return `<i class="el-icon-${symbol}" />`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
const req = require.context('../../../assets/icons/svg', false, /\.svg$/)
|
const req = require.context('../../../assets/icons/svg', false, /\.svg$/);
|
||||||
const requireAll = requireContext => requireContext.keys()
|
const requireAll = (requireContext) => requireContext.keys();
|
||||||
|
|
||||||
const re = /\.\/(.*)\.svg/
|
const re = /\.\/(.*)\.svg/;
|
||||||
|
|
||||||
const svgIcons = requireAll(req).map(i => {
|
const svgIcons = requireAll(req).map((i) => {
|
||||||
return i.match(re)[1]
|
return i.match(re)[1];
|
||||||
})
|
});
|
||||||
|
|
||||||
export default svgIcons
|
export default svgIcons;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -34,32 +34,32 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
chartData: {
|
chartData: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.setOptions(val)
|
this.setOptions(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
this.setOptions(this.chartData)
|
this.setOptions(this.chartData);
|
||||||
},
|
},
|
||||||
setOptions({ expectedData, actualData } = {}) {
|
setOptions({ expectedData, actualData } = {}) {
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
@ -92,44 +92,47 @@ export default {
|
|||||||
legend: {
|
legend: {
|
||||||
data: ['expected', 'actual']
|
data: ['expected', 'actual']
|
||||||
},
|
},
|
||||||
series: [{
|
series: [
|
||||||
name: 'expected', itemStyle: {
|
{
|
||||||
normal: {
|
name: 'expected',
|
||||||
color: '#FF005A',
|
itemStyle: {
|
||||||
lineStyle: {
|
normal: {
|
||||||
color: '#FF005A',
|
color: '#FF005A',
|
||||||
width: 2
|
lineStyle: {
|
||||||
|
color: '#FF005A',
|
||||||
|
width: 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
smooth: true,
|
||||||
|
type: 'line',
|
||||||
|
data: expectedData,
|
||||||
|
animationDuration: 2800,
|
||||||
|
animationEasing: 'cubicInOut'
|
||||||
},
|
},
|
||||||
smooth: true,
|
{
|
||||||
type: 'line',
|
name: 'actual',
|
||||||
data: expectedData,
|
smooth: true,
|
||||||
animationDuration: 2800,
|
type: 'line',
|
||||||
animationEasing: 'cubicInOut'
|
itemStyle: {
|
||||||
},
|
normal: {
|
||||||
{
|
|
||||||
name: 'actual',
|
|
||||||
smooth: true,
|
|
||||||
type: 'line',
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: '#3888fa',
|
|
||||||
lineStyle: {
|
|
||||||
color: '#3888fa',
|
color: '#3888fa',
|
||||||
width: 2
|
lineStyle: {
|
||||||
},
|
color: '#3888fa',
|
||||||
areaStyle: {
|
width: 2
|
||||||
color: '#f3f8ff'
|
},
|
||||||
|
areaStyle: {
|
||||||
|
color: '#f3f8ff'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
data: actualData,
|
||||||
data: actualData,
|
animationDuration: 2800,
|
||||||
animationDuration: 2800,
|
animationEasing: 'quadraticOut'
|
||||||
animationEasing: 'quadraticOut'
|
}
|
||||||
}]
|
]
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,36 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card style="margin: 20px 20px; font-size: 14px;">
|
<el-card style="margin: 20px 20px; font-size: 14px">
|
||||||
<div slot="header" class="clearfix">
|
<template v-slot:header>
|
||||||
<el-row>
|
<div class="clearfix">
|
||||||
<el-col :span="6">
|
<el-row>
|
||||||
<div style="font-weight: bold;font-size: 16px">订单统计</div>
|
<el-col :span="6">
|
||||||
</el-col>
|
<div style="font-weight: bold; font-size: 16px">订单统计</div>
|
||||||
<el-col :span="18">
|
</el-col>
|
||||||
<div style="text-align: right">
|
<el-col :span="18">
|
||||||
<el-radio-group v-model="params.type" size="small" @change="orderStat">
|
<div style="text-align: right">
|
||||||
<el-radio-button label="1">近七日</el-radio-button>
|
<el-radio-group v-model="params.type" size="small" @change="orderStat">
|
||||||
<el-radio-button label="2">近三十日</el-radio-button>
|
<el-radio-button label="1">近七日</el-radio-button>
|
||||||
</el-radio-group>
|
<el-radio-button label="2">近三十日</el-radio-button>
|
||||||
</div>
|
</el-radio-group>
|
||||||
</el-col>
|
</div>
|
||||||
</el-row>
|
</el-col>
|
||||||
</div>
|
</el-row>
|
||||||
<div :style="{minHeight:height,minWidth:width}">
|
</div>
|
||||||
<div ref="chart" class="chart" :style="{height:height,width:width}"/>
|
</template>
|
||||||
|
<div :style="{ minHeight: height, minWidth: width }">
|
||||||
|
<div ref="chart" class="chart" :style="{ height: height, width: width }" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { orderStatistics } from '@/api/statistics';
|
||||||
import {orderStatistics} from "@/api/statistics";
|
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
name: "OrderLineChart",
|
name: 'OrderLineChart',
|
||||||
props: {
|
props: {
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -43,71 +44,74 @@ export default {
|
|||||||
autoResize: {
|
autoResize: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
shortcuts: [{
|
shortcuts: [
|
||||||
text: '最近一周',
|
{
|
||||||
onClick(picker) {
|
text: '最近一周',
|
||||||
const end = new Date();
|
onClick(picker) {
|
||||||
let start = new Date();
|
const end = new Date();
|
||||||
start.setFullYear(2018);
|
const start = new Date();
|
||||||
start.setMonth(10);
|
start.setFullYear(2018);
|
||||||
start.setDate(1);
|
start.setMonth(10);
|
||||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7);
|
start.setDate(1);
|
||||||
picker.$emit('pick', [start, end]);
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '最近一月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setFullYear(2018);
|
||||||
|
start.setMonth(10);
|
||||||
|
start.setDate(1);
|
||||||
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
]
|
||||||
text: '最近一月',
|
|
||||||
onClick(picker) {
|
|
||||||
const end = new Date();
|
|
||||||
let start = new Date();
|
|
||||||
start.setFullYear(2018);
|
|
||||||
start.setMonth(10);
|
|
||||||
start.setDate(1);
|
|
||||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
orderCountDate: '',
|
orderCountDate: '',
|
||||||
params: {
|
params: {
|
||||||
type: 2
|
type: 2
|
||||||
},
|
},
|
||||||
chartData: {},
|
chartData: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.orderStat()
|
this.orderStat();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$refs.chart, 'macarons')
|
this.chart = echarts.init(this.$refs.chart, 'macarons');
|
||||||
this.setOptions(this.chartData)
|
this.setOptions(this.chartData);
|
||||||
},
|
},
|
||||||
setOptions({dateList, orderAmount, orderCount} = {}) {
|
setOptions({ dateList, orderAmount, orderCount } = {}) {
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
title: {
|
title: {
|
||||||
text: '订单量趋势',
|
text: '订单量趋势',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: 'bolder',
|
fontWeight: 'bolder',
|
||||||
color: '#000000' // 主标题文字颜色
|
color: '#000000' // 主标题文字颜色
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: dateList,
|
data: dateList,
|
||||||
@ -117,16 +121,16 @@ export default {
|
|||||||
rotate: 40
|
rotate: 40
|
||||||
},
|
},
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 12,
|
fontSize: 12
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#000000"
|
color: '#000000'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
@ -141,36 +145,36 @@ export default {
|
|||||||
name: '金额',
|
name: '金额',
|
||||||
position: 'left',
|
position: 'left',
|
||||||
alignTicks: true,
|
alignTicks: true,
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisTick:{
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false,
|
show: false,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#000000"
|
color: '#000000'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '数量',
|
name: '数量',
|
||||||
minInterval:1,
|
minInterval: 1,
|
||||||
position: 'right',
|
position: 'right',
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisTick:{
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false,
|
show: false,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: "#000000"
|
color: '#000000'
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
legend: {
|
legend: {
|
||||||
@ -181,7 +185,7 @@ export default {
|
|||||||
name: '订单金额',
|
name: '订单金额',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#5b8ff9',
|
color: '#5b8ff9'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@ -196,7 +200,7 @@ export default {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#5ccfd9',
|
color: '#5ccfd9'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
@ -204,31 +208,28 @@ export default {
|
|||||||
animationDuration: 2800,
|
animationDuration: 2800,
|
||||||
animationEasing: 'quadraticOut'
|
animationEasing: 'quadraticOut'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleDateChange() {
|
handleDateChange() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
orderStat(){
|
orderStat() {
|
||||||
orderStatistics(this.params).then(res => {
|
orderStatistics(this.params).then((res) => {
|
||||||
const orderAmount = res.map(it => {
|
const orderAmount = res.map((it) => {
|
||||||
return it.orderAmount
|
return it.orderAmount;
|
||||||
})
|
});
|
||||||
const orderCount = res.map(it => {
|
const orderCount = res.map((it) => {
|
||||||
return it.orderCount
|
return it.orderCount;
|
||||||
})
|
});
|
||||||
const dateList = res.map(it => {
|
const dateList = res.map((it) => {
|
||||||
return it.date.substr(5)
|
return it.date.substr(5);
|
||||||
})
|
});
|
||||||
this.chartData = {dateList, orderAmount, orderCount}
|
this.chartData = { dateList, orderAmount, orderCount };
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">访客</div>
|
||||||
访客
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -19,9 +17,7 @@
|
|||||||
<svg-icon icon-class="message" class-name="card-panel-icon" />
|
<svg-icon icon-class="message" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">消息</div>
|
||||||
消息
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,9 +28,7 @@
|
|||||||
<svg-icon icon-class="money" class-name="card-panel-icon" />
|
<svg-icon icon-class="money" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">金额</div>
|
||||||
金额
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,9 +39,7 @@
|
|||||||
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
|
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">订单</div>
|
||||||
订单
|
|
||||||
</div>
|
|
||||||
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CountTo from 'vue-count-to'
|
import CountTo from 'vue-count-to';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -64,10 +56,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSetLineChartData(type) {
|
handleSetLineChartData(type) {
|
||||||
this.$emit('handleSetLineChartData', type)
|
this.$emit('handleSetLineChartData', type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -86,8 +78,8 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #666;
|
color: #666;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||||
border-color: rgba(0, 0, 0, .05);
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.card-panel-icon-wrapper {
|
.card-panel-icon-wrapper {
|
||||||
@ -107,7 +99,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-shopping {
|
.icon-shopping {
|
||||||
background: #34bfa3
|
background: #34bfa3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +116,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-shopping {
|
.icon-shopping {
|
||||||
color: #34bfa3
|
color: #34bfa3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-panel-icon-wrapper {
|
.card-panel-icon-wrapper {
|
||||||
@ -160,7 +152,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:550px) {
|
@media (max-width: 550px) {
|
||||||
.card-panel-description {
|
.card-panel-description {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -26,23 +26,23 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -72,8 +72,8 @@ export default {
|
|||||||
animationDuration: 2600
|
animationDuration: 2600
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
const animationDuration = 3000
|
const animationDuration = 3000;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -28,28 +28,29 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
axisPointer: {
|
||||||
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -81,36 +82,38 @@ export default {
|
|||||||
bottom: '10',
|
bottom: '10',
|
||||||
data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
|
data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
|
||||||
},
|
},
|
||||||
series: [{
|
series: [
|
||||||
type: 'radar',
|
{
|
||||||
symbolSize: 0,
|
type: 'radar',
|
||||||
areaStyle: {
|
symbolSize: 0,
|
||||||
normal: {
|
areaStyle: {
|
||||||
shadowBlur: 13,
|
normal: {
|
||||||
shadowColor: 'rgba(0,0,0,.2)',
|
shadowBlur: 13,
|
||||||
shadowOffsetX: 0,
|
shadowColor: 'rgba(0,0,0,.2)',
|
||||||
shadowOffsetY: 10,
|
shadowOffsetX: 0,
|
||||||
opacity: 1
|
shadowOffsetY: 10,
|
||||||
}
|
opacity: 1
|
||||||
},
|
}
|
||||||
data: [
|
|
||||||
{
|
|
||||||
value: [5000, 7000, 12000, 11000, 15000, 14000],
|
|
||||||
name: 'Allocated Budget'
|
|
||||||
},
|
},
|
||||||
{
|
data: [
|
||||||
value: [4000, 9000, 15000, 15000, 13000, 11000],
|
{
|
||||||
name: 'Expected Spending'
|
value: [5000, 7000, 12000, 11000, 15000, 14000],
|
||||||
},
|
name: 'Allocated Budget'
|
||||||
{
|
},
|
||||||
value: [5500, 11000, 12000, 15000, 12000, 12000],
|
{
|
||||||
name: 'Actual Spending'
|
value: [4000, 9000, 15000, 15000, 13000, 11000],
|
||||||
}
|
name: 'Expected Spending'
|
||||||
],
|
},
|
||||||
animationDuration: animationDuration
|
{
|
||||||
}]
|
value: [5500, 11000, 12000, 15000, 12000, 12000],
|
||||||
})
|
name: 'Actual Spending'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
animationDuration: animationDuration
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,56 +1,56 @@
|
|||||||
import { debounce } from '@/utils'
|
import { debounce } from '@/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
$_sidebarElm: null,
|
$_sidebarElm: null,
|
||||||
$_resizeHandler: null
|
$_resizeHandler: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initListener()
|
this.initListener();
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
if (!this.$_resizeHandler) {
|
if (!this.$_resizeHandler) {
|
||||||
// avoid duplication init
|
// avoid duplication init
|
||||||
this.initListener()
|
this.initListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
// when keep-alive chart activated, auto resize
|
// when keep-alive chart activated, auto resize
|
||||||
this.resize()
|
this.resize();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.destroyListener()
|
this.destroyListener();
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.destroyListener()
|
this.destroyListener();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// use $_ for mixins properties
|
// use $_ for mixins properties
|
||||||
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
$_sidebarResizeHandler(e) {
|
$_sidebarResizeHandler(e) {
|
||||||
if (e.propertyName === 'width') {
|
if (e.propertyName === 'width') {
|
||||||
this.$_resizeHandler()
|
this.$_resizeHandler();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initListener() {
|
initListener() {
|
||||||
this.$_resizeHandler = debounce(() => {
|
this.$_resizeHandler = debounce(() => {
|
||||||
this.resize()
|
this.resize();
|
||||||
}, 100)
|
}, 100);
|
||||||
window.addEventListener('resize', this.$_resizeHandler)
|
window.addEventListener('resize', this.$_resizeHandler);
|
||||||
|
|
||||||
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0];
|
||||||
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
|
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler);
|
||||||
},
|
},
|
||||||
destroyListener() {
|
destroyListener() {
|
||||||
window.removeEventListener('resize', this.$_resizeHandler)
|
window.removeEventListener('resize', this.$_resizeHandler);
|
||||||
this.$_resizeHandler = null
|
this.$_resizeHandler = null;
|
||||||
|
|
||||||
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
|
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler);
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
const { chart } = this
|
const { chart } = this;
|
||||||
chart && chart.resize()
|
chart && chart.resize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from "@/TUIKit/adapter-vue";
|
import { defineProps } from '@/TUIKit/adapter-vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineProps, defineEmits, withDefaults } from "@/TUIKit/adapter-vue";
|
import { defineProps, defineEmits, withDefaults } from '@/TUIKit/adapter-vue';
|
||||||
import { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
|
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
||||||
|
|
||||||
type IAdvListItem = {
|
type IAdvListItem = {
|
||||||
name?: string;
|
name?: string;
|
||||||
@ -31,18 +31,18 @@ const props = withDefaults(
|
|||||||
item: IAdvListItem;
|
item: IAdvListItem;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
item: () => ({} as IAdvListItem),
|
item: () => ({}) as IAdvListItem
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const emits = defineEmits(["showEvent", "hoverEvent"]);
|
const emits = defineEmits(['showEvent', 'hoverEvent']);
|
||||||
|
|
||||||
const showEvent = () => {
|
const showEvent = () => {
|
||||||
emits("showEvent", props.item);
|
emits('showEvent', props.item);
|
||||||
};
|
};
|
||||||
|
|
||||||
const hoverEvent = () => {
|
const hoverEvent = () => {
|
||||||
emits("hoverEvent", props.item);
|
emits('hoverEvent', props.item);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ const hoverEvent = () => {
|
|||||||
color: rgba(0, 0, 0, 1);
|
color: rgba(0, 0, 0, 1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-family: "PingFang SC";
|
font-family: 'PingFang SC';
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<div class="welcome-title">
|
<div class="welcome-title">
|
||||||
{{ TUITranslateService.t("Home.欢迎使用") }}
|
{{ TUITranslateService.t('Home.欢迎使用') }}
|
||||||
<img class="logo" src="../assets/image/logo.svg" alt="" />
|
<img class="logo" src="../assets/image/logo.svg" alt="" />
|
||||||
{{ TUITranslateService.t("即时通信") }}
|
{{ TUITranslateService.t('即时通信') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isOfficial" class="welcome-content">
|
<div v-if="isOfficial" class="welcome-content">
|
||||||
{{
|
{{
|
||||||
TUITranslateService.t(
|
TUITranslateService.t(
|
||||||
"Home.我们为您默认提供了一位“示例好友”和一个“示例客服群”您不用额外添加好友和群聊就可完整体验腾讯云 IM 单聊、群聊的所有功能。"
|
'Home.我们为您默认提供了一位“示例好友”和一个“示例客服群”您不用额外添加好友和群聊就可完整体验腾讯云 IM 单聊、群聊的所有功能。'
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
<br />
|
<br />
|
||||||
{{ TUITranslateService.t("Home.随时随地") }}
|
{{ TUITranslateService.t('Home.随时随地') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { TUITranslateService, TUIStore, StoreName } from "@tencentcloud/chat-uikit-engine";
|
import { TUITranslateService, TUIStore, StoreName } from '@tencentcloud/chat-uikit-engine';
|
||||||
const isOfficial = TUIStore.getData(StoreName.APP, "isOfficial");
|
const isOfficial = TUIStore.getData(StoreName.APP, 'isOfficial');
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.welcome {
|
.welcome {
|
||||||
@ -29,7 +29,7 @@ const isOfficial = TUIStore.getData(StoreName.APP, "isOfficial");
|
|||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: url("../assets/image/login-background.png") no-repeat;
|
background: url('../assets/image/login-background.png') no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position-x: -17px;
|
background-position-x: -17px;
|
||||||
background-position-y: 173px;
|
background-position-y: 173px;
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
</BottomPopup>
|
</BottomPopup>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { withDefaults, defineProps, defineEmits } from "@/TUIKit/adapter-vue";
|
import { withDefaults, defineProps, defineEmits } from '@/TUIKit/adapter-vue';
|
||||||
import { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
|
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
||||||
import BottomPopup from "@/TUIKit/components/common/BottomPopup";
|
import BottomPopup from '@/TUIKit/components/common/BottomPopup';
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
show: boolean;
|
show: boolean;
|
||||||
@ -24,15 +24,15 @@ const props = withDefaults(
|
|||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
show: false,
|
show: false,
|
||||||
title: "",
|
title: ''
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const emits = defineEmits(["onClose", "onSubmit"]);
|
const emits = defineEmits(['onClose', 'onSubmit']);
|
||||||
function onClose() {
|
function onClose() {
|
||||||
emits("onClose");
|
emits('onClose');
|
||||||
}
|
}
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
emits("onSubmit");
|
emits('onSubmit');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
@ -1,102 +1,63 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="['menu', isH5 && 'menu-h5']">
|
<div :class="['menu', isH5 && 'menu-h5']">
|
||||||
<div
|
<div v-if="isPC" class="header header-border">
|
||||||
v-if="isPC"
|
|
||||||
class="header header-border"
|
|
||||||
>
|
|
||||||
<div class="header-tencent-cloud">
|
<div class="header-tencent-cloud">
|
||||||
<img
|
<img class="header-icon" src="../assets/image/txc-logo.svg" alt="" />
|
||||||
class="header-icon"
|
<span class="header-name">{{ TUITranslateService.t('腾讯云') }}</span>
|
||||||
src="../assets/image/txc-logo.svg"
|
|
||||||
alt=""
|
|
||||||
>
|
|
||||||
<span class="header-name">{{ TUITranslateService.t("腾讯云") }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="header-im header-name">
|
<div class="header-im header-name">
|
||||||
{{ TUITranslateService.t("即时通信IM") }}
|
{{ TUITranslateService.t('即时通信IM') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-if="isH5" class="header header-guide">
|
||||||
v-if="isH5"
|
|
||||||
class="header header-guide"
|
|
||||||
>
|
|
||||||
<div class="header-name">
|
<div class="header-name">
|
||||||
{{ TUITranslateService.t("使用指引") }}
|
{{ TUITranslateService.t('使用指引') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="header-close" @click="closeMenu">
|
||||||
class="header-close"
|
{{ TUITranslateService.t('关闭') }}
|
||||||
@click="closeMenu"
|
|
||||||
>
|
|
||||||
{{ TUITranslateService.t("关闭") }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div
|
<div v-for="item in apkQRCodeList" :key="item.url" class="task">
|
||||||
v-for="item in apkQRCodeList"
|
|
||||||
:key="item.url"
|
|
||||||
class="task"
|
|
||||||
>
|
|
||||||
<div class="task-title">
|
<div class="task-title">
|
||||||
{{ TUITranslateService.t(`Home.${item.label}`) }}
|
{{ TUITranslateService.t(`Home.${item.label}`) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="task-list qr-box">
|
<div class="task-list qr-box">
|
||||||
<img
|
<img class="qr-code" :src="item.url" />
|
||||||
class="qr-code"
|
|
||||||
:src="item.url"
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="task">
|
<div class="task">
|
||||||
<div class="task-title">
|
<div class="task-title">
|
||||||
{{ TUITranslateService.t("Home.建议体验功能") }}
|
{{ TUITranslateService.t('Home.建议体验功能') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="task-list">
|
<div class="task-list">
|
||||||
<div
|
<div v-for="(taskLabel, taskKey) in taskLabelMap" :key="taskKey" :class="['task-list-item', tasks[taskKey] && 'task-list-item-done']">
|
||||||
v-for="(taskLabel, taskKey) in taskLabelMap"
|
|
||||||
:key="taskKey"
|
|
||||||
:class="['task-list-item', tasks[taskKey] && 'task-list-item-done']"
|
|
||||||
>
|
|
||||||
<div class="task-list-item-label">
|
<div class="task-list-item-label">
|
||||||
{{ TUITranslateService.t(`Home.${taskLabel}`) }}
|
{{ TUITranslateService.t(`Home.${taskLabel}`) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="task-list-item-status">
|
<div class="task-list-item-status">
|
||||||
{{ TUITranslateService.t(tasks[taskKey] ? "Home.已完成" : "Home.待体验") }}
|
{{ TUITranslateService.t(tasks[taskKey] ? 'Home.已完成' : 'Home.待体验') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step">
|
<div class="step">
|
||||||
<div class="step-title">
|
<div class="step-title">
|
||||||
{{ TUITranslateService.t("Home.用UI组件快速集成") }}
|
{{ TUITranslateService.t('Home.用UI组件快速集成') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="step-list">
|
<div class="step-list">
|
||||||
<div
|
<div v-for="(step, index) in stepList" :key="step.label" class="step-list-item">
|
||||||
v-for="(step, index) in stepList"
|
|
||||||
:key="step.label"
|
|
||||||
class="step-list-item"
|
|
||||||
>
|
|
||||||
<div class="step-list-item-index">
|
<div class="step-list-item-index">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a class="step-list-item-label" :href="step.url" target="_blank">{{ TUITranslateService.t(`Home.${step.label}`) }}</a>
|
||||||
class="step-list-item-label"
|
|
||||||
:href="step.url"
|
|
||||||
target="_blank"
|
|
||||||
>{{
|
|
||||||
TUITranslateService.t(`Home.${step.label}`)
|
|
||||||
}}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="footer-card-list">
|
<div class="footer-card-list">
|
||||||
<div
|
<div v-for="advItem in advList" :key="advItem.label" class="footer-card" @click="openLink(advItem.url)">
|
||||||
v-for="advItem in advList"
|
|
||||||
:key="advItem.label"
|
|
||||||
class="footer-card"
|
|
||||||
@click="openLink(advItem.url)"
|
|
||||||
>
|
|
||||||
<div class="footer-card-content">
|
<div class="footer-card-content">
|
||||||
<div>{{ TUITranslateService.t(`Home.${advItem.label}`) }}</div>
|
<div>{{ TUITranslateService.t(`Home.${advItem.label}`) }}</div>
|
||||||
<div>{{ TUITranslateService.t(`Home.${advItem.subLabel}`) }}</div>
|
<div>{{ TUITranslateService.t(`Home.${advItem.subLabel}`) }}</div>
|
||||||
@ -134,7 +95,7 @@ const tasks = ref<ITasks>({
|
|||||||
dismissGroup: false,
|
dismissGroup: false,
|
||||||
call: false,
|
call: false,
|
||||||
searchCloudMessage: false,
|
searchCloudMessage: false,
|
||||||
customerService: false,
|
customerService: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const taskLabelMap = {
|
const taskLabelMap = {
|
||||||
@ -146,18 +107,18 @@ const taskLabelMap = {
|
|||||||
dismissGroup: '解散一个群聊',
|
dismissGroup: '解散一个群聊',
|
||||||
call: '发起一次通话',
|
call: '发起一次通话',
|
||||||
searchCloudMessage: '搜索一次消息',
|
searchCloudMessage: '搜索一次消息',
|
||||||
customerService: '进行一次客服会话',
|
customerService: '进行一次客服会话'
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TUIStore.watch(StoreName.APP, {
|
TUIStore.watch(StoreName.APP, {
|
||||||
tasks: setTasksValue,
|
tasks: setTasksValue
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
TUIStore.unwatch(StoreName.APP, {
|
TUIStore.unwatch(StoreName.APP, {
|
||||||
tasks: setTasksValue,
|
tasks: setTasksValue
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -363,7 +324,7 @@ function openLink(url: string) {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #96c3ff;
|
border: 1px solid #96c3ff;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-image: url("../assets/image/adv-background.svg");
|
background-image: url('../assets/image/adv-background.svg');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
||||||
.footer-card-content {
|
.footer-card-content {
|
||||||
@ -378,7 +339,8 @@ function openLink(url: string) {
|
|||||||
padding: 1px 7px;
|
padding: 1px 7px;
|
||||||
background: #147aff;
|
background: #147aff;
|
||||||
border-radius: 0.88rem;
|
border-radius: 0.88rem;
|
||||||
box-shadow: 0 0.19rem 0.25rem 0 rgba(255, 255, 255, 0.7),
|
box-shadow:
|
||||||
|
0 0.19rem 0.25rem 0 rgba(255, 255, 255, 0.7),
|
||||||
0 0.13rem 0.38rem 0 rgba(20, 122, 255, 0.55);
|
0 0.13rem 0.38rem 0 rgba(20, 122, 255, 0.55);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<Icon v-if="item.selectedChild === child.value" :file="selectedIcon" width="14px" height="14px" />
|
<Icon v-if="item.selectedChild === child.value" :file="selectedIcon" width="14px" height="14px" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <BottomPopup
|
<!-- <BottomPopup
|
||||||
v-if="item.children && !isPC && item.childrenShowType === 'bottomPopup'"
|
v-if="item.children && !isPC && item.childrenShowType === 'bottomPopup'"
|
||||||
:show="item.showChildren"
|
:show="item.showChildren"
|
||||||
@onClose="item.showChildren = false"
|
@onClose="item.showChildren = false"
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
<i-frame :src="url" />
|
<i-frame :src="url" />
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import iFrame from "@/components/iFrame/index";
|
import iFrame from '@/components/iFrame/index';
|
||||||
export default {
|
export default {
|
||||||
name: "Druid",
|
name: 'Druid',
|
||||||
components: { iFrame },
|
components: { iFrame },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: import.meta.env.VITE_APP_BASE_API + "/druid/login.html"
|
url: import.meta.env.VITE_APP_BASE_API + '/druid/login.html'
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,31 +2,16 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="任务名称" prop="jobName">
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
<el-input
|
<el-input v-model="queryParams.jobName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.jobName"
|
|
||||||
placeholder="请输入任务名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务组名" prop="jobGroup">
|
<el-form-item label="任务组名" prop="jobGroup">
|
||||||
<el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable>
|
<el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable>
|
||||||
<el-option
|
<el-option v-for="dict in dict?.type.sys_job_group" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
v-for="dict in dict?.type.sys_job_group"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务状态" prop="status">
|
<el-form-item label="任务状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
|
||||||
<el-option
|
<el-option v-for="dict in dict.type.sys_job_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
v-for="dict in dict.type.sys_job_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -37,58 +22,25 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="Plus" size="small" @click="handleAdd" v-hasPermi="['monitor:job:add']">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
size="small"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['monitor:job:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="success" plain icon="Edit" size="small" :disabled="single" @click="handleUpdate" v-hasPermi="['monitor:job:edit']"
|
||||||
type="success"
|
>修改</el-button
|
||||||
plain
|
>
|
||||||
icon="Edit"
|
|
||||||
size="small"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['monitor:job:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:job:remove']"
|
||||||
type="danger"
|
>删除</el-button
|
||||||
plain
|
>
|
||||||
icon="Delete"
|
|
||||||
size="small"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['monitor:job:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" size="small" @click="handleExport" v-hasPermi="['monitor:job:export']">导出</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
size="small"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['monitor:job:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="info" plain icon="Operation" size="small" @click="handleJobLog" v-hasPermi="['monitor:job:query']">日志</el-button>
|
||||||
type="info"
|
|
||||||
plain
|
|
||||||
icon="Operation"
|
|
||||||
size="small"
|
|
||||||
@click="handleJobLog"
|
|
||||||
v-hasPermi="['monitor:job:query']"
|
|
||||||
>日志</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
|
||||||
@ -96,65 +48,43 @@
|
|||||||
<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
|
<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
|
||||||
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
|
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="任务组名" align="center" prop="jobGroup">
|
<el-table-column label="任务组名" align="center" prop="jobGroup">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
|
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
|
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
|
<el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="状态" align="center">
|
<el-table-column label="状态" align="center">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-switch
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||||
v-model="scope.row.status"
|
|
||||||
active-value="0"
|
|
||||||
inactive-value="1"
|
|
||||||
@change="handleStatusChange(scope.row)"
|
|
||||||
></el-switch>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['monitor:job:edit']">修改</el-button>
|
||||||
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']">删除</el-button>
|
||||||
|
<el-dropdown
|
||||||
size="small"
|
size="small"
|
||||||
type="text"
|
@command="(command) => handleCommand(command, scope.row)"
|
||||||
icon="Edit"
|
v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']"
|
||||||
@click="handleUpdate(scope.row)"
|
>
|
||||||
v-hasPermi="['monitor:job:edit']"
|
<span class="el-dropdown-link"> <i class="el-icon-d-arrow-right el-icon--right"></i>更多 </span>
|
||||||
>修改</el-button>
|
<template v-slot:dropdown>
|
||||||
<el-button
|
<el-dropdown-menu>
|
||||||
size="small"
|
<el-dropdown-item command="handleRun" icon="CaretRight" v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
|
||||||
type="text"
|
<el-dropdown-item command="handleView" icon="View" v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
|
||||||
icon="Delete"
|
<el-dropdown-item command="handleJobLog" icon="Operation" v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
|
||||||
@click="handleDelete(scope.row)"
|
</el-dropdown-menu>
|
||||||
v-hasPermi="['monitor:job:remove']"
|
</template>
|
||||||
>删除</el-button>
|
|
||||||
<el-dropdown size="small" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
|
|
||||||
<span class="el-dropdown-link">
|
|
||||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item command="handleRun" icon="CaretRight"
|
|
||||||
v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="handleView" icon="View"
|
|
||||||
v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="handleJobLog" icon="Operation"
|
|
||||||
v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改定时任务对话框 -->
|
<!-- 添加或修改定时任务对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
<el-dialog :title="title" v-model:visible="open" width="800px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -165,35 +95,33 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务分组" prop="jobGroup">
|
<el-form-item label="任务分组" prop="jobGroup">
|
||||||
<el-select v-model="form.jobGroup" placeholder="请选择任务分组">
|
<el-select v-model="form.jobGroup" placeholder="请选择任务分组">
|
||||||
<el-option
|
<el-option v-for="dict in dict.type.sys_job_group" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
v-for="dict in dict.type.sys_job_group"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item prop="invokeTarget">
|
<el-form-item prop="invokeTarget">
|
||||||
<span slot="label">
|
<template v-slot:label>
|
||||||
调用方法
|
<span>
|
||||||
<el-tooltip placement="top">
|
调用方法
|
||||||
<div slot="content">
|
<el-tooltip placement="top">
|
||||||
Bean调用示例:ryTask.ryParams('ry')
|
<template v-slot:content>
|
||||||
<br />Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry')
|
<div>
|
||||||
<br />参数说明:支持字符串,布尔类型,长整型,浮点型,整型
|
Bean调用示例:ryTask.ryParams('ry')
|
||||||
</div>
|
<br />Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry') <br />参数说明:支持字符串,布尔类型,长整型,浮点型,整型
|
||||||
<i class="el-icon-question"></i>
|
</div>
|
||||||
</el-tooltip>
|
</template>
|
||||||
</span>
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<el-input v-model="form.invokeTarget" placeholder="请输入调用目标字符串" />
|
<el-input v-model="form.invokeTarget" placeholder="请输入调用目标字符串" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="cron表达式" prop="cronExpression">
|
<el-form-item label="cron表达式" prop="cronExpression">
|
||||||
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式">
|
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式">
|
||||||
<template slot="append">
|
<template v-slot:append>
|
||||||
<el-button type="primary" @click="handleShowCron">
|
<el-button type="primary" @click="handleShowCron">
|
||||||
生成表达式
|
生成表达式
|
||||||
<i class="el-icon-time el-icon--right"></i>
|
<i class="el-icon-time el-icon--right"></i>
|
||||||
@ -222,28 +150,26 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio v-for="dict in dict.type.sys_job_status" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||||
v-for="dict in dict.type.sys_job_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{dict.label}}</el-radio>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<div class="dialog-footer">
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
</div>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
|
<el-dialog title="Cron表达式生成器" v-model:visible="openCron" append-to-body destroy-on-close class="scrollbar">
|
||||||
<crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
|
<crontab @hide="openCron = false" @fill="crontabFill" :expression="expression"></crontab>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 任务日志详细 -->
|
<!-- 任务日志详细 -->
|
||||||
<el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body>
|
<el-dialog title="任务详细" v-model:visible="openView" width="700px" append-to-body>
|
||||||
<el-form ref="form" :model="form" label-width="120px" size="small">
|
<el-form ref="form" :model="form" label-width="120px" size="small">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -285,20 +211,22 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
<el-button @click="openView = false">关 闭</el-button>
|
<div class="dialog-footer">
|
||||||
</div>
|
<el-button @click="openView = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
|
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from '@/api/monitor/job';
|
||||||
import Crontab from '@/components/Crontab'
|
import Crontab from '@/components/Crontab';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Crontab },
|
components: { Crontab },
|
||||||
name: "Job",
|
name: 'Job',
|
||||||
dicts: ['sys_job_group', 'sys_job_status'],
|
dicts: ['sys_job_group', 'sys_job_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -317,7 +245,7 @@ export default {
|
|||||||
// 定时任务表格数据
|
// 定时任务表格数据
|
||||||
jobList: [],
|
jobList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 是否显示详细弹出层
|
// 是否显示详细弹出层
|
||||||
@ -325,7 +253,7 @@ export default {
|
|||||||
// 是否显示Cron表达式弹出层
|
// 是否显示Cron表达式弹出层
|
||||||
openCron: false,
|
openCron: false,
|
||||||
// 传入的表达式
|
// 传入的表达式
|
||||||
expression: "",
|
expression: '',
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -338,15 +266,9 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
jobName: [
|
jobName: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
|
||||||
{ required: true, message: "任务名称不能为空", trigger: "blur" }
|
invokeTarget: [{ required: true, message: '调用目标字符串不能为空', trigger: 'blur' }],
|
||||||
],
|
cronExpression: [{ required: true, message: 'cron执行表达式不能为空', trigger: 'blur' }]
|
||||||
invokeTarget: [
|
|
||||||
{ required: true, message: "调用目标字符串不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
cronExpression: [
|
|
||||||
{ required: true, message: "cron执行表达式不能为空", trigger: "blur" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -357,7 +279,7 @@ export default {
|
|||||||
/** 查询定时任务列表 */
|
/** 查询定时任务列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listJob(this.queryParams).then(response => {
|
listJob(this.queryParams).then((response) => {
|
||||||
this.jobList = response.rows;
|
this.jobList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -382,9 +304,9 @@ export default {
|
|||||||
cronExpression: undefined,
|
cronExpression: undefined,
|
||||||
misfirePolicy: 1,
|
misfirePolicy: 1,
|
||||||
concurrent: 1,
|
concurrent: 1,
|
||||||
status: "0"
|
status: '0'
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -393,25 +315,25 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.jobId);
|
this.ids = selection.map((item) => item.jobId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
// 更多操作触发
|
// 更多操作触发
|
||||||
handleCommand(command, row) {
|
handleCommand(command, row) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case "handleRun":
|
case 'handleRun':
|
||||||
this.handleRun(row);
|
this.handleRun(row);
|
||||||
break;
|
break;
|
||||||
case "handleView":
|
case 'handleView':
|
||||||
this.handleView(row);
|
this.handleView(row);
|
||||||
break;
|
break;
|
||||||
case "handleJobLog":
|
case 'handleJobLog':
|
||||||
this.handleJobLog(row);
|
this.handleJobLog(row);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -420,26 +342,34 @@ export default {
|
|||||||
},
|
},
|
||||||
// 任务状态修改
|
// 任务状态修改
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
let text = row.status === "0" ? "启用" : "停用";
|
const text = row.status === '0' ? '启用' : '停用';
|
||||||
this.$modal.confirm('确认要"' + text + '""' + row.jobName + '"任务吗?').then(function() {
|
this.$modal
|
||||||
return changeJobStatus(row.jobId, row.status);
|
.confirm('确认要"' + text + '""' + row.jobName + '"任务吗?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.$modal.msgSuccess(text + "成功");
|
return changeJobStatus(row.jobId, row.status);
|
||||||
}).catch(function() {
|
})
|
||||||
row.status = row.status === "0" ? "1" : "0";
|
.then(() => {
|
||||||
});
|
this.$modal.msgSuccess(text + '成功');
|
||||||
|
})
|
||||||
|
.catch(function () {
|
||||||
|
row.status = row.status === '0' ? '1' : '0';
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/* 立即执行一次 */
|
/* 立即执行一次 */
|
||||||
handleRun(row) {
|
handleRun(row) {
|
||||||
this.$modal.confirm('确认要立即执行一次"' + row.jobName + '"任务吗?').then(function() {
|
this.$modal
|
||||||
return runJob(row.jobId, row.jobGroup);
|
.confirm('确认要立即执行一次"' + row.jobName + '"任务吗?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.$modal.msgSuccess("执行成功");
|
return runJob(row.jobId, row.jobGroup);
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$modal.msgSuccess('执行成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 任务详细信息 */
|
/** 任务详细信息 */
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
getJob(row.jobId).then(response => {
|
getJob(row.jobId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.openView = true;
|
this.openView = true;
|
||||||
});
|
});
|
||||||
@ -456,37 +386,37 @@ export default {
|
|||||||
/** 任务日志列表查询 */
|
/** 任务日志列表查询 */
|
||||||
handleJobLog(row) {
|
handleJobLog(row) {
|
||||||
const jobId = row.jobId || 0;
|
const jobId = row.jobId || 0;
|
||||||
this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } })
|
this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } });
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加任务";
|
this.title = '添加任务';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const jobId = row.jobId || this.ids;
|
const jobId = row.jobId || this.ids;
|
||||||
getJob(jobId).then(response => {
|
getJob(jobId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改任务";
|
this.title = '修改任务';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.jobId != undefined) {
|
if (this.form.jobId != undefined) {
|
||||||
updateJob(this.form).then(response => {
|
updateJob(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addJob(this.form).then(response => {
|
addJob(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -497,18 +427,26 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const jobIds = row.jobId || this.ids;
|
const jobIds = row.jobId || this.ids;
|
||||||
this.$modal.confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delJob(jobIds);
|
.confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delJob(jobIds);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('monitor/job/export', {
|
this.download(
|
||||||
...this.queryParams
|
'monitor/job/export',
|
||||||
}, `job_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`job_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,42 +2,16 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="任务名称" prop="jobName">
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
<el-input
|
<el-input v-model="queryParams.jobName" placeholder="请输入任务名称" clearable style="width: 240px" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.jobName"
|
|
||||||
placeholder="请输入任务名称"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务组名" prop="jobGroup">
|
<el-form-item label="任务组名" prop="jobGroup">
|
||||||
<el-select
|
<el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable style="width: 240px">
|
||||||
v-model="queryParams.jobGroup"
|
<el-option v-for="dict in dict?.type.sys_job_group" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
placeholder="请选择任务组名"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict?.type.sys_job_group"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="执行状态" prop="status">
|
<el-form-item label="执行状态" prop="status">
|
||||||
<el-select
|
<el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable style="width: 240px">
|
||||||
v-model="queryParams.status"
|
<el-option v-for="dict in dict?.type.sys_common_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
placeholder="请选择执行状态"
|
|
||||||
clearable
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict?.type.sys_common_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="执行时间">
|
<el-form-item label="执行时间">
|
||||||
@ -59,46 +33,20 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['monitor:job:remove']"
|
||||||
type="danger"
|
>删除</el-button
|
||||||
plain
|
>
|
||||||
icon="Delete"
|
|
||||||
size="small"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['monitor:job:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="danger" plain icon="Delete" size="small" @click="handleClean" v-hasPermi="['monitor:job:remove']">清空</el-button>
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
size="small"
|
|
||||||
@click="handleClean"
|
|
||||||
v-hasPermi="['monitor:job:remove']"
|
|
||||||
>清空</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" size="small" @click="handleExport" v-hasPermi="['monitor:job:export']">导出</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
size="small"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['monitor:job:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Close" size="small" @click="handleClose">关闭</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Close"
|
|
||||||
size="small"
|
|
||||||
@click="handleClose"
|
|
||||||
>关闭</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
|
||||||
@ -106,45 +54,33 @@
|
|||||||
<el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
|
<el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
|
||||||
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
|
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="任务组名" align="center" prop="jobGroup" :show-overflow-tooltip="true">
|
<el-table-column label="任务组名" align="center" prop="jobGroup" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
|
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
|
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
|
<el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="执行状态" align="center" prop="status">
|
<el-table-column label="执行状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="执行时间" align="center" prop="createTime" width="180">
|
<el-table-column label="执行时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button size="small" type="text" icon="View" @click="handleView(scope.row)" v-hasPermi="['monitor:job:query']">详细</el-button>
|
||||||
size="small"
|
|
||||||
type="text"
|
|
||||||
icon="View"
|
|
||||||
@click="handleView(scope.row)"
|
|
||||||
v-hasPermi="['monitor:job:query']"
|
|
||||||
>详细</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 调度日志详细 -->
|
<!-- 调度日志详细 -->
|
||||||
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog title="调度日志详细" v-model:visible="open" width="700px" append-to-body>
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="small">
|
<el-form ref="form" :model="form" label-width="100px" size="small">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -172,19 +108,21 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
<el-button @click="open = false">关 闭</el-button>
|
<div class="dialog-footer">
|
||||||
</div>
|
<el-button @click="open = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getJob} from "@/api/monitor/job";
|
import { getJob } from '@/api/monitor/job';
|
||||||
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
|
import { listJobLog, delJobLog, cleanJobLog } from '@/api/monitor/jobLog';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "JobLog",
|
name: 'JobLog',
|
||||||
dicts: ['sys_common_status', 'sys_job_group'],
|
dicts: ['sys_common_status', 'sys_job_group'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -219,7 +157,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
const jobId = this.$route.query.jobId;
|
const jobId = this.$route.query.jobId;
|
||||||
if (jobId !== undefined && jobId != 0) {
|
if (jobId !== undefined && jobId != 0) {
|
||||||
getJob(jobId).then(response => {
|
getJob(jobId).then((response) => {
|
||||||
this.queryParams.jobName = response.data.jobName;
|
this.queryParams.jobName = response.data.jobName;
|
||||||
this.queryParams.jobGroup = response.data.jobGroup;
|
this.queryParams.jobGroup = response.data.jobGroup;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -232,16 +170,15 @@ export default {
|
|||||||
/** 查询调度日志列表 */
|
/** 查询调度日志列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||||
this.jobLogList = response.rows;
|
this.jobLogList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
// 返回按钮
|
// 返回按钮
|
||||||
handleClose() {
|
handleClose() {
|
||||||
const obj = { path: "/monitor/job" };
|
const obj = { path: '/monitor/job' };
|
||||||
this.$tab.closeOpenPage(obj);
|
this.$tab.closeOpenPage(obj);
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -252,12 +189,12 @@ export default {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.jobLogId);
|
this.ids = selection.map((item) => item.jobLogId);
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 详细按钮操作 */
|
/** 详细按钮操作 */
|
||||||
@ -268,27 +205,39 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const jobLogIds = this.ids;
|
const jobLogIds = this.ids;
|
||||||
this.$modal.confirm('是否确认删除调度日志编号为"' + jobLogIds + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delJobLog(jobLogIds);
|
.confirm('是否确认删除调度日志编号为"' + jobLogIds + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delJobLog(jobLogIds);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 清空按钮操作 */
|
/** 清空按钮操作 */
|
||||||
handleClean() {
|
handleClean() {
|
||||||
this.$modal.confirm('是否确认清空所有调度日志数据项?').then(function() {
|
this.$modal
|
||||||
return cleanJobLog();
|
.confirm('是否确认清空所有调度日志数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return cleanJobLog();
|
||||||
this.$modal.msgSuccess("清空成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('清空成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('/monitor/jobLog/export', {
|
this.download(
|
||||||
...this.queryParams
|
'/monitor/jobLog/export',
|
||||||
}, `log_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams
|
||||||
|
},
|
||||||
|
`log_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" class="card-box">
|
<el-col :span="12" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header"><span>CPU</span></div>
|
<template v-slot:header>
|
||||||
|
<div><span>CPU</span></div>
|
||||||
|
</template>
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||||
<table cellspacing="0" style="width: 100%;">
|
<table cellspacing="0" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
|
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
|
||||||
@ -15,19 +17,27 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -37,9 +47,11 @@
|
|||||||
|
|
||||||
<el-col :span="12" class="card-box">
|
<el-col :span="12" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header"><span>内存</span></div>
|
<template v-slot:header>
|
||||||
|
<div><span>内存</span></div>
|
||||||
|
</template>
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||||
<table cellspacing="0" style="width: 100%;">
|
<table cellspacing="0" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
|
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
|
||||||
@ -50,23 +62,39 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">总内存</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">总内存</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.total }}G</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div></td>
|
<div class="cell" v-if="server.mem">{{ server.mem.total }}G</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">已用内存</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">已用内存</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.used}}G</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.used}}M</div></td>
|
<div class="cell" v-if="server.mem">{{ server.mem.used }}G</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.used }}M</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">剩余内存</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">剩余内存</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.free }}G</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div></td>
|
<div class="cell" v-if="server.mem">{{ server.mem.free }}G</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">使用率</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">使用率</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem" :class="{'text-danger': server.mem.usage > 80}">{{ server.mem.usage }}%</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm" :class="{'text-danger': server.jvm.usage > 80}">{{ server.jvm.usage }}%</div></td>
|
<div class="cell" v-if="server.mem" :class="{ 'text-danger': server.mem.usage > 80 }">{{ server.mem.usage }}%</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm" :class="{ 'text-danger': server.jvm.usage > 80 }">{{ server.jvm.usage }}%</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -76,23 +104,33 @@
|
|||||||
|
|
||||||
<el-col :span="24" class="card-box">
|
<el-col :span="24" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header">
|
<template v-slot:header>
|
||||||
<span>服务器信息</span>
|
<div>
|
||||||
</div>
|
<span>服务器信息</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||||
<table cellspacing="0" style="width: 100%;">
|
<table cellspacing="0" style="width: 100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">服务器名称</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">服务器名称</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div>
|
||||||
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">操作系统</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">操作系统</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osName }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.sys">{{ server.sys.osName }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">服务器IP</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">服务器IP</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div>
|
||||||
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">系统架构</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">系统架构</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -102,35 +140,51 @@
|
|||||||
|
|
||||||
<el-col :span="24" class="card-box">
|
<el-col :span="24" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header">
|
<template v-slot:header>
|
||||||
<span>Java虚拟机信息</span>
|
<div>
|
||||||
</div>
|
<span>Java虚拟机信息</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||||
<table cellspacing="0" style="width: 100%;table-layout:fixed;">
|
<table cellspacing="0" style="width: 100%; table-layout: fixed">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div>
|
||||||
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div>
|
||||||
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
|
<td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
|
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
|
||||||
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div></td>
|
<td colspan="3" class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
|
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
|
||||||
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div></td>
|
<td colspan="3" class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">运行参数</div></td>
|
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">运行参数</div></td>
|
||||||
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.inputArgs }}</div></td>
|
<td colspan="3" class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" v-if="server.jvm">{{ server.jvm.inputArgs }}</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -140,11 +194,13 @@
|
|||||||
|
|
||||||
<el-col :span="24" class="card-box">
|
<el-col :span="24" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header">
|
<template v-slot:header>
|
||||||
<span>磁盘状态</span>
|
<div>
|
||||||
</div>
|
<span>磁盘状态</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||||
<table cellspacing="0" style="width: 100%;">
|
<table cellspacing="0" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="el-table__cell el-table__cell is-leaf"><div class="cell">盘符路径</div></th>
|
<th class="el-table__cell el-table__cell is-leaf"><div class="cell">盘符路径</div></th>
|
||||||
@ -158,13 +214,27 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody v-if="server.sysFiles">
|
<tbody v-if="server.sysFiles">
|
||||||
<tr v-for="(sysFile, index) in server.sysFiles" :key="index">
|
<tr v-for="(sysFile, index) in server.sysFiles" :key="index">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.dirName }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.sysTypeName }}</div></td>
|
<div class="cell">{{ sysFile.dirName }}</div>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.typeName }}</div></td>
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.total }}</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.free }}</div></td>
|
<div class="cell">{{ sysFile.sysTypeName }}</div>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.used }}</div></td>
|
</td>
|
||||||
<td class="el-table__cell is-leaf"><div class="cell" :class="{'text-danger': sysFile.usage > 80}">{{ sysFile.usage }}%</div></td>
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell">{{ sysFile.typeName }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell">{{ sysFile.total }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell">{{ sysFile.free }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell">{{ sysFile.used }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="el-table__cell is-leaf">
|
||||||
|
<div class="cell" :class="{ 'text-danger': sysFile.usage > 80 }">{{ sysFile.usage }}%</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -176,10 +246,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getServer } from "@/api/monitor/server";
|
import { getServer } from '@/api/monitor/server';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Server",
|
name: 'Server',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 服务器信息
|
// 服务器信息
|
||||||
@ -193,15 +263,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 查询服务器信息 */
|
/** 查询服务器信息 */
|
||||||
getList() {
|
getList() {
|
||||||
getServer().then(response => {
|
getServer().then((response) => {
|
||||||
this.server = response.data;
|
this.server = response.data;
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 打开加载层
|
// 打开加载层
|
||||||
openLoading() {
|
openLoading() {
|
||||||
this.$modal.loading("正在加载服务监控数据,请稍候!");
|
this.$modal.loading('正在加载服务监控数据,请稍候!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,237 +1,235 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order_detail_wrapper">
|
<div class="order_detail_wrapper">
|
||||||
<el-main v-loading="loading">
|
<el-main v-loading="loading">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-descriptions title="订单信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
<el-descriptions title="订单信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
||||||
<template slot="extra">
|
<template v-slot:extra>
|
||||||
<el-button size="small" @click="$router.back()">返回</el-button>
|
<el-button size="small" @click="$router.back()">返回</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="订单号">{{ orderDetail.orderSn }}</el-descriptions-item>
|
<el-descriptions-item label="订单号">{{ orderDetail.orderSn }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="用户昵称">{{ orderDetail.nickName }}</el-descriptions-item>
|
<el-descriptions-item label="用户昵称">{{ orderDetail.nickName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="用户手机号">{{ orderDetail.phone }}</el-descriptions-item>
|
<el-descriptions-item label="用户手机号">{{ orderDetail.phone }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="下单时间">{{ parseTime(orderDetail.createTime, '')
|
<el-descriptions-item label="下单时间">{{ parseTime(orderDetail.createTime, '') }}</el-descriptions-item>
|
||||||
}}</el-descriptions-item>
|
<el-descriptions-item label="支付方式">{{ getPayType(orderDetail) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="支付方式">{{ getPayType(orderDetail) }}</el-descriptions-item>
|
<el-descriptions-item label="支付时间">{{ parseTime(orderDetail.payTime, '') }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="支付时间">{{ parseTime(orderDetail.payTime, '')
|
<el-descriptions-item label="订单状态">{{ getOrderStatus(orderDetail) }}</el-descriptions-item>
|
||||||
}}</el-descriptions-item>
|
</el-descriptions>
|
||||||
<el-descriptions-item label="订单状态">{{ getOrderStatus(orderDetail) }}</el-descriptions-item>
|
</el-card>
|
||||||
</el-descriptions>
|
<el-card>
|
||||||
</el-card>
|
<template v-slot:header>
|
||||||
<el-card>
|
<div style="font-size: 16px; font-weight: bold">售后信息</div>
|
||||||
<div slot="header" style="font-size: 16px;font-weight: bold;">售后信息</div>
|
</template>
|
||||||
<el-table :data="refundInfoList">
|
<el-table :data="refundInfoList">
|
||||||
<el-table-column label="售后单号" prop="id" width="150"></el-table-column>
|
<el-table-column label="售后单号" prop="id" width="150"></el-table-column>
|
||||||
<el-table-column label="售后类型" prop="applyRefundType" width="80">
|
<el-table-column label="售后类型" prop="applyRefundType" width="80">
|
||||||
<template slot-scope="{row}">
|
<template v-slot="{ row }">
|
||||||
<span>{{ getAftersaleType(row) }}</span>
|
<span>{{ getAftersaleType(row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请售后时间" prop="applyRefundTime" width="180">
|
<el-table-column label="申请售后时间" prop="applyRefundTime" width="180">
|
||||||
<template slot-scope="{row}">
|
<template v-slot="{ row }">
|
||||||
<span>
|
<span>
|
||||||
{{ parseTime(row.applyRefundTime, '') }}
|
{{ parseTime(row.applyRefundTime, '') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款金额" prop="refundAmount">
|
<el-table-column label="退款金额" prop="refundAmount">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
¥<span>{{ scope.row.refundAmount }}</span>
|
¥<span>{{ scope.row.refundAmount }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请原因" prop="reason"></el-table-column>
|
<el-table-column label="申请原因" prop="reason"></el-table-column>
|
||||||
<el-table-column label="凭证" prop="proofPics">
|
<el-table-column label="凭证" prop="proofPics">
|
||||||
<template slot-scope="{row}">
|
<template v-slot="{ row }">
|
||||||
<el-image class="small-img circle-img" :src="row.proofPics"
|
<el-image class="small-img circle-img" :src="row.proofPics" :preview-src-list="[row.proofPics]" />
|
||||||
:preview-src-list="[row.proofPics]" />
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="申请状态" prop="refundStatus" width="110">
|
||||||
<el-table-column label="申请状态" prop="refundStatus" width="110">
|
<template v-slot="{ row }">
|
||||||
<template slot-scope="{row}">
|
<span>{{ getAftersaleStatus(row) }}</span>
|
||||||
<span>{{ getAftersaleStatus(row) }}</span>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="平台拒绝理由" prop="remark"></el-table-column>
|
||||||
<el-table-column label="平台拒绝理由" prop="remark"></el-table-column>
|
<el-table-column label="退货快递号" prop="refundWaybillCode"></el-table-column>
|
||||||
<el-table-column label="退货快递号" prop="refundWaybillCode"></el-table-column>
|
<el-table-column label="操作">
|
||||||
<el-table-column label="操作">
|
<template v-slot="scope">
|
||||||
<template slot-scope="scope">
|
<el-button size="small" type="text" icon="Edit" @click="handleWatch(scope.row)">查看</el-button>
|
||||||
<el-button size="small" type="text" icon="Edit"
|
</template>
|
||||||
@click="handleWatch(scope.row)">查看</el-button>
|
</el-table-column>
|
||||||
</template>
|
</el-table>
|
||||||
</el-table-column>
|
</el-card>
|
||||||
</el-table>
|
<el-card>
|
||||||
</el-card>
|
<el-descriptions title="收货信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
||||||
<el-card>
|
<el-descriptions-item label="收货人姓名">{{ addressInfo.name }}</el-descriptions-item>
|
||||||
<el-descriptions title="收货信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
<el-descriptions-item label="收货人手机号">{{ addressInfo.userPhone }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="收货人姓名">{{ addressInfo.name }}</el-descriptions-item>
|
<el-descriptions-item label="收货区域">{{ addressInfo.area }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="收货人手机号">{{ addressInfo.userPhone }}</el-descriptions-item>
|
<el-descriptions-item label="详细地址">{{ getHiddenDetailAddress(addressInfo.address) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="收货区域">{{ addressInfo.area }}</el-descriptions-item>
|
</el-descriptions>
|
||||||
<el-descriptions-item label="详细地址">{{ getHiddenDetailAddress(addressInfo.address) }}</el-descriptions-item>
|
</el-card>
|
||||||
</el-descriptions>
|
<el-card>
|
||||||
</el-card>
|
<template v-slot:header>
|
||||||
<el-card>
|
<div style="font-size: 16px; font-weight: bold">商品信息</div>
|
||||||
<div slot="header" style="font-size: 16px;font-weight: bold;">商品信息</div>
|
</template>
|
||||||
<el-table :data="products">
|
<el-table :data="products">
|
||||||
<el-table-column label="商品图片" prop="pic">
|
<el-table-column label="商品图片" prop="pic">
|
||||||
<template slot-scope="{row}"><el-image class="small-img circle-img" :src="row.pic"
|
<template v-slot="{ row }"><el-image class="small-img circle-img" :src="row.pic" :preview-src-list="[row.pic]" /></template>
|
||||||
:preview-src-list="[row.pic]" /></template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="商品ID" prop="productId"></el-table-column>
|
||||||
<el-table-column label="商品ID" prop="productId"></el-table-column>
|
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
||||||
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
<el-table-column label="商品规格" align="center" prop="spData" width="180">
|
||||||
<el-table-column label="商品规格" align="center" prop="spData" width="180">
|
<template v-slot="scope">
|
||||||
<template slot-scope="scope">
|
<div v-for="(item, key) in JSON.parse(scope.row.spData)">{{ key }}:{{ item }}</div>
|
||||||
<div v-for="(item,key) in JSON.parse(scope.row.spData)">{{ key }}:{{ item }}</div>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="价格" prop="salePrice"></el-table-column>
|
||||||
<el-table-column label="价格" prop="salePrice"></el-table-column>
|
<el-table-column label="购买数量" prop="buyNum"></el-table-column>
|
||||||
<el-table-column label="购买数量" prop="buyNum"></el-table-column>
|
</el-table>
|
||||||
</el-table>
|
</el-card>
|
||||||
</el-card>
|
<el-card>
|
||||||
<el-card>
|
<el-descriptions title="物流信息" :column="3" border label-class-name="my-label" contentClassName="my-content">
|
||||||
<el-descriptions title="物流信息" :column="3" border label-class-name="my-label" contentClassName="my-content">
|
<el-descriptions-item label="发货时间">{{ parseTime(orderDetail.deliveryTime, '') }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="发货时间">{{ parseTime(orderDetail.deliveryTime, '')
|
<el-descriptions-item label="快递单号">{{ orderDetail.expressNo }}</el-descriptions-item>
|
||||||
}}</el-descriptions-item>
|
<el-descriptions-item label="物流公司">{{ orderDetail.expressNo ? '顺丰速运' : '' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="快递单号">{{ orderDetail.expressNo }}</el-descriptions-item>
|
<!-- <el-descriptions-item label="物流公司">{{ orderDetail.expressName }}</el-descriptions-item>-->
|
||||||
<el-descriptions-item label="物流公司">{{ orderDetail.expressNo ? '顺丰速运' : '' }}</el-descriptions-item>
|
</el-descriptions>
|
||||||
<!-- <el-descriptions-item label="物流公司">{{ orderDetail.expressName }}</el-descriptions-item>-->
|
</el-card>
|
||||||
</el-descriptions>
|
<!-- 售后详细信息 -->
|
||||||
</el-card>
|
<el-dialog title="售后详细信息" v-model:visible="open" width="1100px" append-to-body>
|
||||||
<!-- 售后详细信息 -->
|
<el-descriptions :column="2" border label-class-name="my-label" contentClassName="my-content">
|
||||||
<el-dialog title="售后详细信息" :visible.sync="open" width="1100px" append-to-body>
|
<el-descriptions-item label="售后单号">{{ refundInfoDetail.id }}</el-descriptions-item>
|
||||||
<el-descriptions :column="2" border label-class-name="my-label" contentClassName="my-content">
|
<el-descriptions-item label="售后类型">{{ getAftersaleType(refundInfoDetail) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="售后单号">{{ refundInfoDetail.id }}</el-descriptions-item>
|
<el-descriptions-item label="申请售后时间">{{ parseTime(refundInfoDetail.applyRefundTime, '') }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="售后类型">{{ getAftersaleType(refundInfoDetail) }}</el-descriptions-item>
|
<el-descriptions-item label="退款金额">¥{{ refundInfoDetail.refundAmount }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请售后时间">{{ parseTime(refundInfoDetail.applyRefundTime,'') }}</el-descriptions-item>
|
<el-descriptions-item label="申请原因">{{ refundInfoDetail.reason }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="退款金额">¥{{ refundInfoDetail.refundAmount }}</el-descriptions-item>
|
<el-descriptions-item label="具体描述">{{ refundInfoDetail.description }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请原因">{{ refundInfoDetail.reason }}</el-descriptions-item>
|
<el-descriptions-item label="凭证">
|
||||||
<el-descriptions-item label="具体描述">{{ refundInfoDetail.description }}</el-descriptions-item>
|
<el-image class="small-img circle-img" :src="refundInfoDetail.proofPics" :preview-src-list="[refundInfoDetail.proofPics]" />
|
||||||
<el-descriptions-item label="凭证">
|
</el-descriptions-item>
|
||||||
<el-image class="small-img circle-img" :src="refundInfoDetail.proofPics"
|
<el-descriptions-item label="申请状态">{{ getAftersaleStatus(refundInfoDetail) }}</el-descriptions-item>
|
||||||
:preview-src-list="[refundInfoDetail.proofPics]" />
|
<el-descriptions-item label="平台拒绝理由">{{ refundInfoDetail.remark }}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="退货快递号">{{ refundInfoDetail.refundWaybillCode }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请状态">{{ getAftersaleStatus(refundInfoDetail) }}</el-descriptions-item>
|
<el-descriptions-item label="物流公司">{{ getExpressName(refundInfoDetail.refundWpCode) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="平台拒绝理由">{{ refundInfoDetail.remark }}</el-descriptions-item>
|
<el-descriptions-item label="物流进度">
|
||||||
<el-descriptions-item label="退货快递号">{{ refundInfoDetail.refundWaybillCode }}</el-descriptions-item>
|
<el-popover placement="left" width="300" trigger="hover" popper-class="popperOptions">
|
||||||
<el-descriptions-item label="物流公司">{{ getExpressName(refundInfoDetail.refundWpCode) }}</el-descriptions-item>
|
<el-timeline-item v-for="(activity, index) in aliLogisticsInfoList" :key="index" :timestamp="activity.time">
|
||||||
<el-descriptions-item label="物流进度">
|
{{ activity.context }}
|
||||||
<el-popover placement="left" width="300" trigger="hover" popper-class="popperOptions">
|
</el-timeline-item>
|
||||||
<el-timeline-item v-for="(activity, index) in aliLogisticsInfoList" :key="index"
|
<template v-slot:reference>
|
||||||
:timestamp="activity.time">
|
<span>{{ refundInfoDetail.logistics }}</span>
|
||||||
{{ activity.context }}
|
</template>
|
||||||
</el-timeline-item>
|
</el-popover>
|
||||||
<span slot="reference">{{ refundInfoDetail.logistics }}</span>
|
</el-descriptions-item>
|
||||||
</el-popover>
|
</el-descriptions>
|
||||||
</el-descriptions-item>
|
</el-dialog>
|
||||||
</el-descriptions>
|
</el-main>
|
||||||
</el-dialog>
|
</div>
|
||||||
</el-main>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getOmsAftersale } from "@/api/oms/aftersale";
|
import { getOmsAftersale } from '@/api/oms/aftersale';
|
||||||
import {getConfigKey2} from "@/api/system/config";
|
import { getConfigKey2 } from '@/api/system/config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OmsAftersaleDetail",
|
name: 'OmsAftersaleDetail',
|
||||||
dicts: ['oms_order_status', 'oms_pay_type', "oms_aftersale_type", "oms_aftersale_status"],
|
dicts: ['oms_order_status', 'oms_pay_type', 'oms_aftersale_type', 'oms_aftersale_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
products: [],
|
products: [],
|
||||||
orderDetail: {},
|
orderDetail: {},
|
||||||
addressInfo: {},
|
addressInfo: {},
|
||||||
// aliLogisticsInfoList: [],
|
// aliLogisticsInfoList: [],
|
||||||
refundInfoList: [],
|
refundInfoList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
experssList: [],
|
experssList: [],
|
||||||
open: false,
|
open: false,
|
||||||
refundInfoDetail: {},
|
refundInfoDetail: {},
|
||||||
aliLogisticsInfoList: []
|
aliLogisticsInfoList: []
|
||||||
}
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getExpressData();
|
||||||
|
const { id } = this.$route.query;
|
||||||
|
this.queryDetail(id).then((expressNo) => {
|
||||||
|
// this.getLogistic(expressNo)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
orderStatusMap() {
|
||||||
|
const obj = this.dict.type.oms_order_status.map((item) => [item.value, item.label]);
|
||||||
|
const map = new Map(obj);
|
||||||
|
return map;
|
||||||
},
|
},
|
||||||
created() {
|
payTypeMap() {
|
||||||
this.getExpressData()
|
const obj = this.dict.type.oms_pay_type.map((item) => [item.value, item.label]);
|
||||||
const { id } = this.$route.query
|
const map = new Map(obj);
|
||||||
this.queryDetail(id).then((expressNo) => {
|
return map;
|
||||||
// this.getLogistic(expressNo)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
computed: {
|
aftersaleTypeMap() {
|
||||||
orderStatusMap() {
|
const obj = this.dict.type.oms_aftersale_type.map((item) => [item.value, item.label]);
|
||||||
let obj = this.dict.type.oms_order_status.map(item => [item.value, item.label])
|
const map = new Map(obj);
|
||||||
let map = new Map(obj)
|
return map;
|
||||||
return map;
|
|
||||||
},
|
|
||||||
payTypeMap() {
|
|
||||||
let obj = this.dict.type.oms_pay_type.map(item => [item.value, item.label])
|
|
||||||
let map = new Map(obj)
|
|
||||||
return map
|
|
||||||
},
|
|
||||||
aftersaleTypeMap() {
|
|
||||||
let obj = this.dict.type.oms_aftersale_type.map(item => [item.value, item.label])
|
|
||||||
let map = new Map(obj)
|
|
||||||
return map;
|
|
||||||
},
|
|
||||||
aftersaleStatusMap() {
|
|
||||||
let obj = this.dict.type.oms_aftersale_status.map(item => [item.value, item.label])
|
|
||||||
let map = new Map(obj)
|
|
||||||
return map;
|
|
||||||
},
|
|
||||||
expressMap() {
|
|
||||||
let obj = this.experssList.map(item => [item.expressCode, item.expressName])
|
|
||||||
return new Map(obj)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
aftersaleStatusMap() {
|
||||||
getExpressData() {
|
const obj = this.dict.type.oms_aftersale_status.map((item) => [item.value, item.label]);
|
||||||
getConfigKey2('express-set-key').then(res => {
|
const map = new Map(obj);
|
||||||
if (res.data && res.data.configValue) {
|
return map;
|
||||||
this.experssList = JSON.parse(res.data.configValue)
|
},
|
||||||
} else {
|
expressMap() {
|
||||||
this.experssList = []
|
const obj = this.experssList.map((item) => [item.expressCode, item.expressName]);
|
||||||
}
|
return new Map(obj);
|
||||||
})
|
|
||||||
},
|
|
||||||
queryDetail(id) {
|
|
||||||
this.loading = true
|
|
||||||
return new Promise(resolve =>
|
|
||||||
getOmsAftersale(id).then(res => {
|
|
||||||
const { productList, addressInfo, refundInfoList } = res;
|
|
||||||
this.orderDetail = res;
|
|
||||||
this.products = productList
|
|
||||||
this.refundInfoList = refundInfoList
|
|
||||||
this.addressInfo = addressInfo || {}
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
getOrderStatus(row) {
|
|
||||||
return this.orderStatusMap.get(row.status + '')
|
|
||||||
},
|
|
||||||
getPayType(row) {
|
|
||||||
return this.payTypeMap.get(row.payType + '')
|
|
||||||
},
|
|
||||||
getAftersaleType(row) {
|
|
||||||
return this.aftersaleTypeMap.get(row.applyRefundType + '')
|
|
||||||
},
|
|
||||||
getAftersaleStatus(row) {
|
|
||||||
return this.aftersaleStatusMap.get(row.refundStatus + '')
|
|
||||||
},
|
|
||||||
getExpressName(name) {
|
|
||||||
return this.expressMap.get(name)
|
|
||||||
},
|
|
||||||
handleWatch(row) {
|
|
||||||
this.refundInfoDetail = row
|
|
||||||
if(this.refundInfoDetail.allLogistics){
|
|
||||||
this.aliLogisticsInfoList = JSON.parse(refundInfoDetail.allLogistics)
|
|
||||||
}
|
|
||||||
this.open = true
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.refundInfoDetail = {};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
methods: {
|
||||||
|
getExpressData() {
|
||||||
|
getConfigKey2('express-set-key').then((res) => {
|
||||||
|
if (res.data && res.data.configValue) {
|
||||||
|
this.experssList = JSON.parse(res.data.configValue);
|
||||||
|
} else {
|
||||||
|
this.experssList = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
queryDetail(id) {
|
||||||
|
this.loading = true;
|
||||||
|
return new Promise((resolve) =>
|
||||||
|
getOmsAftersale(id).then((res) => {
|
||||||
|
const { productList, addressInfo, refundInfoList } = res;
|
||||||
|
this.orderDetail = res;
|
||||||
|
this.products = productList;
|
||||||
|
this.refundInfoList = refundInfoList;
|
||||||
|
this.addressInfo = addressInfo || {};
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
getOrderStatus(row) {
|
||||||
|
return this.orderStatusMap.get(row.status + '');
|
||||||
|
},
|
||||||
|
getPayType(row) {
|
||||||
|
return this.payTypeMap.get(row.payType + '');
|
||||||
|
},
|
||||||
|
getAftersaleType(row) {
|
||||||
|
return this.aftersaleTypeMap.get(row.applyRefundType + '');
|
||||||
|
},
|
||||||
|
getAftersaleStatus(row) {
|
||||||
|
return this.aftersaleStatusMap.get(row.refundStatus + '');
|
||||||
|
},
|
||||||
|
getExpressName(name) {
|
||||||
|
return this.expressMap.get(name);
|
||||||
|
},
|
||||||
|
handleWatch(row) {
|
||||||
|
this.refundInfoDetail = row;
|
||||||
|
if (this.refundInfoDetail.allLogistics) {
|
||||||
|
this.aliLogisticsInfoList = JSON.parse(refundInfoDetail.allLogistics);
|
||||||
|
}
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.refundInfoDetail = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@ -272,4 +270,4 @@ export default {
|
|||||||
.el-timeline-item__timestamp {
|
.el-timeline-item__timestamp {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -37,9 +37,7 @@
|
|||||||
<el-table-column label="退货数量" align="center" prop="quantity" />
|
<el-table-column label="退货数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['oms:aftersaleItem:edit']"
|
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['oms:aftersaleItem:edit']">修改</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oms:aftersaleItem:remove']"
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oms:aftersaleItem:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
|
@ -5,13 +5,7 @@
|
|||||||
<el-input v-model="queryParams.orderId" placeholder="请输入订单id" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.orderId" placeholder="请输入订单id" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物流公司(配送方式)" prop="deliveryCompany">
|
<el-form-item label="物流公司(配送方式)" prop="deliveryCompany">
|
||||||
<el-input
|
<el-input v-model="queryParams.deliveryCompany" placeholder="请输入物流公司(配送方式)" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.deliveryCompany"
|
|
||||||
placeholder="请输入物流公司(配送方式)"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物流单号" prop="deliverySn">
|
<el-form-item label="物流单号" prop="deliverySn">
|
||||||
<el-input v-model="queryParams.deliverySn" placeholder="请输入物流单号" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deliverySn" placeholder="请输入物流单号" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
@ -24,9 +18,7 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" size="small" @click="handleAdd" v-hasPermi="['oms:orderDeliveryHistory:add']"
|
<el-button type="primary" plain icon="Plus" size="small" @click="handleAdd" v-hasPermi="['oms:orderDeliveryHistory:add']">新增</el-button>
|
||||||
>新增</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -80,9 +80,7 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['oms:orderItem:edit']">修改</el-button>
|
<el-button size="small" type="text" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['oms:orderItem:edit']">修改</el-button>
|
||||||
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oms:orderItem:remove']"
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oms:orderItem:remove']">删除</el-button>
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -57,9 +57,7 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" size="small" @click="handleAdd" v-hasPermi="['pms:wechatPaymentHistory:add']"
|
<el-button type="primary" plain icon="Plus" size="small" @click="handleAdd" v-hasPermi="['pms:wechatPaymentHistory:add']">新增</el-button>
|
||||||
>新增</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -3,13 +3,7 @@
|
|||||||
<div v-show="show">
|
<div v-show="show">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
||||||
<el-form-item label="上架状态" prop="publishStatus">
|
<el-form-item label="上架状态" prop="publishStatus">
|
||||||
<DictRadio
|
<DictRadio v-model="queryParams.publishStatus" @change="handleQuery" size="small" radioData="pms_publish_status" :showAll="'all'" />
|
||||||
v-model="queryParams.publishStatus"
|
|
||||||
@change="handleQuery"
|
|
||||||
size="small"
|
|
||||||
radioData="pms_publish_status"
|
|
||||||
:showAll="'all'"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="queryParams.nameLike" placeholder="请输入商品名称" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.nameLike" placeholder="请输入商品名称" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
@ -18,13 +12,7 @@
|
|||||||
<el-input v-model="queryParams.brandNameLike" placeholder="请输入品牌名称" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.brandNameLike" placeholder="请输入品牌名称" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分类" prop="productCategoryName">
|
<el-form-item label="分类" prop="productCategoryName">
|
||||||
<el-input
|
<el-input v-model="queryParams.productCategoryNameLike" placeholder="请输入分类名称" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.productCategoryNameLike"
|
|
||||||
placeholder="请输入分类名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="编码" prop="outProductId">
|
<el-form-item label="编码" prop="outProductId">
|
||||||
<el-input v-model="queryParams.outProductId" placeholder="请输入商品编码" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.outProductId" placeholder="请输入商品编码" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
|
@ -1,25 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header" class="clearfix">
|
<template v-slot:header>
|
||||||
<div class="flex-center">
|
<div class="clearfix">
|
||||||
<h2>积分获取规则</h2>
|
<div class="flex-center">
|
||||||
<el-button class="ml-auto" type="primary" @click="saveData">保存
|
<h2>积分获取规则</h2>
|
||||||
</el-button>
|
<el-button class="ml-auto" type="primary" @click="saveData">保存 </el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
<el-form :model="incomeVal" label-width="180px">
|
<el-form :model="incomeVal" label-width="180px">
|
||||||
<el-form-item label="签到活动状态">
|
<el-form-item label="签到活动状态">
|
||||||
<el-switch v-model="incomeVal.signStatus" :active-value="1" :inactive-value="0"/>
|
<el-switch v-model="incomeVal.signStatus" :active-value="1" :inactive-value="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="每日签到固定积分">
|
<el-form-item label="每日签到固定积分">
|
||||||
<el-input
|
<el-input type="number" v-model="incomeVal.signCount" style="width: 200px" placeholder="每天签到获取的积分">
|
||||||
type="number"
|
<template v-slot:append>
|
||||||
v-model="incomeVal.signCount"
|
|
||||||
style="width:200px"
|
|
||||||
placeholder="每天签到获取的积分"
|
|
||||||
>
|
|
||||||
<template slot="append">
|
|
||||||
<span>积分</span>
|
<span>积分</span>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -27,24 +23,14 @@
|
|||||||
<el-form-item label="消费获得积分">
|
<el-form-item label="消费获得积分">
|
||||||
<div class="flex-center">
|
<div class="flex-center">
|
||||||
<span class="mr5">每消费</span>
|
<span class="mr5">每消费</span>
|
||||||
<el-input
|
<el-input type="number" v-model="incomeVal.orderAmount" style="width: 200px" placeholder="每天签到获取的积分">
|
||||||
type="number"
|
<template v-slot:append>
|
||||||
v-model="incomeVal.orderAmount"
|
|
||||||
style="width:200px"
|
|
||||||
placeholder="每天签到获取的积分"
|
|
||||||
>
|
|
||||||
<template slot="append">
|
|
||||||
<span>元</span>
|
<span>元</span>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span class="ml5 mr5">,获得</span>
|
<span class="ml5 mr5">,获得</span>
|
||||||
<el-input
|
<el-input type="number" v-model="incomeVal.orderCount" style="width: 200px" placeholder="每天签到获取的积分">
|
||||||
type="number"
|
<template v-slot:append>
|
||||||
v-model="incomeVal.orderCount"
|
|
||||||
style="width:200px"
|
|
||||||
placeholder="每天签到获取的积分"
|
|
||||||
>
|
|
||||||
<template slot="append">
|
|
||||||
<span>积分</span>
|
<span>积分</span>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -56,58 +42,61 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addOrUpdate, getConfigKey2} from "@/api/system/config";
|
import { addOrUpdate, getConfigKey2 } from '@/api/system/config';
|
||||||
|
|
||||||
const key = "activity-integral-income-set-key"
|
const key = 'activity-integral-income-set-key';
|
||||||
|
|
||||||
const defaultIncomeVal = {
|
const defaultIncomeVal = {
|
||||||
signStatus: 1,
|
signStatus: 1,
|
||||||
signCount: 1,
|
signCount: 1,
|
||||||
orderAmount: 1,
|
orderAmount: 1,
|
||||||
orderCount: 1
|
orderCount: 1
|
||||||
}
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
incomeObj: {},
|
incomeObj: {},
|
||||||
incomeVal: {},
|
incomeVal: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData() {
|
||||||
getConfigKey2(key).then(res => {
|
getConfigKey2(key).then((res) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
this.incomeObj = res.data
|
this.incomeObj = res.data;
|
||||||
this.incomeVal = JSON.parse(res.data.configValue)
|
this.incomeVal = JSON.parse(res.data.configValue);
|
||||||
} else {
|
} else {
|
||||||
this.incomeVal = {...defaultIncomeVal}
|
this.incomeVal = { ...defaultIncomeVal };
|
||||||
this.incomeObj = {
|
this.incomeObj = {
|
||||||
configValue: JSON.stringify(this.incomeVal),
|
configValue: JSON.stringify(this.incomeVal),
|
||||||
configKey: key,
|
configKey: key,
|
||||||
configType: 'N',
|
configType: 'N',
|
||||||
configName: '积分获取规则',
|
configName: '积分获取规则',
|
||||||
configId: null
|
configId: null
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
saveData() {
|
|
||||||
let self = this;
|
|
||||||
this.$modal.confirm('是否确认要保存积分获取规则?').then(function () {
|
|
||||||
self.incomeObj.configValue = JSON.stringify(self.incomeVal)
|
|
||||||
return addOrUpdate(self.incomeObj);
|
|
||||||
}).then(() => {
|
|
||||||
this.initData();
|
|
||||||
this.$modal.msgSuccess("保存成功");
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
saveData() {
|
||||||
|
const self = this;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认要保存积分获取规则?')
|
||||||
|
.then(function () {
|
||||||
|
self.incomeObj.configValue = JSON.stringify(self.incomeVal);
|
||||||
|
return addOrUpdate(self.incomeObj);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.initData();
|
||||||
|
this.$modal.msgSuccess('保存成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initData()
|
this.initData();
|
||||||
},
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs v-model="activeKey" @tab-click="changeType">
|
<el-tabs v-model="activeKey" @tab-click="changeType">
|
||||||
<el-tab-pane v-for="it in tabList" :key="it.value" :label="it.label" :name="it.value"/>
|
<el-tab-pane v-for="it in tabList" :key="it.value" :label="it.label" :name="it.value" />
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<Editor v-model="currentConfig.configValue" placeholder="请输入内容" type="url"></Editor>
|
<Editor v-model="currentConfig.configValue" placeholder="请输入内容" type="url"></Editor>
|
||||||
<el-button type="primary" class="mt20" @click="asyncOk">保存</el-button>
|
<el-button type="primary" class="mt20" @click="asyncOk">保存</el-button>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getConfigKey2, addOrUpdate} from '@/api/system/config'
|
import { getConfigKey2, addOrUpdate } from '@/api/system/config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -18,51 +18,54 @@ export default {
|
|||||||
//常见问题,隐私协议,联系客服
|
//常见问题,隐私协议,联系客服
|
||||||
activeKey: 'mall.contact',
|
activeKey: 'mall.contact',
|
||||||
tabList: [
|
tabList: [
|
||||||
{label: '客服配置', value: 'mall.contact'},
|
{ label: '客服配置', value: 'mall.contact' },
|
||||||
{label: '隐私协议', value: 'mall.privacyAgreement'},
|
{ label: '隐私协议', value: 'mall.privacyAgreement' },
|
||||||
{label: '常见问题', value: 'mall.question'},
|
{ label: '常见问题', value: 'mall.question' },
|
||||||
{label: '关于我们', value: 'mall.aboutUs'},
|
{ label: '关于我们', value: 'mall.aboutUs' }
|
||||||
],
|
],
|
||||||
configList: [],
|
configList: [],
|
||||||
currentConfig: {
|
currentConfig: {
|
||||||
configValue: '',
|
configValue: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeType() {
|
changeType() {
|
||||||
this.currentConfig = this.configList.filter(it => it.configKey === this.activeKey)[0]
|
this.currentConfig = this.configList.filter((it) => it.configKey === this.activeKey)[0];
|
||||||
console.log(this.currentConfig)
|
console.log(this.currentConfig);
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
const funcArr = this.tabList.map(it => {
|
const funcArr = this.tabList.map((it) => {
|
||||||
return getConfigKey2(it.value)
|
return getConfigKey2(it.value);
|
||||||
})
|
});
|
||||||
const list = []
|
const list = [];
|
||||||
Promise.all(funcArr).then(res => {
|
Promise.all(funcArr).then((res) => {
|
||||||
res.forEach((it, idx) => {
|
res.forEach((it, idx) => {
|
||||||
list.push(it.data ? it.data : {
|
list.push(
|
||||||
configValue: '',
|
it.data
|
||||||
configType: 'N',
|
? it.data
|
||||||
configKey: this.tabList[idx].value,
|
: {
|
||||||
configName: this.tabList[idx].label,
|
configValue: '',
|
||||||
configId: null
|
configType: 'N',
|
||||||
})
|
configKey: this.tabList[idx].value,
|
||||||
})
|
configName: this.tabList[idx].label,
|
||||||
this.configList = list
|
configId: null
|
||||||
this.changeType()
|
}
|
||||||
})
|
);
|
||||||
|
});
|
||||||
|
this.configList = list;
|
||||||
|
this.changeType();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
asyncOk() {
|
asyncOk() {
|
||||||
addOrUpdate(this.currentConfig).then(res=>{
|
addOrUpdate(this.currentConfig).then((res) => {
|
||||||
this.$message.success('保存成功')
|
this.$message.success('保存成功');
|
||||||
this.getData()
|
this.getData();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getData()
|
this.getData();
|
||||||
},
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,96 +2,59 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
||||||
<el-form-item label="收货人姓名" prop="name">
|
<el-form-item label="收货人姓名" prop="name">
|
||||||
<el-input
|
<el-input v-model="queryParams.name" placeholder="请输入收货人姓名" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入收货人姓名"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号" prop="phone">
|
<el-form-item label="手机号" prop="phone">
|
||||||
<el-input
|
<el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.phone"
|
|
||||||
placeholder="请输入手机号"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮政编码" prop="postCode">
|
<el-form-item label="邮政编码" prop="postCode">
|
||||||
<el-input
|
<el-input v-model="queryParams.postCode" placeholder="请输入邮政编码" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.postCode"
|
|
||||||
placeholder="请输入邮政编码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="省份/直辖市" prop="province">
|
<el-form-item label="省份/直辖市" prop="province">
|
||||||
<el-input
|
<el-input v-model="queryParams.province" placeholder="请输入省份/直辖市" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.province"
|
|
||||||
placeholder="请输入省份/直辖市"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="城市" prop="city">
|
<el-form-item label="城市" prop="city">
|
||||||
<el-input
|
<el-input v-model="queryParams.city" placeholder="请输入城市" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.city"
|
|
||||||
placeholder="请输入城市"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template v-if="showMoreCondition">
|
<template v-if="showMoreCondition">
|
||||||
<el-form-item label="区" prop="district">
|
<el-form-item label="区" prop="district">
|
||||||
<el-input
|
<el-input v-model="queryParams.district" placeholder="请输入区" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.district"
|
</el-form-item>
|
||||||
placeholder="请输入区"
|
<el-form-item label="详细地址" prop="detailAddress">
|
||||||
clearable
|
<el-input v-model="queryParams.detailAddress" placeholder="请输入详细地址" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
size="small"
|
</el-form-item>
|
||||||
@keyup.enter="handleQuery"
|
</template>
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="详细地址" prop="detailAddress">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.detailAddress"
|
|
||||||
placeholder="请输入详细地址"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button type="primary" icon="Search" size="small" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" size="small" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" size="small" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" size="small" @click="resetQuery">重置</el-button>
|
||||||
<el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="small" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</el-button>
|
<el-button
|
||||||
|
:icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
|
||||||
|
size="small"
|
||||||
|
@click="showMoreCondition = !showMoreCondition"
|
||||||
|
>{{ showMoreCondition ? '收起条件' : '展开条件' }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">-->
|
<!-- <el-row :gutter="10" class="mb8">-->
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- type="primary"-->
|
<!-- type="primary"-->
|
||||||
<!-- plain-->
|
<!-- plain-->
|
||||||
<!-- icon="Plus"-->
|
<!-- icon="Plus"-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- @click="handleAdd"-->
|
<!-- @click="handleAdd"-->
|
||||||
<!-- v-hasPermi="['ums:memberAddress:add']"-->
|
<!-- v-hasPermi="['ums:memberAddress:add']"-->
|
||||||
<!-- >新增</el-button>-->
|
<!-- >新增</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="umsMemberAddressList">
|
<el-table v-loading="loading" :data="umsMemberAddressList">
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||||
<el-table-column label="收货人姓名" align="center" prop="name" >
|
<el-table-column label="收货人姓名" align="center" prop="name">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>{{ getHiddenName(scope.row.name) }}</div>
|
<div>{{ getHiddenName(scope.row.name) }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="手机号" align="center" prop="phoneHidden" />
|
<el-table-column label="手机号" align="center" prop="phoneHidden" />
|
||||||
@ -104,36 +67,30 @@
|
|||||||
<div>{{ getHiddenDetailAddress(scope.row.detailAddress) }}</div>
|
<div>{{ getHiddenDetailAddress(scope.row.detailAddress) }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- type="text"-->
|
<!-- type="text"-->
|
||||||
<!-- icon="Edit"-->
|
<!-- icon="Edit"-->
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
<!-- @click="handleUpdate(scope.row)"-->
|
||||||
<!-- v-hasPermi="['ums:memberAddress:edit']"-->
|
<!-- v-hasPermi="['ums:memberAddress:edit']"-->
|
||||||
<!-- >修改</el-button>-->
|
<!-- >修改</el-button>-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- type="text"-->
|
<!-- type="text"-->
|
||||||
<!-- icon="Delete"-->
|
<!-- icon="Delete"-->
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
<!-- v-hasPermi="['ums:memberAddress:remove']"-->
|
<!-- v-hasPermi="['ums:memberAddress:remove']"-->
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改会员收货地址对话框 -->
|
<!-- 添加或修改会员收货地址对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
<el-dialog :title="title" v-model:visible="open" width="50%" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||||
<el-input v-model="form.memberId" placeholder="请输入MEMBER_ID" />
|
<el-input v-model="form.memberId" placeholder="请输入MEMBER_ID" />
|
||||||
@ -168,18 +125,27 @@
|
|||||||
<el-input v-model="form.isDefault" placeholder="请输入是否默认" />
|
<el-input v-model="form.isDefault" placeholder="请输入是否默认" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<div class="dialog-footer">
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
</div>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listUmsMemberAddress, getUmsMemberAddress, delUmsMemberAddress, addUmsMemberAddress, updateUmsMemberAddress, exportUmsMemberAddress } from "@/api/ums/memberAddress";
|
import {
|
||||||
|
listUmsMemberAddress,
|
||||||
|
getUmsMemberAddress,
|
||||||
|
delUmsMemberAddress,
|
||||||
|
addUmsMemberAddress,
|
||||||
|
updateUmsMemberAddress,
|
||||||
|
exportUmsMemberAddress
|
||||||
|
} from '@/api/ums/memberAddress';
|
||||||
export default {
|
export default {
|
||||||
name: "UmsMemberAddress",
|
name: 'UmsMemberAddress',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -199,7 +165,7 @@ export default {
|
|||||||
// 会员收货地址表格数据
|
// 会员收货地址表格数据
|
||||||
umsMemberAddressList: [],
|
umsMemberAddressList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -215,15 +181,13 @@ export default {
|
|||||||
city: null,
|
city: null,
|
||||||
district: null,
|
district: null,
|
||||||
detailAddress: null,
|
detailAddress: null,
|
||||||
isDefault: null,
|
isDefault: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
isDefault: [
|
isDefault: [{ required: true, message: '是否默认不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: "是否默认不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
showMoreCondition: false,
|
showMoreCondition: false,
|
||||||
chineseNumbers: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
|
chineseNumbers: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
|
||||||
@ -236,11 +200,11 @@ export default {
|
|||||||
/** 查询会员收货地址列表 */
|
/** 查询会员收货地址列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listUmsMemberAddress(query, pageReq).then(response => {
|
listUmsMemberAddress(query, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.umsMemberAddressList = content;
|
this.umsMemberAddressList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -270,7 +234,7 @@ export default {
|
|||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -279,44 +243,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加会员收货地址";
|
this.title = '添加会员收货地址';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getUmsMemberAddress(id).then(response => {
|
getUmsMemberAddress(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改会员收货地址";
|
this.title = '修改会员收货地址';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateUmsMemberAddress(this.form).then(response => {
|
updateUmsMemberAddress(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUmsMemberAddress(this.form).then(response => {
|
addUmsMemberAddress(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -327,23 +291,31 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除会员收货地址编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delUmsMemberAddress(ids);
|
.confirm('是否确认删除会员收货地址编号为"' + ids + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delUmsMemberAddress(ids);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有会员收货地址数据项?').then(() => {
|
this.$modal
|
||||||
this.exportLoading = true;
|
.confirm('是否确认导出所有会员收货地址数据项?')
|
||||||
return exportUmsMemberAddress(queryParams);
|
.then(() => {
|
||||||
}).then(response => {
|
this.exportLoading = true;
|
||||||
this.$download.download(response);
|
return exportUmsMemberAddress(queryParams);
|
||||||
this.exportLoading = false;
|
})
|
||||||
}).catch(() => {});
|
.then((response) => {
|
||||||
|
this.$download.download(response);
|
||||||
|
this.exportLoading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,22 +2,10 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
||||||
<el-form-item label="用户手机号" prop="phone">
|
<el-form-item label="用户手机号" prop="phone">
|
||||||
<el-input
|
<el-input v-model="queryParams.phone" placeholder="用户手机号" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.phone"
|
|
||||||
placeholder="用户手机号"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品名称" prop="productName">
|
<el-form-item label="商品名称" prop="productName">
|
||||||
<el-input
|
<el-input v-model="queryParams.productName" placeholder="商品名称" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.productName"
|
|
||||||
placeholder="商品名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button type="primary" icon="Search" size="small" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" size="small" @click="handleQuery">搜索</el-button>
|
||||||
@ -26,23 +14,23 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="umsMemberCartList" @selection-change="handleSelectionChange" border cell-class-name="my-cell">
|
<el-table v-loading="loading" :data="umsMemberCartList" @selection-change="handleSelectionChange" border cell-class-name="my-cell">
|
||||||
<!-- <el-table-column type="selection" width="55" />-->
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
<el-table-column label="用户信息" prop="phoneHidden">
|
<el-table-column label="用户信息" prop="phoneHidden">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<p>{{scope.row.phoneHidden}}</p>
|
<p>{{ scope.row.phoneHidden }}</p>
|
||||||
<p>{{scope.row.nickname}}</p>
|
<p>{{ scope.row.nickname }}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户备注" prop="mark" />
|
<el-table-column label="用户备注" prop="mark" />
|
||||||
<el-table-column label="商品名称" prop="productName" />
|
<el-table-column label="商品名称" prop="productName" />
|
||||||
<el-table-column label="商品规格" prop="spData">
|
<el-table-column label="商品规格" prop="spData">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="product-container">
|
<div class="product-container">
|
||||||
<el-popover
|
<el-popover placement="right" trigger="hover">
|
||||||
placement="right"
|
<el-image :src="scope.row.pic" style="width: 350px; height: 350px" />
|
||||||
trigger="hover">
|
<template v-slot:reference>
|
||||||
<el-image :src="scope.row.pic" style="width: 350px;height: 350px"/>
|
<el-image class="small-img product-item" :src="scope.row.pic" style="width: 40px; height: 40px" />
|
||||||
<el-image slot="reference" class="small-img product-item" :src="scope.row.pic" style="width: 40px;height: 40px"/>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<div class="product-item" style="margin-left: 5px">
|
<div class="product-item" style="margin-left: 5px">
|
||||||
<div class="sp-data">
|
<div class="sp-data">
|
||||||
@ -56,50 +44,44 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="价格" prop="price">-->
|
<!-- <el-table-column label="价格" prop="price">-->
|
||||||
<!-- <template v-slot="scope">-->
|
<!-- <template v-slot="scope">-->
|
||||||
<!-- <div>{{ scope.row.price.toFixed(2) }}</div>-->
|
<!-- <div>{{ scope.row.price.toFixed(2) }}</div>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="状态" prop="skuIfExist">
|
<el-table-column label="状态" prop="skuIfExist">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-tag effect="plain" size="default" :type="scope.row.skuIfExist === 1 ? 'success' : 'error'">
|
<el-tag effect="plain" size="default" :type="scope.row.skuIfExist === 1 ? 'success' : 'error'">
|
||||||
{{ scope.row.skuIfExist === 1 ? '有效' : '失效' }}
|
{{ scope.row.skuIfExist === 1 ? '有效' : '失效' }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="加入时间" prop="createTime">
|
<el-table-column label="加入时间" prop="createTime">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>{{ parseTime(scope.row.createTime, '')}}</div>
|
<div>{{ parseTime(scope.row.createTime, '') }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作" class-name="small-padding fixed-width">-->
|
<!-- <el-table-column label="操作" class-name="small-padding fixed-width">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- type="text"-->
|
<!-- type="text"-->
|
||||||
<!-- icon="Edit"-->
|
<!-- icon="Edit"-->
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
<!-- @click="handleUpdate(scope.row)"-->
|
||||||
<!-- v-hasPermi="['ums:memberCart:edit']"-->
|
<!-- v-hasPermi="['ums:memberCart:edit']"-->
|
||||||
<!-- >修改</el-button>-->
|
<!-- >修改</el-button>-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- type="text"-->
|
<!-- type="text"-->
|
||||||
<!-- icon="Delete"-->
|
<!-- icon="Delete"-->
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
<!-- v-hasPermi="['ums:memberCart:remove']"-->
|
<!-- v-hasPermi="['ums:memberCart:remove']"-->
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -111,10 +93,10 @@ import {
|
|||||||
getUmsMemberCart,
|
getUmsMemberCart,
|
||||||
listUmsMemberCart,
|
listUmsMemberCart,
|
||||||
updateUmsMemberCart
|
updateUmsMemberCart
|
||||||
} from "@/api/ums/memberCart";
|
} from '@/api/ums/memberCart';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UmsMemberCart",
|
name: 'UmsMemberCart',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -134,7 +116,7 @@ export default {
|
|||||||
// 购物车表格数据
|
// 购物车表格数据
|
||||||
umsMemberCartList: [],
|
umsMemberCartList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -149,9 +131,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const { phone } = this.$route.query
|
const { phone } = this.$route.query;
|
||||||
if (phone){
|
if (phone) {
|
||||||
this.queryParams.phone = phone
|
this.queryParams.phone = phone;
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
@ -159,11 +141,11 @@ export default {
|
|||||||
/** 查询购物车列表 */
|
/** 查询购物车列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listUmsMemberCart(query, pageReq).then(response => {
|
listUmsMemberCart(query, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.umsMemberCartList = content;
|
this.umsMemberCartList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -191,7 +173,7 @@ export default {
|
|||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -200,44 +182,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
// this.handleQuery();
|
// this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加购物车";
|
this.title = '添加购物车';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getUmsMemberCart(id).then(response => {
|
getUmsMemberCart(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改购物车";
|
this.title = '修改购物车';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateUmsMemberCart(this.form).then(response => {
|
updateUmsMemberCart(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUmsMemberCart(this.form).then(response => {
|
addUmsMemberCart(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -248,46 +230,54 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除购物车编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delUmsMemberCart(ids);
|
.confirm('是否确认删除购物车编号为"' + ids + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delUmsMemberCart(ids);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有购物车数据项?').then(() => {
|
this.$modal
|
||||||
this.exportLoading = true;
|
.confirm('是否确认导出所有购物车数据项?')
|
||||||
return exportUmsMemberCart(queryParams);
|
.then(() => {
|
||||||
}).then(response => {
|
this.exportLoading = true;
|
||||||
this.$download.download(response);
|
return exportUmsMemberCart(queryParams);
|
||||||
this.exportLoading = false;
|
})
|
||||||
}).catch(() => {});
|
.then((response) => {
|
||||||
|
this.$download.download(response);
|
||||||
|
this.exportLoading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.product-container{
|
.product-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 180px;
|
width: 180px;
|
||||||
.product-item{
|
.product-item {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 180px;
|
width: 180px;
|
||||||
.sp-data{
|
.sp-data {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.quantity{
|
.quantity {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-table .my-cell {
|
.el-table .my-cell {
|
||||||
vertical-align: top
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,49 +2,19 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
|
||||||
<el-form-item label="会员手机号" prop="phone">
|
<el-form-item label="会员手机号" prop="phone">
|
||||||
<el-input
|
<el-input v-model="queryParams.phone" placeholder="请输入会员手机号" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.phone"
|
|
||||||
placeholder="请输入会员手机号"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="登录IP地址" prop="ipaddr">
|
<el-form-item label="登录IP地址" prop="ipaddr">
|
||||||
<el-input
|
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录IP地址" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.ipaddr"
|
|
||||||
placeholder="请输入登录IP地址"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="登录地点" prop="loginLocation">
|
<el-form-item label="登录地点" prop="loginLocation">
|
||||||
<el-input
|
<el-input v-model="queryParams.loginLocation" placeholder="请输入登录地点" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.loginLocation"
|
|
||||||
placeholder="请输入登录地点"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="浏览器类型" prop="browser">
|
<el-form-item label="浏览器类型" prop="browser">
|
||||||
<el-input
|
<el-input v-model="queryParams.browser" placeholder="请输入浏览器类型" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.browser"
|
|
||||||
placeholder="请输入浏览器类型"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作系统" prop="os">
|
<el-form-item label="操作系统" prop="os">
|
||||||
<el-input
|
<el-input v-model="queryParams.os" placeholder="请输入操作系统" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
v-model="queryParams.os"
|
|
||||||
placeholder="请输入操作系统"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="登录时间">
|
<el-form-item label="登录时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -53,7 +23,7 @@
|
|||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
:picker-options='pickerOptions'
|
:picker-options="pickerOptions"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
start-placeholder="开始时间"
|
start-placeholder="开始时间"
|
||||||
end-placeholder="结束时间"
|
end-placeholder="结束时间"
|
||||||
@ -66,38 +36,28 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="umsMemberLogininforList" @selection-change="handleSelectionChange" border>
|
<el-table v-loading="loading" :data="umsMemberLogininforList" @selection-change="handleSelectionChange" border>
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="会员手机号" prop="phone"/>
|
<el-table-column label="会员手机号" prop="phone" />
|
||||||
<el-table-column label="会员id" prop="memberId"/>
|
<el-table-column label="会员id" prop="memberId" />
|
||||||
<el-table-column label="登录IP地址" prop="ipaddr"/>
|
<el-table-column label="登录IP地址" prop="ipaddr" />
|
||||||
<el-table-column label="登录地点" prop="loginLocation"/>
|
<el-table-column label="登录地点" prop="loginLocation" />
|
||||||
<el-table-column label="浏览器类型" prop="browser"/>
|
<el-table-column label="浏览器类型" prop="browser" />
|
||||||
<el-table-column label="操作系统" prop="os"/>
|
<el-table-column label="操作系统" prop="os" />
|
||||||
<el-table-column label="登陆时间" prop="loginTime" width="180">
|
<el-table-column label="登陆时间" prop="loginTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.loginTime, '') }}</span>
|
<span>{{ parseTime(scope.row.loginTime, '') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" class-name="small-padding fixed-width">
|
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['ums:memberLogininfor:remove']"
|
||||||
size="small"
|
>删除
|
||||||
type="text"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['ums:memberLogininfor:remove']"
|
|
||||||
>删除
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -109,11 +69,11 @@ import {
|
|||||||
getUmsMemberLogininfor,
|
getUmsMemberLogininfor,
|
||||||
listUmsMemberLogininfor,
|
listUmsMemberLogininfor,
|
||||||
updateUmsMemberLogininfor
|
updateUmsMemberLogininfor
|
||||||
} from "@/api/ums/memberLogininfor";
|
} from '@/api/ums/memberLogininfor';
|
||||||
import dateUtil from '@/utils/DateUtil';
|
import dateUtil from '@/utils/DateUtil';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UmsMemberLogininfor",
|
name: 'UmsMemberLogininfor',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
@ -137,7 +97,7 @@ export default {
|
|||||||
// 会员登录记录表格数据
|
// 会员登录记录表格数据
|
||||||
umsMemberLogininforList: [],
|
umsMemberLogininforList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -154,8 +114,7 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {}
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -165,11 +124,11 @@ export default {
|
|||||||
/** 查询会员登录记录列表 */
|
/** 查询会员登录记录列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listUmsMemberLogininfor({...this.addDateRange2(query, this.dateRange)}, pageReq).then(response => {
|
listUmsMemberLogininfor({ ...this.addDateRange2(query, this.dateRange) }, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.umsMemberLogininforList = content;
|
this.umsMemberLogininforList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -192,7 +151,7 @@ export default {
|
|||||||
os: null,
|
os: null,
|
||||||
loginTime: null
|
loginTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -201,44 +160,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加会员登录记录";
|
this.title = '添加会员登录记录';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getUmsMemberLogininfor(id).then(response => {
|
getUmsMemberLogininfor(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改会员登录记录";
|
this.title = '修改会员登录记录';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateUmsMemberLogininfor(this.form).then(response => {
|
updateUmsMemberLogininfor(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUmsMemberLogininfor(this.form).then(response => {
|
addUmsMemberLogininfor(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -249,23 +208,31 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除会员登录记录编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
return delUmsMemberLogininfor(ids);
|
.confirm('是否确认删除会员登录记录编号为"' + ids + '"的数据项?')
|
||||||
}).then(() => {
|
.then(function () {
|
||||||
this.getList();
|
return delUmsMemberLogininfor(ids);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess('删除成功');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有会员登录记录数据项?').then(() => {
|
this.$modal
|
||||||
this.exportLoading = true;
|
.confirm('是否确认导出所有会员登录记录数据项?')
|
||||||
return exportUmsMemberLogininfor(queryParams);
|
.then(() => {
|
||||||
}).then(response => {
|
this.exportLoading = true;
|
||||||
this.$download.download(response);
|
return exportUmsMemberLogininfor(queryParams);
|
||||||
this.exportLoading = false;
|
})
|
||||||
}).catch(() => {});
|
.then((response) => {
|
||||||
|
this.$download.download(response);
|
||||||
|
this.exportLoading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -24,8 +24,9 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
target: 'http://192.168.1.13:8080',
|
// target: 'http://192.168.1.13:8080',
|
||||||
// target: 'http://192.168.1.250:8080',
|
// target: 'http://192.168.1.250:8080',
|
||||||
|
target: 'http://111.62.22.190:8080', // 测试环境
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),
|
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user