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