This commit is contained in:
parent
22d848f7f2
commit
0a87dabfac
12
src/App.vue
12
src/App.vue
|
@ -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 |
|
@ -34,11 +34,13 @@
|
||||||
<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>
|
||||||
|
|
|
@ -96,6 +96,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
list(): Array<MenuRoute> {
|
list(): Array<MenuRoute> {
|
||||||
|
|
||||||
return getMenuList(this.navData);
|
return getMenuList(this.navData);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -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=[];
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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="请选择比例为(1:1)单张图片文件上传"
|
||||||
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="请选择比例为(1:1)ICO图片文件上传,用于后台页面标题小图标"
|
||||||
accept=".ico"
|
accept=".ico"
|
||||||
:format-response="(response) => formatResponse(response, 1)"
|
:format-response="(response) => formatResponse(response, 1)"
|
||||||
></t-upload>
|
></t-upload>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
|
@ -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);
|
||||||
|
|
|
@ -36,16 +36,16 @@
|
||||||
></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>
|
||||||
|
@ -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>
|
||||||
|
@ -122,6 +125,7 @@ export default {
|
||||||
news_image_show: [],
|
news_image_show: [],
|
||||||
showtime: '',
|
showtime: '',
|
||||||
news_hits: 0,
|
news_hits: 0,
|
||||||
|
wx_url: ''
|
||||||
},
|
},
|
||||||
addMode: false,
|
addMode: false,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
@ -206,6 +210,12 @@ export default {
|
||||||
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();
|
||||||
|
@ -282,7 +292,8 @@ export default {
|
||||||
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;
|
||||||
},
|
},
|
||||||
|
@ -335,30 +347,30 @@ 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;
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -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 Buffer转化为blob 如果是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>
|
|
@ -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 {
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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){
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -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"/>
|
||||||
|
|
|
@ -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},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,6 +46,12 @@ export default [
|
||||||
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',
|
||||||
|
@ -133,6 +139,6 @@ export default [
|
||||||
meta: {title: '系统设置'},
|
meta: {title: '系统设置'},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue