Merge branch 'zyh' into zyj
This commit is contained in:
@@ -88,7 +88,7 @@ import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/crud'
|
||||
import { del } from '@/api/bxg/yxStoreBargain'
|
||||
import eForm from './form'
|
||||
import { formatTimeTwo, parseTime } from '@/utils/index'
|
||||
import { formatTimeTwo } from '@/utils/index'
|
||||
export default {
|
||||
components: { eForm },
|
||||
mixins: [initData],
|
||||
@@ -103,7 +103,6 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
formatTimeTwo,
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/crud'
|
||||
import { del, onsale } from '@/api/bxg/yxStoreCombination'
|
||||
import { formatTimeTwo, parseTime } from '@/utils/index'
|
||||
import { formatTimeTwo } from '@/utils/index'
|
||||
export default {
|
||||
components: { },
|
||||
mixins: [initData],
|
||||
@@ -122,12 +122,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toAddURL(){
|
||||
this.$router.push({ path: '/activity/combinationAdd' })
|
||||
this.$router.push({ path: 'bxg/activity/combinationAdd' })
|
||||
},
|
||||
toUpdateURL(id){
|
||||
this.$router.push({ path: '/activity/combinationEdit/'+id })
|
||||
this.$router.push({ path: 'bxg/activity/combinationEdit/'+id })
|
||||
},
|
||||
parseTime,
|
||||
formatTimeTwo,
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
import initData from '@/mixins/crud'
|
||||
import { del } from '@/api/bxg/yxStorePink'
|
||||
import eForm from './form'
|
||||
import { formatTimeTwo, parseTime } from '@/utils/index'
|
||||
import { formatTimeTwo } from '@/utils/index'
|
||||
export default {
|
||||
components: { eForm },
|
||||
mixins: [initData],
|
||||
@@ -95,7 +95,6 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
formatTimeTwo,
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/crud'
|
||||
import { del } from '@/api/bxg/yxStoreSeckill'
|
||||
import { formatTimeTwo, parseTime } from '@/utils/index'
|
||||
import { formatTimeTwo } from '@/utils/index'
|
||||
export default {
|
||||
mixins: [initData],
|
||||
data() {
|
||||
@@ -111,7 +111,6 @@ export default {
|
||||
toUpdateURL(id){
|
||||
this.$router.push({ path: '/activity/secKillEdit/'+id })
|
||||
},
|
||||
parseTime,
|
||||
formatTimeTwo,
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-row :gutter="24" class="dashboard-console-grid">
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/shop/cate' }">
|
||||
<router-link :to="{ path: 'bxg/shop/goods' }">
|
||||
<i class="el-icon-goods" style="color: #69c0ff" />
|
||||
<p>商品管理</p>
|
||||
</router-link>
|
||||
@@ -11,7 +11,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/member/member' }">
|
||||
<router-link :to="{ path: 'bxg/member/member' }">
|
||||
<i class="el-icon-user" style="color: #95de64" />
|
||||
<p>会员管理</p>
|
||||
</router-link>
|
||||
@@ -19,7 +19,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/order/order' }">
|
||||
<router-link :to="{ path: 'bxg/order/order' }">
|
||||
<i class="el-icon-s-order" style="color: #ff9c6e" />
|
||||
<p>订单管理</p>
|
||||
</router-link>
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/syscoupon/coupon' }">
|
||||
<router-link :to="{ path: 'bxg/syscoupon/coupon' }">
|
||||
<i class="el-icon-s-ticket" style="color: #b37feb" />
|
||||
<p>电子券管理</p>
|
||||
</router-link>
|
||||
@@ -35,7 +35,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/activity/combination' }">
|
||||
<router-link :to="{ path: 'bxg/activity/combination' }">
|
||||
<i class="el-icon-postcard" style="color: #ffd666" />
|
||||
<p>营销管理</p>
|
||||
</router-link>
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/promoter/promoterconfig' }">
|
||||
<router-link :to="{ path: 'bxg/promoter/promoterconfig' }">
|
||||
<i class="el-icon-notebook-1" style="color: #5cdbd3" />
|
||||
<p>分销管理</p>
|
||||
</router-link>
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/price/extract' }">
|
||||
<router-link :to="{ path: 'bxg/price/extract' }">
|
||||
<i class="el-icon-s-finance" style="color: #ff85c0" />
|
||||
<p>财务管理</p>
|
||||
</router-link>
|
||||
@@ -59,7 +59,7 @@
|
||||
</el-col>
|
||||
<el-col v-bind="grid" class="ivu-mb">
|
||||
<el-card :bordered="false">
|
||||
<router-link :to="{ path: '/store/storeinfo' }">
|
||||
<router-link :to="{ path: 'bxg/store/storeinfo' }">
|
||||
<i class="el-icon-office-building" style="color: #ffc069" />
|
||||
<p>门店管理</p>
|
||||
</router-link>
|
||||
|
||||
@@ -74,7 +74,7 @@ import picUpload from '@/components/pic-upload'
|
||||
import MaterialList from '@/components/material'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '分类', url: 'api/yxStoreCategory', sort: 'sort,desc', crudMethod: { ...crudDept }})
|
||||
const defaultCrud = CRUD({ title: '分类', url: 'bxg/api/yxStoreCategory', sort: 'sort,desc', crudMethod: { ...crudDept }})
|
||||
const defaultForm = { id: null, cateName: null, pid: 0, isShow: 1 , sort: 1}
|
||||
export default {
|
||||
name: 'Dept',
|
||||
|
||||
@@ -736,7 +736,7 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$router.push({ path: '/shop/goods' });
|
||||
this.$router.push({ path: '/bxg/goods' });
|
||||
}, 500);
|
||||
}).catch(res => {
|
||||
// this.$message({
|
||||
|
||||
@@ -130,10 +130,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toAddURL(){
|
||||
this.$router.push({ path: '/shop/goodsAdd' })
|
||||
this.$router.push({ path: '/bxg/shop/goodsAdd' })
|
||||
},
|
||||
toUpdateURL(id){
|
||||
this.$router.push({ path: '/shop/goodsEdit/'+id })
|
||||
this.$router.push({ path: '/bxg/shop/goodsEdit/'+id })
|
||||
},
|
||||
dataFilter(val){
|
||||
this.value=val
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<el-table-column v-if="checkPermission(['admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT','YXSTOREPRODUCT_DELETE'])" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-permission="['admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT']" size="mini" type="primary" icon="el-icon-edit">
|
||||
<router-link :to="'/shop/goodsEdit/'+scope.row.id">
|
||||
<router-link :to="'/bxg/shop/goodsEdit/'+scope.row.id">
|
||||
编辑
|
||||
</router-link>
|
||||
</el-button>
|
||||
|
||||
@@ -401,7 +401,9 @@ import eRemark from './remark'
|
||||
components: {eForm, eRefund, editOrder, eRemark},
|
||||
data() {
|
||||
return {
|
||||
orderStatus:null,
|
||||
orderStatus:{
|
||||
cacheKeyCreateOrder:""
|
||||
},
|
||||
isAdd: false,
|
||||
id: null,
|
||||
order: {
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<script>
|
||||
import { add, edit, express,
|
||||
getNowOrderStatus } from '@/api/bxg/yxStoreOrder'
|
||||
import {formatTimeTwo, parseTime} from '@/utils/index'
|
||||
import {formatTimeTwo} from '@/utils/index'
|
||||
export default {
|
||||
props: {
|
||||
isAdd: {
|
||||
@@ -99,7 +99,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderStatus:null,
|
||||
orderStatus:{
|
||||
cacheKeyCreateOrder:""
|
||||
},
|
||||
loading: false, dialog: false, expressInfo: [],
|
||||
form: {
|
||||
id: '',
|
||||
@@ -168,7 +170,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
cancel() {
|
||||
this.dialog = false
|
||||
},
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
},
|
||||
methods: {
|
||||
toDetailURL(id){
|
||||
this.$router.push({ path: '/order/detail/'+id })
|
||||
this.$router.push({ path: '/bxg/order/detail/'+id })
|
||||
},
|
||||
formatTime,
|
||||
checkPermission,
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, parseTime, formatTimeTwo } from '@/utils/index'
|
||||
import { formatTime, formatTimeTwo } from '@/utils/index'
|
||||
export default {
|
||||
props: {
|
||||
printList: {
|
||||
@@ -77,7 +77,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
formatTime,
|
||||
parseTime,
|
||||
formatTimeTwo,
|
||||
cancel() {
|
||||
this.dialog = false
|
||||
|
||||
@@ -55,7 +55,7 @@ import MaterialList from "@/components/material";
|
||||
import add from './form'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '运费模板', url: 'api/yxShippingTemplates', sort: 'id,desc', crudMethod: { ...crudYxShippingTemplates }})
|
||||
const defaultCrud = CRUD({ title: '运费模板', url: 'bxg/api/yxShippingTemplates', sort: 'id,desc', crudMethod: { ...crudYxShippingTemplates }})
|
||||
const defaultForm = { id: null, name: null, type: null, regionInfo: null, appoint: null, appointInfo: null, createTime: null, updateTime: null, isDel: null, sort: null }
|
||||
export default {
|
||||
name: 'YxShippingTemplates',
|
||||
|
||||
@@ -109,10 +109,9 @@
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import MaterialList from '@/components/material'
|
||||
import { parseTime } from '@/utils/index'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '门店', url: 'api/yxSystemStore', sort: 'id,desc', crudMethod: { ...crudYxSystemStore }})
|
||||
const defaultCrud = CRUD({ title: '门店', url: 'bxg/api/yxSystemStore', sort: 'id,desc', crudMethod: { ...crudYxSystemStore }})
|
||||
const defaultForm = { id: null, name: null, introduction: null, phone: null, address: null, detailedAddress: null, image: null, latitude:
|
||||
null, longitude: null, validTime: null, dayTime: null, addTime: null, isShow: 1, imageArr: [], validTimeArr: [], dayTimeArr: [new Date(),new Date()] }
|
||||
export default {
|
||||
|
||||
@@ -47,7 +47,7 @@ import MaterialList from "@/components/material"
|
||||
import add from './form'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: 'sku规则', url: 'api/yxStoreProductRule', sort: 'id,desc', crudMethod: { ...crudYxStoreProductRule }})
|
||||
const defaultCrud = CRUD({ title: 'sku规则', url: 'bxg/api/yxStoreProductRule', sort: 'id,desc', crudMethod: { ...crudYxStoreProductRule }})
|
||||
const defaultForm = { id: null, ruleName: null, ruleValue: null, createTime: null, updateTime: null, isDel: null }
|
||||
export default {
|
||||
name: 'YxStoreProductRule',
|
||||
|
||||
@@ -98,7 +98,7 @@ import crudYxSystemStore from '@/api/bxg/yxSystemStore'
|
||||
import { formatTimeTwo } from '@/utils/index'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '门店店员', url: 'api/yxSystemStoreStaff', sort: 'id,desc', crudMethod: { ...crudYxSystemStoreStaff }})
|
||||
const defaultCrud = CRUD({ title: '门店店员', url: 'bxg/api/yxSystemStoreStaff', sort: 'id,desc', crudMethod: { ...crudYxSystemStoreStaff }})
|
||||
const defaultForm = { user: {uid: null,nickname: null,avatar: null}, id: null, uid: null, avatar: null, storeId: null, staffName: null, phone: null, verifyStatus: 1, status: null, addTime: null, nickname: null, storeName: null }
|
||||
export default {
|
||||
name: 'YxSystemStoreStaff',
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
|
||||
<script>
|
||||
import { add, edit, getSpread } from '@/api/bxg/yxUser'
|
||||
import { parseTime } from '@/utils/index'
|
||||
export default {
|
||||
props: {
|
||||
// isAdd: {
|
||||
@@ -91,7 +90,6 @@ export default {
|
||||
handleClick(tab, event) {
|
||||
this.spread(this.form.uid)
|
||||
},
|
||||
parseTime,
|
||||
cancel() {
|
||||
this.dialog = false
|
||||
},
|
||||
|
||||
@@ -125,7 +125,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '文件', url: 'api/localStorage', crudMethod: { ...crudFile }})
|
||||
const defaultCrud = CRUD({ title: '文件', url: 'bxg/api/localStorage', crudMethod: { ...crudFile }})
|
||||
const defaultForm = { id: null, name: '' }
|
||||
export default {
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
|
||||
@@ -90,7 +90,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '七牛云文件', url: 'api/qiNiuContent', crudMethod: { ...crudQiNiu }})
|
||||
const defaultCrud = CRUD({ title: '七牛云文件', url: 'bxg/api/qiNiuContent', crudMethod: { ...crudQiNiu }})
|
||||
export default {
|
||||
components: { eForm, pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(defaultCrud), header(), crud()],
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
methods: {
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
this.url = 'api/yxStoreProduct'
|
||||
this.url = 'bxg/api/yxStoreProduct'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0 ,isIntegral:0}
|
||||
const query = this.query
|
||||
|
||||
@@ -179,7 +179,7 @@ export default {
|
||||
},
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
this.url = 'api/yxStoreProduct'
|
||||
this.url = 'bxg/api/yxStoreProduct'
|
||||
const sort = 'id,desc'
|
||||
this.params = {page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0,isIntegral:0}
|
||||
const query = this.query
|
||||
|
||||
+14
-6
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">芋道后台管理系统</h3>
|
||||
<h3 class="title">后台管理系统</h3>
|
||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>
|
||||
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon" />
|
||||
@@ -44,7 +44,7 @@
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2020-2021 iocoder.cn All Rights Reserved.</span>
|
||||
<span>Copyright © 2020-2022 回乡.com All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -60,17 +60,25 @@ import { getTenantEnable } from "@/utils/ruoyi";
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
|
||||
// username: "admin",
|
||||
// password: "admin123",
|
||||
// rememberMe: false,
|
||||
// code: "",
|
||||
// uuid: "",
|
||||
// tenantName: "芋道源码",
|
||||
|
||||
return {
|
||||
codeUrl: "",
|
||||
captchaEnable: true,
|
||||
tenantEnable: true,
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
username: "",
|
||||
password: "",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: "",
|
||||
tenantName: "芋道源码",
|
||||
tenantName: "",
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
@@ -199,7 +207,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("http://static.yudao.iocoder.cn/login-background.jpg");
|
||||
background-image: url("https://pos.upload.lotus-wallet.com/0000/hx.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2020-2021 iocoder.cn All Rights Reserved.</span>
|
||||
<span>Copyright © 2020-2022 回乡.com All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<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="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="部门" prop="department">
|
||||
<el-input v-model="queryParams.department" placeholder="请输入部门" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职位" prop="position">
|
||||
<el-input v-model="queryParams.position" placeholder="请输入职位" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="邮件" prop="email">
|
||||
<el-input v-model="queryParams.email" placeholder="请输入邮件" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业邮件" prop="bizMail">
|
||||
<el-input v-model="queryParams.bizMail" placeholder="请输入企业邮件" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['system:cp-user:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
v-hasPermi="['system:cp-user:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="用户昵称" align="center" prop="nickname" />
|
||||
<el-table-column label="头像" align="center" prop="avatar" >
|
||||
<template slot-scope="scope">
|
||||
<el-avatar :src="scope.row.avatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="部门" align="center" prop="department" />
|
||||
<el-table-column label="职位" align="center" prop="position" />
|
||||
<el-table-column label="邮件" align="center" prop="email" />
|
||||
<el-table-column label="企业邮件" align="center" prop="bizMail" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:cp-user:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:cp-user:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户昵称" prop="nickname">
|
||||
<el-input v-model="form.nickname" placeholder="请输入用户昵称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="头像" prop="avatar">
|
||||
<el-input v-model="form.avatar" placeholder="请输入头像" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="department">
|
||||
<el-input v-model="form.department" placeholder="请输入部门" />
|
||||
</el-form-item>
|
||||
<el-form-item label="职位" prop="position">
|
||||
<el-input v-model="form.position" placeholder="请输入职位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="邮件" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入邮件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业邮件" prop="bizMail">
|
||||
<el-input v-model="form.bizMail" placeholder="请输入企业邮件" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createCpUser, updateCpUser, deleteCpUser, getCpUser, getCpUserPage, exportCpUserExcel } from "@/api/system/cpUser";
|
||||
|
||||
export default {
|
||||
name: "CpUser",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业微信成员列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
dateRangeCreateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
userid: null,
|
||||
avatar: null,
|
||||
status: null,
|
||||
mobile: null,
|
||||
name: null,
|
||||
department: null,
|
||||
position: null,
|
||||
email: null,
|
||||
bizMail: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userid: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
|
||||
avatar: [{ required: true, message: "头像不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
mobile: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||
// 执行查询
|
||||
getCpUserPage(params).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
userid: undefined,
|
||||
avatar: undefined,
|
||||
status: undefined,
|
||||
mobile: undefined,
|
||||
name: undefined,
|
||||
department: undefined,
|
||||
position: undefined,
|
||||
email: undefined,
|
||||
bizMail: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRangeCreateTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加企业微信成员";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id;
|
||||
getCpUser(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改企业微信成员";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
updateCpUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createCpUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal.confirm('是否确认删除企业微信成员编号为"' + id + '"的数据项?').then(function() {
|
||||
return deleteCpUser(id);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
|
||||
// 执行导出
|
||||
this.$modal.confirm('是否确认导出所有企业微信成员数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportCpUserExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '${table.classComment}.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user