This commit is contained in:
王创世 2024-08-13 18:10:46 +08:00
parent 22d848f7f2
commit 0a87dabfac
27 changed files with 1434 additions and 136 deletions

View File

@ -5,7 +5,8 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import config from '@/config/style'; import config from '@/config/style';
import Layout from '@/layouts/index.vue';
import {UsergroupIcon} from "tdesign-icons-vue";
export default Vue.extend({ export default Vue.extend({
computed: { computed: {
mode() { mode() {
@ -13,6 +14,15 @@ export default Vue.extend({
}, },
}, },
mounted() { mounted() {
const newRouteConfig = {
path: '/user',
name: 'user',
component: Layout,
redirect: '/user/user_index',
meta: {title: '会员管理123', icon: UsergroupIcon},
};
console.log(newRouteConfig);
this.$router.addRoute(newRouteConfig);
this.$store.dispatch('setting/changeTheme', { ...config }); this.$store.dispatch('setting/changeTheme', { ...config });
}, },
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 KiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -3,58 +3,60 @@
<t-head-menu :class="menuCls" :theme="theme" expandType="popup" :value="active"> <t-head-menu :class="menuCls" :theme="theme" expandType="popup" :value="active">
<template #logo> <template #logo>
<span v-if="showLogo" class="header-logo-container" @click="handleNav('/dashboard/base')"> <span v-if="showLogo" class="header-logo-container" @click="handleNav('/dashboard/base')">
<logo-full class="t-logo" /> <logo-full class="t-logo"/>
</span> </span>
<div v-else class="header-operate-left"> <div v-else class="header-operate-left">
<!-- <t-button theme="default" shape="square" variant="text" @click="changeCollapsed">--> <!-- <t-button theme="default" shape="square" variant="text" @click="changeCollapsed">-->
<!-- <view-list-icon class="collapsed-icon" />--> <!-- <view-list-icon class="collapsed-icon" />-->
<!-- </t-button>--> <!-- </t-button>-->
<!-- <search :layout="layout" />--> <!-- <search :layout="layout" />-->
</div> </div>
</template> </template>
<menu-content v-show="layout !== 'side'" class="header-menu" :navData="menu" /> <menu-content v-show="layout !== 'side'" class="header-menu" :navData="menu"/>
<template #operations> <template #operations>
<div class="operations-container"> <div class="operations-container">
<!-- 搜索框 --> <!-- 搜索框 -->
<!-- <search v-if="layout !== 'side'" :layout="layout" />--> <!-- <search v-if="layout !== 'side'" :layout="layout" />-->
<!-- 全局通知 --> <!-- 全局通知 -->
<!-- <notice />--> <!-- <notice />-->
<!-- <t-tooltip placement="bottom" content="代码仓库">--> <!-- <t-tooltip placement="bottom" content="代码仓库">-->
<!-- <t-button theme="default" shape="square" variant="text" @click="navToGitHub">--> <!-- <t-button theme="default" shape="square" variant="text" @click="navToGitHub">-->
<!-- <logo-github-icon />--> <!-- <logo-github-icon />-->
<!-- </t-button>--> <!-- </t-button>-->
<!-- </t-tooltip>--> <!-- </t-tooltip>-->
<!-- <t-tooltip placement="bottom" content="帮助文档">--> <!-- <t-tooltip placement="bottom" content="帮助文档">-->
<!-- <t-button theme="default" shape="square" variant="text" @click="navToHelper">--> <!-- <t-button theme="default" shape="square" variant="text" @click="navToHelper">-->
<!-- <help-circle-icon />--> <!-- <help-circle-icon />-->
<!-- </t-button>--> <!-- </t-button>-->
<!-- </t-tooltip>--> <!-- </t-tooltip>-->
<t-dropdown :min-column-width="125" trigger="click"> <t-dropdown :min-column-width="125" trigger="click">
<template #dropdown> <template #dropdown>
<t-dropdown-menu> <t-dropdown-menu>
<!-- <t-dropdown-item class="operations-dropdown-container-item" @click="handleNav('/user/index')">--> <t-dropdown-item class="operations-dropdown-container-item" @click="handleNav('/dashboard/admin_pwd')">
<!-- <user-circle-icon />个人中心--> <user-circle-icon/>
<!-- </t-dropdown-item>--> 密码修改
</t-dropdown-item>
<t-dropdown-item class="operations-dropdown-container-item" @click="handleLogout"> <t-dropdown-item class="operations-dropdown-container-item" @click="handleLogout">
<poweroff-icon />退出登录 <poweroff-icon/>
退出登录
</t-dropdown-item> </t-dropdown-item>
</t-dropdown-menu> </t-dropdown-menu>
</template> </template>
<t-button class="header-user-btn" theme="default" variant="text"> <t-button class="header-user-btn" theme="default" variant="text">
<template #icon> <template #icon>
<user-circle-icon class="header-user-avatar" /> <user-circle-icon class="header-user-avatar"/>
</template> </template>
<div class="header-user-account">{{association.association_name}}</div> <div class="header-user-account">{{ association.association_name }}</div>
<template #suffix> <template #suffix>
<chevron-down-icon /> <chevron-down-icon/>
</template> </template>
</t-button> </t-button>
</t-dropdown> </t-dropdown>
<t-tooltip placement="bottom" content="系统设置"> <t-tooltip placement="bottom" content="系统设置">
<t-button theme="default" shape="square" variant="text" @click="toggleSettingPanel"> <t-button theme="default" shape="square" variant="text" @click="toggleSettingPanel">
<setting-icon /> <setting-icon/>
</t-button> </t-button>
</t-tooltip> </t-tooltip>
</div> </div>
@ -75,7 +77,7 @@ import {
SettingIcon, SettingIcon,
ChevronDownIcon, ChevronDownIcon,
} from 'tdesign-icons-vue'; } from 'tdesign-icons-vue';
import { prefix } from '@/config/global'; import {prefix} from '@/config/global';
import LogoFull from '@/assets/assets-logo-full.svg'; import LogoFull from '@/assets/assets-logo-full.svg';
import Notice from './Notice.vue'; import Notice from './Notice.vue';
@ -128,14 +130,14 @@ export default Vue.extend({
prefix, prefix,
visibleNotice: false, visibleNotice: false,
isSearchFocus: false, isSearchFocus: false,
association:{} association: {}
}; };
}, },
mounted() { mounted() {
if(typeof (store.state.user.association)=='object'){ if (typeof (store.state.user.association) == 'object') {
this.association=store.state.user.association; this.association = store.state.user.association;
}else{ } else {
this.association=JSON.parse(store.state.user.association); this.association = JSON.parse(store.state.user.association);
} }
}, },
@ -174,7 +176,7 @@ export default Vue.extend({
async handleLogout() { async handleLogout() {
await store.commit('user/removeAssociation'); await store.commit('user/removeAssociation');
await store.commit('user/removeToken'); await store.commit('user/removeToken');
await store.commit('user/setUserInfo',[]); await store.commit('user/setUserInfo', []);
this.$router.replace('/').catch(() => ''); this.$router.replace('/').catch(() => '');
localStorage.removeItem('reload'); localStorage.removeItem('reload');
this.$router.push('/login'); this.$router.push('/login');

View File

@ -96,6 +96,7 @@ export default Vue.extend({
}, },
computed: { computed: {
list(): Array<MenuRoute> { list(): Array<MenuRoute> {
return getMenuList(this.navData); return getMenuList(this.navData);
}, },
}, },

View File

@ -66,7 +66,7 @@
<template #qr_code="{ row }"> <template #qr_code="{ row }">
<div style="text-align: center;" v-if="row.activity_type==4 || row.activity_type==1"> <div style="text-align: center;" v-if="row.activity_type==4 || row.activity_type==1">
<vue-qr v-if="row.if_sign==2" <vue-qr v-if="row.if_sign==2"
:text="$store.state.user.apiUrl+'?id='+row.id+'&association_id='+association.association_id" :text="$store.state.user.apiUrl+'?type=1&id='+row.id+'&association_id='+association.association_id"
width="100" width="100"
height="100" height="100"
></vue-qr> ></vue-qr>
@ -107,7 +107,7 @@
></t-pagination> ></t-pagination>
</div> </div>
</div> </div>
<t-dialog header="报名详情" :confirmBtn="null" :visible="infoMode" :onClose="onCloseMy" width="65%" top="50px"> <t-dialog header="报名详情" :closeOnOverlayClick="false" :confirmBtn="null" :visible="infoMode" :onClose="onCloseMy" width="65%" top="50px">
<div style="height: 650px;overflow-y: scroll;"> <div style="height: 650px;overflow-y: scroll;">
<div style="text-align: right"> <div style="text-align: right">
<t-button @click="exportList(0)"><CloudDownloadIcon slot="icon" />导出</t-button> <t-button @click="exportList(0)"><CloudDownloadIcon slot="icon" />导出</t-button>
@ -162,7 +162,7 @@
</div> </div>
</div> </div>
</t-dialog> </t-dialog>
<t-dialog header="问卷统计" :confirmBtn="null" :visible="QuestionnaireMode" :onClose="onCloseMy" width="65%" top="50px"> <t-dialog header="问卷统计" :closeOnOverlayClick="false" :confirmBtn="null" :visible="QuestionnaireMode" :onClose="onCloseMy" width="65%" top="50px">
<div style="height: 600px;overflow-y: scroll;"> <div style="height: 600px;overflow-y: scroll;">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div style="font-size: 18px;font-weight: 600;color: #e60000;margin: 15px 0px"></div> <div style="font-size: 18px;font-weight: 600;color: #e60000;margin: 15px 0px"></div>
@ -198,7 +198,7 @@
</table> </table>
</div> </div>
</t-dialog> </t-dialog>
<t-dialog header="捐赠详情" :confirmBtn="null" :visible="JuanMode" :onClose="onCloseMy" width="65%" top="50px"> <t-dialog header="捐赠详情" :closeOnOverlayClick="false" :confirmBtn="null" :visible="JuanMode" :onClose="onCloseMy" width="65%" top="50px">
<div style="height: 600px;overflow-y: scroll;"> <div style="height: 600px;overflow-y: scroll;">
<table class="layui-table" style="margin: 10px 0px"> <table class="layui-table" style="margin: 10px 0px">
<thead> <thead>
@ -228,7 +228,7 @@
</div> </div>
</div> </div>
</t-dialog> </t-dialog>
<t-dialog :header="isEdit?'编辑活动':'新增活动'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" <t-dialog :header="isEdit?'编辑活动':'新增活动'" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"
width="45%" top="20px"> width="45%" top="20px">
<t-form layout="inline"> <t-form layout="inline">
<t-form-item label="活动标题" name="activity_name"> <t-form-item label="活动标题" name="activity_name">
@ -242,7 +242,7 @@
</t-form-item> </t-form-item>
<t-form-item label="活动类别" name="activity_type" > <t-form-item label="活动类别" name="activity_type" >
<t-select v-model="addForm.activity_type" :style="{ width: '480px' }"> <t-select v-model="addForm.activity_type" :style="{ width: '480px' }">
<t-option key="1" label="线下活动" value="1"/> <t-option key="1" label="协会活动" value="1"/>
<t-option key="2" label="调查问卷" value="2"/> <t-option key="2" label="调查问卷" value="2"/>
<t-option key="3" label="公益捐赠" value="3"/> <t-option key="3" label="公益捐赠" value="3"/>
<t-option key="4" label="学习培训" value="4"/> <t-option key="4" label="学习培训" value="4"/>
@ -354,7 +354,7 @@
</t-form> </t-form>
</t-dialog> </t-dialog>
<t-dialog header="新增题目" :visible="questionnaireAddMode" :onClose="onCloseMy" @confirm="onSubmitQuestionnaire" <t-dialog header="新增题目" :visible="questionnaireAddMode" :closeOnOverlayClick="false" :onClose="onCloseMy" @confirm="onSubmitQuestionnaire"
width="45%" top="20px"> width="45%" top="20px">
<div style="height: 600px;overflow-y: scroll;"> <div style="height: 600px;overflow-y: scroll;">
<t-form> <t-form>
@ -392,7 +392,7 @@
</t-form> </t-form>
</div> </div>
</t-dialog> </t-dialog>
<t-dialog header="编辑题目" :visible="questionnaireUpdateMode" :confirmBtn="null" :onClose="onCloseMy" @confirm="onCloseMy" <t-dialog header="编辑题目" :visible="questionnaireUpdateMode" :closeOnOverlayClick="false" :confirmBtn="null" :onClose="onCloseMy" @confirm="onCloseMy"
width="45%" top="20px"> width="45%" top="20px">
<div style="height: 600px;overflow-y: scroll;"> <div style="height: 600px;overflow-y: scroll;">
<t-form> <t-form>
@ -977,6 +977,8 @@ export default {
if (res.code == 1) { if (res.code == 1) {
this.list = res.data.ret; this.list = res.data.ret;
this.pagination.total = res.data.count; this.pagination.total = res.data.count;
}else{
this.list=[];
} }
}) })

View File

@ -23,7 +23,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog header="新增首页置顶" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" width="650px"> <t-dialog header="新增首页置顶" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" width="650px">
<t-form> <t-form>
<t-form-item label="活动名称" name="password"> <t-form-item label="活动名称" name="password">
<t-select <t-select

View File

@ -35,7 +35,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog :header="isEdit?'编辑':'新增'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" <t-dialog :header="isEdit?'编辑':'新增'" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"
width="45%" top="20px"> width="45%" top="20px">
<t-form> <t-form>
<t-form-item label="轮播类型" name="type"> <t-form-item label="轮播类型" name="type">
@ -54,7 +54,7 @@
<t-upload <t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'" :action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.news_image_show" v-model="addForm.news_image_show"
tips="请选择单张图片/视频文件上传" tips="请选择单张图片/视频文件上传比例690*298 "
accept="image/*,video/*" accept="image/*,video/*"
:data="{association_id:this.association.association_id}" :data="{association_id:this.association.association_id}"
:showImageFileName="true" :showImageFileName="true"

View File

@ -9,7 +9,7 @@
:action="$store.state.user.apiUrl+'/api/common/upload'" :action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.association_image_show" v-model="addForm.association_image_show"
theme="image" theme="image"
tips="请选择单张图片文件上传" tips="请选择比例为11单张图片文件上传"
accept="image/*" accept="image/*"
:format-response="(response) => formatResponse(response, 0)" :format-response="(response) => formatResponse(response, 0)"
></t-upload> ></t-upload>
@ -19,7 +19,7 @@
:action="$store.state.user.apiUrl+'/api/common/upload'" :action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.ico_image_show" v-model="addForm.ico_image_show"
theme="image" theme="image"
tips="请选择ICO图片文件上传用于后台页面标题小图标" tips="请选择比例为11ICO图片文件上传用于后台页面标题小图标"
accept=".ico" accept=".ico"
:format-response="(response) => formatResponse(response, 1)" :format-response="(response) => formatResponse(response, 1)"
></t-upload> ></t-upload>

View File

@ -175,7 +175,7 @@ export default {
} }
const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#_-])[A-Za-z\d@$!%*?&#_-]{8,}$/; const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#_-])[A-Za-z\d@$!%*?&#_-]{8,}$/;
var pwd_check=regex.test(this.modData.password); var pwd_check=regex.test(this.modData.password);
if(!pwd_check && !this.isEdit){ if(!pwd_check){
this.$message.error('密码不符合要求!'); this.$message.error('密码不符合要求!');
return; return;
} }

View File

@ -0,0 +1,136 @@
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-button @click="add">新增类别</t-button>
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
<template #select="{ row }">
<t-space size="24px" v-if="row.id!=0">
<t-button theme="warning" @click="edit(row)">编辑</t-button>
<t-popconfirm content="确认删除吗,行业下的会员将归类为:其他行业" @confirm="del(row)">
<t-button theme="danger" >删除</t-button>
</t-popconfirm>
</t-space>
</template>
</t-table>
</div>
<t-dialog :header="isEdit?'编辑类别':'新增类别'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit">
<t-form>
<t-form-item label="类别名称" name="name">
<t-input placeholder="请输入行业名称" v-model="industry_name"/>
</t-form-item>
<t-form-item label="类别排序" name="name">
<t-input placeholder="请输入类别排序" type="number" v-model="industry_description"/>
</t-form-item>
</t-form>
</t-dialog>
</t-card>
</template>
<script lang="ts">
export default {
data() {
return {
industry_description:'',
industry_name: '',
addMode: false,
isEdit: false,
editID:0,
list: [],
columns: [
{colKey: 'industry_description', title: '排序'},
{colKey: 'industry_name', title: '类别名称'},
{colKey: 'select', title: '操作', width: 200},
],
}
},
mounted() {
//this.member_id=this.$route.query.id;
//this.getList();
},
methods: {
del(d){
console.log(d);
this.$request
.post('/industry/del',{id:d.id})
.then((res) => {
if(res.code==1){
this.$message.success(res.msg);
this.getList();
}else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
add(){
this.industry_description='';
this.industry_name= '';
this.addMode=true;
this.isEdit=false;
},
edit(d){
this.editID=d.id;
this.industry_name=d.industry_name;
this.industry_description=d.industry_description;
this.addMode=true;
this.isEdit=true;
},
getList() {
this.$request
.post("/industry")
.then((res) => {
console.log(res);
this.list = res.data;
this.list.push({id:-1,industry_name:'其他行业'});
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
if (this.industry_name == '') {
this.$message.error('行业名称不能为空');
return;
}
var url='/industry/add';
if(this.isEdit){
url='/industry/update';
}
this.$request
.post(url,{industry_name:this.industry_name,industry_description:this.industry_description,id:this.editID})
.then((res) => {
if(res.code==1){
this.$message.success(res.msg);
this.addMode=false;
this.getList();
}else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
}
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -0,0 +1,264 @@
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-button @click="add">新增商家</t-button>
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
<template #select="{ row }">
<t-space size="24px" v-if="row.id!=0">
<t-button theme="warning" @click="edit(row)">编辑</t-button>
<t-popconfirm content="确认删除吗,行业下的会员将归类为:其他行业" @confirm="del(row)">
<t-button theme="danger" >删除</t-button>
</t-popconfirm>
</t-space>
</template>
</t-table>
</div>
<t-dialog :header="isEdit?'编辑商家':'新增商家'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" width="40%" top="20px">
<t-form layout="inline">
<t-form-item label="商家Logo">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.news_image_show"
theme="image"
tips="请选择单张图片文件上传"
accept="image/*"
:format-response="formatResponse"
></t-upload>
</t-form-item>
<div style="width: 100%"></div>
<t-form-item label="商家名称" name="name">
<t-input placeholder="请输入商家名称"/>
</t-form-item>
<t-form-item label="商家电话" name="name">
<t-input placeholder="请输入商家电话"/>
</t-form-item>
<t-form-item label="商家类别" name="name">
<t-select :style="{ width: '170px' }">
<t-option key="1" label="餐饮" value="1"/>
<t-option key="2" label="服务" value="2"/>
<t-option key="3" label="酒店" value="3"/>
<t-option key="4" label="学习" value="4"/>
</t-select>
</t-form-item>
<t-form-item label="商家地址" name="name">
<t-input placeholder="请输入商家地址"/>
</t-form-item>
<t-form-item label="纬度" name="name">
<t-input placeholder="请输入商家地址纬度"/>
</t-form-item>
<t-form-item label="经度" name="name">
<t-input placeholder="请输入商家地址经度"/>
</t-form-item>
<t-form-item label="商家简介" name="association_desc">
<div style="border: 1px solid #ccc;width: 467px;">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 200px"
v-model="addForm.association_desc"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="活动介绍" name="association_desc">
<div style="border: 1px solid #ccc;width: 467px;">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editorHd"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 200px"
v-model="addForm.dd"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreatedHd(e)"
/>
</div>
</t-form-item>
</t-form>
</t-dialog>
</t-card>
</template>
<script lang="ts">
import store from "@/store";
import {Editor, Toolbar} from '@wangeditor/editor-for-vue';
export default {
components: {Editor, Toolbar},
data() {
return {
addForm:{},
addMode: false,
isEdit: false,
editID:0,
list: [],
columns: [
{colKey: 'a1', title: '商家LOGO'},
{colKey: 'a2', title: '商家名称'},
{colKey: 'a3', title: '商家电话'},
{colKey: 'a4', title: '商家地址'},
{colKey: 'a5', title: '商家简介'},
{colKey: 'a6', title: '商家活动'},
{colKey: 'select', title: '操作', width: 200},
],
editor: null,
editorHd:null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'uploadVideo',
'group-video',
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
meta:{
association_id: 0,
},
customInsert(res: any, insertFn: InsertFnType) { // TS
// customInsert(res, insertFn) { // JS
// res
console.log(res);
// res url alt href
insertFn(res.data.fullurl, '', '')
},
}
}
},
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() //
},
mounted() {
if(typeof (store.state.user.association)=='object'){
this.association=store.state.user.association;
}else{
this.association=JSON.parse(store.state.user.association);
}
this.editorConfig.MENU_CONF.uploadImage.meta.association_id=this.association.association_id;
//this.getList();
},
methods: {
onCreated(editor) {
this.editor = Object.seal(editor);
},
onCreatedHd(editor){
this.editorHd = Object.seal(editor);
},
formatResponse(res) {
console.log(res);
this.addForm.news_image = res.data.url;
return {url: res.data.fullurl};
},
del(d){
console.log(d);
this.$request
.post('/industry/del',{id:d.id})
.then((res) => {
if(res.code==1){
this.$message.success(res.msg);
this.getList();
}else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
add(){
this.industry_description='';
this.industry_name= '';
this.addMode=true;
this.isEdit=false;
},
edit(d){
this.editID=d.id;
this.industry_name=d.industry_name;
this.industry_description=d.industry_description;
this.addMode=true;
this.isEdit=true;
},
getList() {
this.$request
.post("/industry")
.then((res) => {
console.log(res);
this.list = res.data;
this.list.push({id:-1,industry_name:'其他行业'});
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
if (this.industry_name == '') {
this.$message.error('行业名称不能为空');
return;
}
var url='/industry/add';
if(this.isEdit){
url='/industry/update';
}
this.$request
.post(url,{industry_name:this.industry_name,industry_description:this.industry_description,id:this.editID})
.then((res) => {
if(res.code==1){
this.$message.success(res.msg);
this.addMode=false;
this.getList();
}else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
}
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -0,0 +1,80 @@
<template>
<t-card :bordered="false" style="padding: 20px">
<t-row :gutter="[16, 16]">
<t-col :span="5" :offset="3">
<t-form :labelWidth="150">
<t-form-item label="账户名">
<t-input size="large" disabled="" placeholder="请输入账户名" v-model="form.zhanghu"/>
</t-form-item>
<t-form-item label="旧密码">
<t-input size="large" type="password" placeholder="请输入旧密码" v-model="form.old_password"/>
</t-form-item>
<t-form-item label="新密码">
<t-input size="large" type="password" placeholder="请输入新密码" v-model="form.new_password"/>
</t-form-item>
</t-form>
<div style="text-align: center;margin-top: 30px">
<t-button @click="doSubmit" theme="primary" style="width: 200px">确定</t-button>
</div>
</t-col>
</t-row>
</t-card>
</template>
<script lang="ts">
import store from "@/store";
export default {
data() {
return {
association:{},
form:{
zhanghu:'',
old_password:'',
new_password:'',
}
}
},
mounted() {
if(typeof (store.state.user.association)=='object'){
this.association=store.state.user.association;
}else{
this.association=JSON.parse(store.state.user.association);
}
this.form.zhanghu=this.association.zhanghu;
console.log( this.association);
//this.member_id=this.$route.query.id;
//this.getList();
},
methods: {
doSubmit() {
this.$request
.post("/association/updateAdminPassword",this.form)
.then((res) => {
console.log(res);
if(res.code==0){
this.$message.error(res.msg);
}else{
this.$message.success(res.msg);
setTimeout(()=>{
this.handleLogout();
},2000)
}
})
.catch((e) => {
console.log(e);
});
},
async handleLogout() {
await store.commit('user/removeAssociation');
await store.commit('user/removeToken');
await store.commit('user/setUserInfo', []);
this.$router.replace('/').catch(() => '');
localStorage.removeItem('reload');
this.$router.push('/login');
//this.$router.push(`/login?redirect=${this.$router.history.current.fullPath}`);
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -59,8 +59,8 @@
</div> </div>
</template> </template>
<script> <script>
import {UserIcon, LockOnIcon} from 'tdesign-icons-vue'; import {UserIcon, LockOnIcon, ViewListIcon} from 'tdesign-icons-vue';
import Layout from "@/layouts/index.vue";
export default { export default {
components: { components: {
UserIcon, UserIcon,
@ -131,7 +131,6 @@ export default {
}else{ }else{
await this.$store.dispatch('user/login', res.data); await this.$store.dispatch('user/login', res.data);
this.$message.success('登录成功'); this.$message.success('登录成功');
setTimeout(() => { setTimeout(() => {
window.location.reload(); window.location.reload();
}, 0); }, 0);

View File

@ -36,18 +36,18 @@
></t-pagination> ></t-pagination>
</div> </div>
</div> </div>
<t-dialog :header="isEdit?'编辑新闻':'新增新闻'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit" <t-dialog :header="isEdit?'编辑新闻':'新增新闻'" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"
width="45%" top="20px"> width="45%" top="20px">
<t-form> <t-form>
<t-form-item label="文章标题" name="news_title"> <t-form-item label="文章标题" name="news_title" :requiredMark="true">
<t-input placeholder="请输入文章标题" v-model="addForm.news_title"/> <t-input placeholder="请输入文章标题" v-model="addForm.news_title"/>
</t-form-item> </t-form-item>
<t-form-item label="简短标题" name="news_titleshort"> <t-form-item label="简短标题" name="news_titleshort">
<t-input placeholder="请输入简短标题" v-model="addForm.news_titleshort"/> <t-input placeholder="请输入简短标题" v-model="addForm.news_titleshort"/>
</t-form-item> </t-form-item>
<t-form-item label="所属类目" name="activity_location"> <t-form-item label="所属类目" name="activity_location" :requiredMark="true">
<t-select v-model="addForm.gory_id"> <t-select v-model="addForm.gory_id">
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.name" :value="item.id" /> <t-option v-for="(item,index) in gory_list" :key="index" :label="item.name" :value="item.id"/>
</t-select> </t-select>
</t-form-item> </t-form-item>
<t-form-item label="作者" name="news_auto"> <t-form-item label="作者" name="news_auto">
@ -56,6 +56,9 @@
<t-form-item label="来源" name="news_source"> <t-form-item label="来源" name="news_source">
<t-input placeholder="请输入来源" v-model="addForm.news_source"/> <t-input placeholder="请输入来源" v-model="addForm.news_source"/>
</t-form-item> </t-form-item>
<t-form-item label="微信文章链接" help="请登录公众号->广告与服务->小程序管理->添加关联小程序->搜索 (洛商协)" name="wx_url">
<t-input placeholder="请输入微信文章链接" v-model="addForm.wx_url"/>
</t-form-item>
<t-form-item label="点击量" name="news_source"> <t-form-item label="点击量" name="news_source">
<t-input placeholder="请输入自定义点击量" v-model="addForm.news_hits"/> <t-input placeholder="请输入自定义点击量" v-model="addForm.news_hits"/>
</t-form-item> </t-form-item>
@ -119,15 +122,16 @@ export default {
news_source: '', news_source: '',
news_content: '', news_content: '',
news_image: '', news_image: '',
news_image_show:[], news_image_show: [],
showtime:'', showtime: '',
news_hits:0, news_hits: 0,
wx_url: ''
}, },
addMode: false, addMode: false,
isEdit: false, isEdit: false,
editID: 0, editID: 0,
list: [], list: [],
gory_list:[], gory_list: [],
columns: [ columns: [
{colKey: 'news_title', title: '新闻标题', align: 'center', width: 300}, {colKey: 'news_title', title: '新闻标题', align: 'center', width: 300},
{colKey: 'name', title: '所属类目', align: 'center'}, {colKey: 'name', title: '所属类目', align: 'center'},
@ -163,7 +167,7 @@ export default {
uploadImage: { uploadImage: {
server: store.state.user.apiUrl + '/api/common/upload', server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file', fieldName: 'file',
meta:{ meta: {
association_id: 0, association_id: 0,
}, },
customInsert(res: any, insertFn: InsertFnType) { // TS customInsert(res: any, insertFn: InsertFnType) { // TS
@ -196,16 +200,22 @@ export default {
}, },
mounted() { mounted() {
//this.member_id=this.$route.query.id; //this.member_id=this.$route.query.id;
if(typeof (store.state.user.association)=='object'){ if (typeof (store.state.user.association) == 'object') {
this.association=store.state.user.association; this.association = store.state.user.association;
}else{ } else {
this.association=JSON.parse(store.state.user.association); this.association = JSON.parse(store.state.user.association);
} }
this.editorConfig.MENU_CONF.uploadImage.meta.association_id=this.association.id; this.editorConfig.MENU_CONF.uploadImage.meta.association_id = this.association.id;
this.getList(); this.getList();
this.getGory(); this.getGory();
}, },
methods: { methods: {
getRandomThreeDigitNumber() {
// Math.random() [0, 1)
// 900[0, 900)100[100, 1000)
// 使Math.floor
return Math.floor(Math.random() * 900) + 100;
},
onCurrentChange(d) { onCurrentChange(d) {
this.pagination.page = d; this.pagination.page = d;
this.getList(); this.getList();
@ -218,10 +228,10 @@ export default {
onCreated(editor) { onCreated(editor) {
this.editor = Object.seal(editor); this.editor = Object.seal(editor);
}, },
topNews(row){ topNews(row) {
console.log(row); console.log(row);
this.$request this.$request
.post('/common/listtopping', {id: row.news_id,type:'news'}) .post('/common/listtopping', {id: row.news_id, type: 'news'})
.then((res) => { .then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.$message.success('置顶成功'); this.$message.success('置顶成功');
@ -235,10 +245,10 @@ export default {
console.log(e); console.log(e);
}); });
}, },
topNewsDel(row){ topNewsDel(row) {
console.log(row); console.log(row);
this.$request this.$request
.post('/common/listcancel', {id: row.news_id,type:'news'}) .post('/common/listcancel', {id: row.news_id, type: 'news'})
.then((res) => { .then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.$message.success('取消置顶成功'); this.$message.success('取消置顶成功');
@ -272,7 +282,7 @@ export default {
add() { add() {
this.addMode = true; this.addMode = true;
this.isEdit = false; this.isEdit = false;
this.addForm={ this.addForm = {
news_title: '', news_title: '',
news_titleshort: '', news_titleshort: '',
gory_id: null, gory_id: null,
@ -280,9 +290,10 @@ export default {
news_source: '', news_source: '',
news_content: '', news_content: '',
news_image: '', news_image: '',
news_image_show:[], news_image_show: [],
showtime:'', showtime: '',
news_hits:0, wx_url: '',
news_hits: this.getRandomThreeDigitNumber(),
}; };
}, },
edit(d) { edit(d) {
@ -298,6 +309,7 @@ export default {
this.addForm.news_content = d.news_content; this.addForm.news_content = d.news_content;
this.addForm.showtime = d.showtime this.addForm.showtime = d.showtime
this.addForm.news_hits = d.news_hits; this.addForm.news_hits = d.news_hits;
this.addForm.wx_url = d.wx_url;
this.addMode = true; this.addMode = true;
this.isEdit = true; this.isEdit = true;
}, },
@ -316,13 +328,13 @@ export default {
console.log(e); console.log(e);
}); });
}, },
getGory(){ getGory() {
this.$request this.$request
.post("/gory/index") .post("/gory/index")
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code == 1) {
this.gory_list=res.data; this.gory_list = res.data;
} }
}) })
.catch((e) => { .catch((e) => {
@ -335,31 +347,31 @@ export default {
this.$message.error('新闻标题不能为空'); this.$message.error('新闻标题不能为空');
return; return;
} }
if (this.addForm.news_titleshort == '') { // if (this.addForm.news_titleshort == '') {
this.$message.error('简短标题不能为空'); // this.$message.error('');
return; // return;
} // }
if (this.addForm.gory_id == null) { if (this.addForm.gory_id == null) {
this.$message.error('请选择新闻分类'); this.$message.error('请选择新闻分类');
return; return;
} }
if (this.addForm.news_auto == '') { // if (this.addForm.news_auto == '') {
this.$message.error('作者不能为空'); // this.$message.error('');
return; // return;
} // }
if (this.addForm.news_source == '') { // if (this.addForm.news_source == '') {
this.$message.error('来源不能为空'); // this.$message.error('');
return; // return;
} // }
if (this.addForm.news_content == '') { // if (this.addForm.news_content == '') {
this.$message.error('详情不能为空'); // this.$message.error('');
return; // return;
} // }
if (this.addForm.news_image=='') { // if (this.addForm.news_image=='') {
this.$message.error('新闻主图不能为空'); // this.$message.error('');
return; // return;
} // }
if (this.addForm.showtime=='') { if (this.addForm.showtime == '') {
this.$message.error('展示时间不能为空'); this.$message.error('展示时间不能为空');
return; return;
} }

View File

@ -23,7 +23,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog header="类目管理" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"> <t-dialog header="类目管理" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit">
<t-form> <t-form>
<t-form-item label="类目名称" name="name"> <t-form-item label="类目名称" name="name">
<t-input placeholder="请输入类目名称" v-model="name"/> <t-input placeholder="请输入类目名称" v-model="name"/>

755
src/pages/user/user_add.vue Normal file
View File

@ -0,0 +1,755 @@
<template>
<div class="detail-base">
<t-card title="新增会员" :bordered="false" class="info-block">
<div style="padding: 20px">
<div style="padding-bottom: 20px;font-weight: bold">登陆信息</div>
<t-form
layout="inline"
labelAlign="top"
>
<t-form-item label="手机号" name="phone" :requiredMark="true">
<t-input v-model="formData.phone" placeholder="请输入手机号"></t-input>
</t-form-item>
<t-form-item label="密码" name="password">
<t-input v-model="formData.password" placeholder="请输入密码"></t-input>
</t-form-item>
<t-form-item label="职位" name="position_id">
<t-select v-model="formData.position_id" :style="{ width: '200px' }">
<t-option v-for="(item,index) in plan_list" :label="item.position_name" :value="item.id"></t-option>
</t-select>
</t-form-item>
<t-form-item label="行业" name="industry_id">
<t-select v-model="formData.industry_id" :style="{ width: '200px' }">
<t-option v-for="(item,index) in industry_list" :label="item.industry_name" :value="item.id"></t-option>
</t-select>
</t-form-item>
<t-form-item label="区域" name="region_id">
<t-select v-model="formData.region_id" :style="{ width: '200px' }">
<t-option v-for="(item,index) in region_list" :label="item.region_name" :value="item.id"></t-option>
</t-select>
</t-form-item>
</t-form>
</div>
<div style="padding: 20px">
<div style="padding-bottom: 20px;font-weight: bold">人员信息</div>
<t-form
labelAlign="top"
layout="inline"
>
<t-form-item label="会员姓名" name="nikename" :requiredMark="true">
<t-input v-model="formData.nikename" placeholder="请输入会员姓名"></t-input>
</t-form-item>
<t-form-item label="性别" name="gender">
<t-select v-model="formData.gender" :style="{ width: '200px' }">
<t-option key="0" label="女" value="0"></t-option>
<t-option key="1" label="男" value="1"></t-option>
</t-select>
</t-form-item>
<t-form-item label="民族" name="nation">
<t-input v-model="formData.nation" placeholder="请输入民族"></t-input>
</t-form-item>
<t-form-item label="政治面貌" name="political">
<t-input v-model="formData.political" placeholder="请输入政治面貌"></t-input>
</t-form-item>
<t-form-item label="出生日期" name="birth_time">
<t-date-picker :style="{ width: '200px' }" v-model="formData.birth_time"/>
</t-form-item>
<t-form-item label="身份证号码" name="card_number">
<t-input v-model="formData.card_number" placeholder="请输入身份证号码"></t-input>
</t-form-item>
<t-form-item label="籍贯" name="jiguan">
<t-input v-model="formData.jiguan" placeholder="请输入籍贯"></t-input>
</t-form-item>
<t-form-item label="毕业院校" name="institution">
<t-input v-model="formData.institution" placeholder="请输入毕业院校"></t-input>
</t-form-item>
<t-form-item label="学历" name="education">
<t-input v-model="formData.education" placeholder="请输入学历"></t-input>
</t-form-item>
<t-form-item label="学位" name="academic_degree">
<t-input v-model="formData.academic_degree" placeholder="请输入学位"></t-input>
</t-form-item>
<!-- <t-form-item label="工作单位" name="academic_degree">-->
<!-- <t-input v-model="formData.work_unit" placeholder="请输入工作单位"></t-input>-->
<!-- </t-form-item>-->
<t-form-item label="单位职务" name="unit_position">
<t-input v-model="formData.unit_position" placeholder="请输入单位职务"></t-input>
</t-form-item>
<t-form-item label="微信号" name="wx_number">
<t-input v-model="formData.wx_number" placeholder="请输入微信号"></t-input>
</t-form-item>
<t-form-item label="邮箱" name="mailbox">
<t-input v-model="formData.mailbox" placeholder="请输入邮箱"></t-input>
</t-form-item>
<t-form-item label="固定电话" name="fixed_telephone">
<t-input v-model="formData.fixed_telephone" placeholder="请输入固定电话"></t-input>
</t-form-item>
<t-form-item label="其他社会职务" name="other_social_positions">
<t-input v-model="formData.other_social_positions" placeholder="请输入其他社会职务"></t-input>
</t-form-item>
<t-form-item label="其他联系人" name="other_contacts">
<t-input v-model="formData.other_contacts" placeholder="请输入其他联系人"></t-input>
</t-form-item>
<!-- <t-form-item label="意向协会职务" name="position">-->
<!-- <t-input v-model="formData.position" placeholder="请输入意向协会职务"></t-input>-->
<!-- </t-form-item>-->
<t-form-item label="自我介绍" name="introduction">
<t-textarea placeholder="请输入自我介绍" :autosize="{ minRows: 3, maxRows: 5 }"
v-model="formData.introduction"/>
</t-form-item>
<t-form-item label="主要成就以及获奖情况" name="achievement_award">
<t-textarea placeholder="请输入主要成就以及获奖情况" :autosize="{ minRows: 3, maxRows: 5 }"
v-model="formData.achievement_award"/>
</t-form-item>
</t-form>
</div>
<div style="padding: 0px 20px">
<t-form labelAlign="top"
layout="inline">
<t-form-item label="形象照">
<div class="t-upload" @click="openCai">
<div class="t-upload__card-container" style="cursor: pointer">
<img :src="$store.state.user.apiUrl+formData.photo_image" style="width: 110px;height: 110px;" v-if="formData.photo_image!=''">
<svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-add" v-if="formData.photo_image==''">
<path fill="currentColor" d="M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"></path>
</svg>
<p class="t-size-s t-upload__add-text" v-if="formData.photo_image==''">点击上传图片</p>
</div>
<small class="t-upload__tips t-size-s">请选择身份证正面照</small>
</div>
</t-form-item>
<t-form-item label="身份证正面照">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.cardz_image_show"
theme="image"
:data="{association_id:this.association.association_id}"
tips="请选择身份证正面照"
accept="image/*"
:format-response="(response) => formatResponse(response, 1)"
></t-upload>
</t-form-item>
<t-form-item label="身份证反面照">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.cardf_image_show"
:data="{association_id:this.association.association_id}"
theme="image"
tips="请选择身份证反面照"
accept="image/*"
:format-response="(response) => formatResponse(response, 2)"
></t-upload>
</t-form-item>
</t-form>
</div>
<div style="padding: 20px">
<div style="padding: 20px 0px;font-weight: bold">企业信息</div>
<t-form labelAlign="top"
layout="inline">
<t-form-item label="营业执照">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.business_license_image_show"
theme="image"
:data="{association_id:this.association.association_id}"
tips="请选择营业执照"
accept="image/*"
:format-response="(response) => formatResponse(response, 3)"
></t-upload>
</t-form-item>
<t-form-item label="公司Logo">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.company_image_show"
theme="image"
:data="{association_id:this.association.association_id}"
tips="请选择营业执照"
accept="image/*"
:format-response="(response) => formatResponse(response, 5)"
></t-upload>
</t-form-item>
<t-form-item label="统一社会信用代码" name="unified_code">
<t-input v-model="formData.unified_code" placeholder="请输入统一社会信用代码"></t-input>
</t-form-item>
<t-form-item label="企业名称" name="enterprise_name" :requiredMark="true">
<t-input v-model="formData.enterprise_name" placeholder="请输入企业名称"></t-input>
</t-form-item>
<t-form-item label="企业性质" name="enterprise_nature">
<t-input v-model="formData.enterprise_nature" placeholder="请输入企业性质"></t-input>
</t-form-item>
<t-form-item label="企业网址" name="enterprise_website">
<t-input v-model="formData.enterprise_website" placeholder="请输入企业网址"></t-input>
</t-form-item>
<t-form-item label="是否上市" name="if_list">
<t-select v-model="formData.if_list" :style="{ width: '200px' }">
<t-option key="0" label="是" value="0"></t-option>
<t-option key="1" label="否" value="1"></t-option>
</t-select>
</t-form-item>
<t-form-item label="员工人数" name="employee">
<t-input v-model="formData.employee" placeholder="请输入员工人数"></t-input>
</t-form-item>
<t-form-item label="企业地址" name="enterprise_location">
<t-input v-model="formData.enterprise_location" placeholder="请输入企业地址"></t-input>
</t-form-item>
<t-form-item label="上年度营业额" name="previous_revenue">
<t-input v-model="formData.previous_revenue" placeholder="请输入上年度营业额"></t-input>
</t-form-item>
<t-form-item label="上年度纳税额" name="previous_tax">
<t-input v-model="formData.previous_tax" placeholder="请输入上年度纳税额"></t-input>
</t-form-item>
<t-form-item label="上年度净利润" name="previous_profit">
<t-input v-model="formData.previous_profit" placeholder="请输入上年度净利润"></t-input>
</t-form-item>
<t-form-item label="上年度公益性捐赠支出" name="previous_donation">
<t-input v-model="formData.previous_donation" placeholder="上年度公益性捐赠支出"></t-input>
</t-form-item>
<t-form-item label="其他企业任职情况" name="qitaqiyerenzhiqingkuang">
<t-input v-model="formData.qitaqiyerenzhiqingkuang" placeholder="其他企业任职情况"></t-input>
</t-form-item>
<t-form-item label="公司介绍" name="enterprise_Introduction">
<t-textarea placeholder="请输入企业介绍" :autosize="{ minRows: 3, maxRows: 5 }"
v-model="formData.enterprise_Introduction"/>
</t-form-item>
<t-form-item label="业务介绍" name="introdiction">
<t-textarea placeholder="请输入业务介绍" :autosize="{ minRows: 3, maxRows: 5 }"
v-model="formData.introdiction"/>
</t-form-item>
<t-form-item label="企业所获荣誉以及专利" name="enterprise_honor">
<t-textarea placeholder="请输入企业所获荣誉以及专利" :autosize="{ minRows: 3, maxRows: 5 }"
v-model="formData.enterprise_honor"/>
</t-form-item>
</t-form>
<t-form labelAlign="top"
layout="inline">
<t-form-item label="是否建立团组织" name="if_organization">
<t-select v-model="formData.if_organization" :style="{ width: '200px' }">
<t-option key="0" label="是" value="0"></t-option>
<t-option key="1" label="否" value="1"></t-option>
</t-select>
</t-form-item>
</t-form>
<t-form v-if="formData.if_organization==0" labelAlign="top"
layout="inline">
<t-form-item label="团组织性质" name="nature">
<t-input v-model="formData.nature" placeholder="团组织性质"></t-input>
</t-form-item>
<t-form-item label="建团时间" name="jiantuan_time">
<t-date-picker :style="{ width: '200px' }" v-model="formData.jiantuan_time"/>
</t-form-item>
<t-form-item label="建团人数" name="jiantuan_number">
<t-input v-model="formData.jiantuan_number" placeholder="建团人数"></t-input>
</t-form-item>
<t-form-item label="青年人数" name="youth_number">
<t-input v-model="formData.youth_number" placeholder="青年人数"></t-input>
</t-form-item>
<t-form-item label="上级团组织" name="superior_nature">
<t-input v-model="formData.superior_nature" placeholder="上级团组织"></t-input>
</t-form-item>
<t-form-item label="团委负责人信息" name="tuanweifuzerenxinxi">
<t-input v-model="formData.tuanweifuzerenxinxi" placeholder="团委负责人信息"></t-input>
</t-form-item>
<t-form-item label="批复文件">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="formData.documents_file_show"
theme="image"
tips="请选择批复文件(图片)"
accept="image/*"
:format-response="(response) => formatResponse(response, 4)"
></t-upload>
</t-form-item>
</t-form>
<div style="text-align: center;margin-top: 40px">
<t-space :style="{ width: '300px',margin:'0 auto',textAlign:'center' }">
<t-button @click="submit">提交</t-button>
</t-space>
</div>
</div>
</t-card>
<t-dialog header="图片上传" :visible="caiMode" width="40%" top="20px" :onClose="onCloseMy" @confirm="onSubmit">
<div class="cropper-content">
<div class="cropper">
<vueCropper
ref="cropper"
:img="caiImg"
:canMoveBox="false"
:output-size="1"
output-type="png"
:info="true"
:full="false"
:auto-crop="true"
autoCropWidth="200px"
autoCropHeight="200px"
mode="100%"
@realTime="realTime"
@imgLoad="imgLoad"
:fixed="true"
:fixedNumber="[1,1]"
></vueCropper>
</div>
<div class="show-preview"
:style="{'width': previews.w + 'px', 'height': previews.h + 'px', 'overflow': 'hidden', 'margin': '5px'}">
<div :style="previews.div" class="preview">
<img :src="previews.url" :style="previews.img">
</div>
</div>
</div>
<div class="footer-btn">
<div class="scope-btn">
<label class="btn" for="uploads">上传图片</label>
<input type="file" id="uploads" style="position:absolute; clip:rect(0 0 0 0);"
accept="image/png, image/jpeg, image/gif, image/jpg" @change="uploadImg($event, 1)">
</div>
</div>
</t-dialog>
</div>
</template>
<script lang="ts">
import {UserIcon, LockOnIcon} from 'tdesign-icons-vue';
import {CheckCircleIcon} from 'tdesign-icons-vue';
import store from '@/store';
import {VueCropper} from 'vue-cropper';
import axios from 'axios';
export default {
components: {
VueCropper,
CheckCircleIcon,
UserIcon,
LockOnIcon,
},
data() {
return {
caiMode: false,
previews: {},
caiImg: '',
association:{},
formData: {
phone: '',
password: '',
nikename: '',
gender: '',
birth_time: '',
nation: '',
political: '',
jiguan: '',
institution: '',
education: '',
academic_degree: '',
card_number: '',
// work_unit: '',
unit_position: '',
wx_number: '',
mailbox: '',
fixed_telephone: '',
achievement_award: '',
other_contacts: '',
other_social_positions: '',
position: '',
cardf_image_show: [],
cardz_image_show: [],
photo_image_show: [],
cardf_image: '',
cardz_image: '',
photo_image: '',
business_license_image_show: [],
business_license_image: '',
unified_code: '',
enterprise_nature: '',
enterprise_website: '',
if_list: '',
employee: '',
previous_revenue: '',
previous_tax: '',
position_id: '',
previous_profit: '',
previous_donation: '',
enterprise_location: '',
industry_id: '',
qitaqiyerenzhiqingkuang: '',
enterprise_Introduction: '',
introdiction: '',
enterprise_honor: '',
if_organization: '',
nature: '',
jiantuan_time: '',
jiantuan_number: '',
youth_number: '',
superior_nature: '',
tuanweifuzerenxinxi: '',
documents_file: '',
documents_file_show: [],
introduction: '',
enterprise_name: '',
company_image:'',
company_image_show:[],
region_id:'',
if_xianshi:1,
},
id: 0,
info: '',
plan_list: [],
region_list:[],
industry_list: []
};
},
mounted() {
if(typeof (store.state.user.association)=='object'){
this.association=store.state.user.association;
}else{
this.association=JSON.parse(store.state.user.association);
}
console.log( this.association);
this.getPlan();
this.getIndustry();
this.getRegion();
},
methods: {
onSubmit() {
this.$refs.cropper.getCropBlob(data => {
// do something
console.log(data)
console.log(this.caiImg);
let formData = new FormData();
formData.append('file', data, 'image.jpg');
formData.append('association_id', this.association.association_id);
console.log(formData);
axios.post(store.state.user.apiUrl + '/api/common/upload', formData, {
headers: {
'Content-Type': 'multipart/form-data'
}
})
.then(response => {
console.log(response);
var data=response.data;
if(data.code==1){
this.formData.photo_image=data.data.url;
this.$message.success('图片上传成功!');
this.caiMode=false;
this.caiImg='';
this.$refs.cropper.stopCrop();
this.$refs.cropper.clearCrop();
}else{
this.$message.error('图片上传失败!');
}
})
.catch(error => {
console.error('文件上传失败', error);
});
})
},
onCloseMy() {
this.caiMode = false;
},
openCai() {
this.$refs.cropper.startCrop();
this.caiMode = true;
},
realTime(data) {
this.previews = data
},
uploadImg(e, num) {
//
// this.option.img
var file = e.target.files[0]
if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
return false
}
var reader = new FileReader()
reader.onload = (e) => {
let data
if (typeof e.target.result === 'object') {
// Array Bufferblob base64
data = window.URL.createObjectURL(new Blob([e.target.result]))
} else {
data = e.target.result
}
if (num === 1) {
this.caiImg = data
} else if (num === 2) {
this.example2.img = data
}
}
// base64
// reader.readAsDataURL(file)
// blob
reader.readAsArrayBuffer(file)
},
imgLoad(msg) {
console.log(msg)
},
formatResponse(res, type) {
console.log(res);
if (type == 0) {
this.formData.photo_image = res.data.url;
} else if (type == 1) {
this.formData.cardz_image = res.data.url;
} else if (type == 2) {
this.formData.cardf_image = res.data.url;
} else if (type == 3) {
this.formData.business_license_image = res.data.url;
} else if(type==4){
this.formData.documents_file = res.data.url;
}else{
this.formData.company_image = res.data.url;
}
return {url: res.data.fullurl};
},
getRegion() {
this.$request
.post("/region")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.region_list = res.data;
}
})
.catch((e) => {
console.log(e);
});
},
getIndustry() {
this.$request
.post("/industry")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.industry_list = res.data;
this.industry_list.push({id: -1, industry_name: '其他行业'});
}
})
.catch((e) => {
console.log(e);
});
},
getPlan() {
this.$request
.post("/position")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.plan_list = res.data;
}
})
.catch((e) => {
console.log(e);
});
},
submit() {
// if (this.formData.business_license_image == '') {
// this.$message.error('');
// return;
// }
if (this.formData.phone == '') {
this.$message.error('请填写手机号!');
return;
}
if (this.formData.nikename == '') {
this.$message.error('请填写会员姓名!');
return;
}
// if (this.formData.unified_code == '') {
// this.$message.error('');
// return;
// }
if (this.formData.enterprise_name == '') {
this.$message.error('请填写企业名称!');
return;
}
if (this.formData.photo_image == '') {
this.formData.photo_image = '/uploads/20240517/8b2da599cd1e90fcfbb56bdf0f4f4181.webp';
}
// if (this.formData.enterprise_nature == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.enterprise_website == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.if_list == null) {
// this.$message.error('');
// return;
// }
// if (this.formData.employee == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.enterprise_location == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.previous_revenue == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.previous_tax == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.education == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.previous_profit == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.previous_donation == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.qitaqiyerenzhiqingkuang == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.enterprise_Introduction == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.introdiction == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.enterprise_honor == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.if_organization == null) {
// this.$message.error('');
// return;
// }
// if (this.formData.if_organization == 0) {
// if (this.formData.nature == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.jiantuan_time == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.jiantuan_number == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.youth_number == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.superior_nature == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.tuanweifuzerenxinxi == '') {
// this.$message.error('');
// return;
// }
// if (this.formData.documents_file == '') {
// this.$message.error('');
// return;
// }
// }
this.$request
.post("/member/add", this.formData)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success('添加成功!');
setTimeout(()=>{
this.$router.push('/user/user_index');
},1000)
} else {
this.$message.error(res.msg);
}
this.getInfo();
})
.catch((e) => {
console.log(e);
});
},
},
};
</script>
<style scoped lang="less">
.cropper-content {
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
.cropper {
width: 350px;
height: 300px;
}
.show-preview {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
.preview {
overflow: hidden;
border-radius: 50%;
border: 1px solid #cccccc;
background: #cccccc;
margin-left: 40px;
}
}
}
.footer-btn {
margin-top: 30px;
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
.scope-btn {
width: 350px;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
}
.upload-btn {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
}
.btn {
outline: none;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 8px 15px;
font-size: 12px;
border-radius: 3px;
color: #fff;
background-color: #67c23a;
border-color: #67c23a;
}
}
</style>

View File

@ -42,8 +42,8 @@
<t-form-item label="性别" name="gender"> <t-form-item label="性别" name="gender">
<t-select v-model="formData.gender" :style="{ width: '200px' }"> <t-select v-model="formData.gender" :style="{ width: '200px' }">
<t-option key="0" label="女" value="0"></t-option> <t-option :key="0" label="女" :value="0"></t-option>
<t-option key="1" label="男" value="1"></t-option> <t-option :key="1" label="男" :value="1"></t-option>
</t-select> </t-select>
</t-form-item> </t-form-item>
<t-form-item label="民族" name="nation"> <t-form-item label="民族" name="nation">
@ -593,6 +593,7 @@ getRegion() {
this.formData.cardf_image = res.data.cardf_image; this.formData.cardf_image = res.data.cardf_image;
this.formData.cardz_image = res.data.cardz_image; this.formData.cardz_image = res.data.cardz_image;
this.formData.photo_image = res.data.photo_image; this.formData.photo_image = res.data.photo_image;
this.formData.company_image = res.data.company_image;
if (res.data.business_license_image == '') { if (res.data.business_license_image == '') {
this.formData.business_license_image_show = []; this.formData.business_license_image_show = [];
} else { } else {

View File

@ -44,7 +44,7 @@
></t-pagination> ></t-pagination>
</div> </div>
</div> </div>
<t-dialog header="信息审核" :confirmBtn="null" :visible="ShenMode" :onClose="onCloseMy" :cancelBtn="null" <t-dialog header="信息审核" :confirmBtn="null" :closeOnOverlayClick="false" :visible="ShenMode" :onClose="onCloseMy" :cancelBtn="null"
width="1000px" top="50px"> width="1000px" top="50px">
<div style="text-align: center;width: 900px;height: 700px;margin: 0 auto;position: relative;overflow-y: scroll;"> <div style="text-align: center;width: 900px;height: 700px;margin: 0 auto;position: relative;overflow-y: scroll;">
<t-space direction="vertical"> <t-space direction="vertical">

View File

@ -54,6 +54,9 @@
<t-col :span="2" class="operation-container"> <t-col :span="2" class="operation-container">
<t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button> <t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button>
</t-col> </t-col>
<t-col :span="2" style="text-align: right">
<t-button @click="()=>$router.push('/user/user_add')"> 新增会员</t-button>
</t-col>
</t-row> </t-row>
</t-form> </t-form>
<t-tabs v-model="tabIndex" @change="tabIndexChange"> <t-tabs v-model="tabIndex" @change="tabIndexChange">
@ -98,6 +101,7 @@
<t-pagination <t-pagination
:total="total" :total="total"
:page-size="size" :page-size="size"
:current="page"
@current-change="onCurrentChange" @current-change="onCurrentChange"
:showPageSize="false" :showPageSize="false"
></t-pagination> ></t-pagination>
@ -107,6 +111,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import store from "@/store"; import store from "@/store";
import {toInteger} from "lodash";
export default { export default {
data() { data() {
@ -144,6 +149,11 @@ export default {
}else{ }else{
this.association=JSON.parse(this.$store.state.user.association); this.association=JSON.parse(this.$store.state.user.association);
} }
const page = sessionStorage.getItem('userPage');
if(page){
this.page=toInteger(page);
}
console.log(page);
this.getList(); this.getList();
this.getPositionList(); this.getPositionList();
this.getRegion(); this.getRegion();
@ -178,6 +188,7 @@ export default {
this.page=1; this.page=1;
this.total=0; this.total=0;
this.list=[]; this.list=[];
sessionStorage.setItem('userPage', 1);
this.getList(); this.getList();
}, },
del(row){ del(row){
@ -198,6 +209,7 @@ export default {
}, },
onCurrentChange(d){ onCurrentChange(d){
this.page=d; this.page=d;
sessionStorage.setItem('userPage', d);
this.getList(); this.getList();
}, },
openUrl(member_id){ openUrl(member_id){
@ -221,6 +233,7 @@ export default {
onSubmit(){ onSubmit(){
this.page=1; this.page=1;
this.list=[]; this.list=[];
sessionStorage.setItem('userPage', 1);
this.getList(); this.getList();
}, },
} }

View File

@ -190,7 +190,7 @@ export default {
}, },
tgSelect(type){ tgSelect(type){
this.$request this.$request
.post("/member/update",{member_id:this.member_id,if_xianshi:type}) .post("/member/update",{member_id:this.member_id,if_xianshi:type,if_member:type})
.then( (res) => { .then( (res) => {
console.log(res); console.log(res);
if (res.code==1){ if (res.code==1){

View File

@ -23,7 +23,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog header="新增行业" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"> <t-dialog header="新增行业" :visible="addMode" :closeOnOverlayClick="false" :onClose="onCloseMy" @confirm="onSubmit">
<t-form> <t-form>
<t-form-item label="行业名称" name="name"> <t-form-item label="行业名称" name="name">
<t-input placeholder="请输入行业名称" v-model="industry_name"/> <t-input placeholder="请输入行业名称" v-model="industry_name"/>

View File

@ -27,7 +27,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog header="新增职位" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"> <t-dialog header="新增职位" :visible="addMode" :closeOnOverlayClick="false" :onClose="onCloseMy" @confirm="onSubmit">
<t-form> <t-form>
<t-form-item label="职位名称" name="name"> <t-form-item label="职位名称" name="name">
<t-input placeholder="请输入职位名称" v-model="position_name"/> <t-input placeholder="请输入职位名称" v-model="position_name"/>

View File

@ -23,7 +23,7 @@
</template> </template>
</t-table> </t-table>
</div> </div>
<t-dialog header="新增区域" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"> <t-dialog header="新增区域" :closeOnOverlayClick="false" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit">
<t-form> <t-form>
<t-form-item label="区域名称" name="region_name"> <t-form-item label="区域名称" name="region_name">
<t-input placeholder="请输入区域名称" v-model="region_name"/> <t-input placeholder="请输入区域名称" v-model="region_name"/>

View File

@ -17,6 +17,12 @@ export default [
name: 'DashboardBase', name: 'DashboardBase',
component: () => import('@/pages/dashboard/base/index.vue'), component: () => import('@/pages/dashboard/base/index.vue'),
meta: { title: '数据大屏' }, meta: { title: '数据大屏' },
},
{
path: 'admin_pwd',
name: 'adminPwd',
component: () => import('@/pages/dashboard/admin_pwd.vue'),
meta: {title: '密码修改', hidden: true},
} }
], ],
}, },

View File

@ -1,4 +1,4 @@
import { ViewModuleIcon, UsergroupIcon,ViewListIcon,ChartBubbleIcon,HomeIcon,HelpIcon} from 'tdesign-icons-vue'; import {ViewModuleIcon, UsergroupIcon, ViewListIcon, ChartBubbleIcon, HomeIcon, HelpIcon} from 'tdesign-icons-vue';
import Layout from '@/layouts/index.vue'; import Layout from '@/layouts/index.vue';
@ -8,49 +8,55 @@ export default [
name: 'user', name: 'user',
component: Layout, component: Layout,
redirect: '/user/user_index', redirect: '/user/user_index',
meta: { title: '会员管理', icon: UsergroupIcon }, meta: {title: '会员管理', icon: UsergroupIcon},
children: [ children: [
{ {
path: 'user_index', path: 'user_index',
name: 'userIndex', name: 'userIndex',
component: () => import('@/pages/user/user_index.vue'), component: () => import('@/pages/user/user_index.vue'),
meta: { title: '会员列表' }, meta: {title: '会员列表'},
}, },
{ {
path: 'plan', path: 'plan',
name: 'userPlan', name: 'userPlan',
component: () => import('@/pages/user/user_plan.vue'), component: () => import('@/pages/user/user_plan.vue'),
meta: { title: '职位管理' }, meta: {title: '职位管理'},
}, },
{ {
path: 'line', path: 'line',
name: 'userLine', name: 'userLine',
component: () => import('@/pages/user/user_line.vue'), component: () => import('@/pages/user/user_line.vue'),
meta: { title: '行业管理' }, meta: {title: '行业管理'},
}, },
{ {
path: 'region', path: 'region',
name: 'userRegion', name: 'userRegion',
component: () => import('@/pages/user/user_region.vue'), component: () => import('@/pages/user/user_region.vue'),
meta: { title: '区域管理' }, meta: {title: '区域管理'},
}, },
{ {
path: 'user_info', path: 'user_info',
name: 'userInfo', name: 'userInfo',
component: () => import('@/pages/user/user_info.vue'), component: () => import('@/pages/user/user_info.vue'),
meta: { title: '会员详情',hidden:true }, meta: {title: '会员详情', hidden: true},
}, },
{ {
path: 'user_edit', path: 'user_edit',
name: 'userEdit', name: 'userEdit',
component: () => import('@/pages/user/user_edit.vue'), component: () => import('@/pages/user/user_edit.vue'),
meta: { title: '会员编辑',hidden:true }, meta: {title: '会员编辑', hidden: true},
},
{
path: 'user_add',
name: 'userAdd',
component: () => import('@/pages/user/user_add.vue'),
meta: {title: '新增会员', hidden: true},
}, },
{ {
path: 'user_edit_shen', path: 'user_edit_shen',
name: 'userEditShen', name: 'userEditShen',
component: () => import('@/pages/user/user_edit_shen.vue'), component: () => import('@/pages/user/user_edit_shen.vue'),
meta: { title: '编辑信息审核' }, meta: {title: '编辑信息审核'},
}, },
], ],
}, },
@ -59,19 +65,19 @@ export default [
name: 'activity', name: 'activity',
component: Layout, component: Layout,
redirect: '/activity/index', redirect: '/activity/index',
meta: { title: '活动管理', icon: ChartBubbleIcon }, meta: {title: '活动管理', icon: ChartBubbleIcon},
children: [ children: [
{ {
path: 'activity_index', path: 'activity_index',
name: 'activityIndex', name: 'activityIndex',
component: () => import('@/pages/activity/activity_index.vue'), component: () => import('@/pages/activity/activity_index.vue'),
meta: { title: '活动列表' }, meta: {title: '活动列表'},
}, },
{ {
path: 'activity_top', path: 'activity_top',
name: 'activityTop', name: 'activityTop',
component: () => import('@/pages/activity/activity_top.vue'), component: () => import('@/pages/activity/activity_top.vue'),
meta: { title: '活动首页置顶' }, meta: {title: '活动首页置顶'},
} }
], ],
}, },
@ -80,59 +86,59 @@ export default [
name: 'news', name: 'news',
component: Layout, component: Layout,
redirect: '/news/news_index', redirect: '/news/news_index',
meta: { title: '新闻文章', icon: ViewListIcon }, meta: {title: '新闻文章', icon: ViewListIcon},
children: [ children: [
{ {
path: 'news_index', path: 'news_index',
name: 'newsIndex', name: 'newsIndex',
component: () => import('@/pages/news/news_index.vue'), component: () => import('@/pages/news/news_index.vue'),
meta: { title: '新闻内容管理' }, meta: {title: '新闻内容管理'},
}, },
{ {
path: 'news_type', path: 'news_type',
name: 'newsType', name: 'newsType',
component: () => import('@/pages/news/news_type.vue'), component: () => import('@/pages/news/news_type.vue'),
meta: { title: '新闻类目管理' }, meta: {title: '新闻类目管理'},
} }
], ],
},{ }, {
path: '/association', path: '/association',
name: 'association', name: 'association',
component: Layout, component: Layout,
redirect: '/association/index', redirect: '/association/index',
meta: { title: '协会管理', icon: HomeIcon }, meta: {title: '协会管理', icon: HomeIcon},
children: [ children: [
{ {
path: 'person ', path: 'person ',
name: 'associationPerson', name: 'associationPerson',
component: () => import('@/pages/association/person.vue'), component: () => import('@/pages/association/person.vue'),
meta: { title: '管理员' }, meta: {title: '管理员'},
}, },
{ {
path: 'carousel ', path: 'carousel ',
name: 'associationCarousel', name: 'associationCarousel',
component: () => import('@/pages/association/carousel.vue'), component: () => import('@/pages/association/carousel.vue'),
meta: { title: '轮播图' }, meta: {title: '轮播图'},
}, },
{ {
path: 'opinion', path: 'opinion',
name: 'associationOpinion', name: 'associationOpinion',
component: () => import('@/pages/association/opinion.vue'), component: () => import('@/pages/association/opinion.vue'),
meta: { title: '意见反馈' }, meta: {title: '意见反馈'},
}, },
{ {
path: 'index', path: 'index',
name: 'associationIndex', name: 'associationIndex',
component: () => import('@/pages/association/index.vue'), component: () => import('@/pages/association/index.vue'),
meta: { title: '关于我们' }, meta: {title: '关于我们'},
}, },
{ {
path: 'system', path: 'system',
name: 'systemIndex', name: 'systemIndex',
component: () => import('@/pages/association/system.vue'), component: () => import('@/pages/association/system.vue'),
meta: { title: '系统设置' }, meta: {title: '系统设置'},
} }
], ],
}, }
]; ];

View File

@ -75,6 +75,17 @@ const actions = {
roles: ['DashboardBase','newsIndex', 'login', 'activityIndex', 'userEditShen', 'userIndex', 'userInfo', 'userEdit'], roles: ['DashboardBase','newsIndex', 'login', 'activityIndex', 'userEditShen', 'userIndex', 'userInfo', 'userEdit'],
}; };
} }
// if (key.group == 1) {
// return {
// name: 'td_main',
// roles: ['ALL_ROUTERS'],
// };
// } else {
// return {
// name: 'td_dev',
// roles: ['DashboardBase','newsIndex', 'login', 'activityIndex', 'userEditShen', 'userIndex', 'userInfo', 'userEdit'],
// };
// }
}; };
const res = await mockRemoteUserInfo(state.association); const res = await mockRemoteUserInfo(state.association);
commit('setUserInfo', res); commit('setUserInfo', res);