This commit is contained in:
parent
b64199efac
commit
60c7f9d84d
|
@ -1,2 +1,2 @@
|
|||
# 打包路径
|
||||
VITE_BASE_URL = /
|
||||
VITE_BASE_URL = ./
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# 打包路径 根据项目不同按需配置
|
||||
VITE_BASE_URL = https://static.tdesign.tencent.com/starter/vue/
|
||||
VITE_BASE_URL = ./
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #activity_type="{ row }">
|
||||
<div style="text-align: center;">
|
||||
<span v-if="row.activity_type==1">线下活动</span>
|
||||
<span v-if="row.activity_type==2">调查问卷</span>
|
||||
<span v-if="row.activity_type==3">公益捐赠</span>
|
||||
<span v-if="row.activity_type==4">学习培训</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #select="{ row }">
|
||||
<t-space size="24px">
|
||||
<t-button @click="openInfo(row)">报名详情</t-button>
|
||||
|
@ -55,7 +63,7 @@
|
|||
cellEmptyContent="-"
|
||||
>
|
||||
<template #photo_image="{ row }">
|
||||
<img :src="'http://192.168.3.130/'+row.photo_image" style="width: 50px;height: 50px">
|
||||
<img :src="$store.state.user.apiUrl+row.photo_image" style="width: 50px;height: 50px">
|
||||
</template>
|
||||
</t-table>
|
||||
<div style="margin-top: 30px">
|
||||
|
@ -79,6 +87,14 @@
|
|||
<t-form-item label="活动地址" name="activity_location">
|
||||
<t-input placeholder="请输入活动地址" v-model="addForm.activity_location"/>
|
||||
</t-form-item>
|
||||
<t-form-item label="活动类别" name="activity_type">
|
||||
<t-select v-model="addForm.activity_type">
|
||||
<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="activity_desc">
|
||||
<div style="border: 1px solid #ccc;">
|
||||
<!-- 工具栏 -->
|
||||
|
@ -141,7 +157,8 @@ export default {
|
|||
activity_start_time: '',
|
||||
activity_end_time: '',
|
||||
activity_content: '',
|
||||
activity_location: ''
|
||||
activity_location: '',
|
||||
activity_type: null,
|
||||
},
|
||||
addMode: false,
|
||||
isEdit: false,
|
||||
|
@ -163,6 +180,7 @@ export default {
|
|||
list: [],
|
||||
columns: [
|
||||
{colKey: 'activity_name', title: '活动标题', align: 'center'},
|
||||
{colKey: 'activity_type', title: '活动类别', align: 'center'},
|
||||
{colKey: 'activity_desc', title: '活动简介', align: 'center'},
|
||||
{colKey: 'activity_image', title: '活动图片', align: 'center'},
|
||||
{colKey: 'activity_start_time', title: '活动开始时间', align: 'center'},
|
||||
|
@ -276,6 +294,17 @@ export default {
|
|||
add() {
|
||||
this.addMode = true;
|
||||
this.isEdit = false;
|
||||
this.addForm = {
|
||||
activity_name: '',
|
||||
activity_desc: '',
|
||||
activity_image_show: [],
|
||||
activity_image: '',
|
||||
activity_start_time: '',
|
||||
activity_end_time: '',
|
||||
activity_content: '',
|
||||
activity_location: '',
|
||||
activity_type: null,
|
||||
};
|
||||
},
|
||||
edit(d) {
|
||||
console.log(d);
|
||||
|
@ -288,6 +317,7 @@ export default {
|
|||
this.addForm.activity_end_time = d.activity_end_time;
|
||||
this.addForm.activity_location = d.activity_location;
|
||||
this.addForm.activity_content = d.activity_content;
|
||||
this.addForm.activity_type = d.activity_type;
|
||||
this.addMode = true;
|
||||
this.isEdit = true;
|
||||
},
|
||||
|
@ -316,6 +346,10 @@ export default {
|
|||
this.$message.error('活动简介不能为空');
|
||||
return;
|
||||
}
|
||||
if (this.addForm.activity_type == null) {
|
||||
this.$message.error('活动类别不能为空');
|
||||
return;
|
||||
}
|
||||
if (this.addForm.activity_image == '') {
|
||||
this.$message.error('活动图片不能为空');
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
<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="true"
|
||||
:bordered="false"
|
||||
:hover="true"
|
||||
size="large"
|
||||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
>
|
||||
<template #image="{ row }">
|
||||
<div v-if="row.type==1">
|
||||
<img :src="$store.state.user.apiUrl+row.image" style="height: 200px">
|
||||
</div>
|
||||
<div v-if="row.type==2">
|
||||
<video :src="$store.state.user.apiUrl+row.image" :autoplay="false" controls="controls" style="height: 200px"></video>
|
||||
</div>
|
||||
</template>
|
||||
<template #type="{ row }">
|
||||
<t-tag v-if="row.type==1">图片</t-tag>
|
||||
<t-tag v-if="row.type==2" theme="primary">视频</t-tag>
|
||||
</template>
|
||||
<template #select="{ row }">
|
||||
<t-space size="24px">
|
||||
<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="45%" top="20px">
|
||||
<t-form>
|
||||
<t-form-item label="轮播类型" name="type">
|
||||
<t-select v-model="addForm.type">
|
||||
<t-option label="图片" value="1" />
|
||||
<t-option label="视频" value="2" />
|
||||
</t-select>
|
||||
</t-form-item>
|
||||
<t-form-item label="跳转链接" name="url">
|
||||
<t-input placeholder="请输入跳转链接" v-model="addForm.url"/>
|
||||
</t-form-item>
|
||||
<t-form-item label="排序" name="weight">
|
||||
<t-input placeholder="请输入排序" v-model="addForm.weight"/>
|
||||
</t-form-item>
|
||||
<t-form-item label="轮播图片/视频">
|
||||
<t-upload
|
||||
:action="$store.state.user.apiUrl+'/api/common/upload'"
|
||||
v-model="addForm.news_image_show"
|
||||
tips="请选择单张图片/视频文件上传"
|
||||
accept="image/*,video/*"
|
||||
:showImageFileName="true"
|
||||
:imageViewerProps="true"
|
||||
:format-response="formatResponse"
|
||||
></t-upload>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
</t-dialog>
|
||||
</t-card>
|
||||
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
infoMode: false,
|
||||
addForm: {
|
||||
type:null,
|
||||
image: '',
|
||||
news_image_show:[],
|
||||
showtime:'',
|
||||
weight:0
|
||||
},
|
||||
addMode: false,
|
||||
isEdit: false,
|
||||
editID: 0,
|
||||
list: [],
|
||||
columns: [
|
||||
{colKey: 'weight', title: '排序', align: 'center'},
|
||||
{colKey: 'image', title: '图片视频', align: 'center'},
|
||||
{colKey: 'type', title: '类别', align: 'center'},
|
||||
{colKey: 'url', title: '跳转链接', align: 'center'},
|
||||
{colKey: 'select', title: '操作', width: 200, align: 'center'},
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.member_id=this.$route.query.id;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
formatResponse(res) {
|
||||
console.log(res);
|
||||
this.addForm.image = res.data.url;
|
||||
return {url: res.data.fullurl,name:res.data.url};
|
||||
},
|
||||
del(d) {
|
||||
console.log(d);
|
||||
this.$request
|
||||
.post('/carousel/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.addMode = true;
|
||||
this.isEdit = false;
|
||||
this.addForm={
|
||||
news_image_show: [],
|
||||
image: '',
|
||||
url: '',
|
||||
weight: '',
|
||||
type: null,
|
||||
};
|
||||
},
|
||||
edit(d) {
|
||||
console.log(d);
|
||||
this.addForm.news_image_show = [{url: store.state.user.apiUrl + d.image,name:d.image}];
|
||||
this.addForm.image = d.image;
|
||||
this.addForm.id = d.id;
|
||||
this.addForm.url = d.url;
|
||||
this.addForm.weight = d.weight;
|
||||
this.addForm.type = d.type;
|
||||
this.addMode = true;
|
||||
this.isEdit = true;
|
||||
},
|
||||
getList() {
|
||||
this.$request
|
||||
.post("/carousel")
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data;
|
||||
}
|
||||
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
onSubmit() {
|
||||
console.log(this.addForm);
|
||||
if (this.addForm.type == null) {
|
||||
this.$message.error('轮播图类型不能为空!');
|
||||
return;
|
||||
}
|
||||
if (this.addForm.image=='') {
|
||||
this.$message.error('轮播图内容不能为空');
|
||||
return;
|
||||
}
|
||||
var url = '/carousel/add';
|
||||
if (this.isEdit) {
|
||||
url = '/carousel/update';
|
||||
}
|
||||
this.$request
|
||||
.post(url, this.addForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.$message.success(res.msg);
|
||||
this.addMode = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
onCloseMy() {
|
||||
this.addMode = false;
|
||||
this.infoMode = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -45,7 +45,7 @@
|
|||
/>
|
||||
</div>
|
||||
</t-form-item>
|
||||
<t-form-item label="协会规童制度" name="association_guizhang">
|
||||
<t-form-item label="协会规章制度" name="association_guizhang">
|
||||
<div style="border: 1px solid #ccc;">
|
||||
<!-- 工具栏 -->
|
||||
<Toolbar
|
||||
|
@ -212,7 +212,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
if (this.association_guizhang == '') {
|
||||
this.$message.error('协会规童制度不能为空');
|
||||
this.$message.error('协会规章制度不能为空');
|
||||
return;
|
||||
}
|
||||
if (this.association_image == '') {
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<t-card :bordered="false">
|
||||
<div class="form-step-container">
|
||||
<t-table
|
||||
rowKey="index"
|
||||
:data="list"
|
||||
:columns="columns"
|
||||
:stripe="true"
|
||||
:bordered="false"
|
||||
:hover="true"
|
||||
size="large"
|
||||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
:pagination="pagination"
|
||||
>
|
||||
</t-table>
|
||||
<div style="margin-top: 30px">
|
||||
<t-pagination
|
||||
:total="pagination.total"
|
||||
:page-size="pagination.size"
|
||||
@current-change="onCurrentChange"
|
||||
:showPageSize="false"
|
||||
></t-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</t-card>
|
||||
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
columns: [
|
||||
{colKey: 'name', title: '反馈人', align: 'center'},
|
||||
{colKey: 'phone', title: '联系方式', align: 'center'},
|
||||
{colKey: 'content', title: '反馈内容', align: 'center'},
|
||||
{colKey: 'createtime', title: '创建时间', align: 'center'},
|
||||
],
|
||||
pagination: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.member_id=this.$route.query.id;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
onCurrentChange(d){
|
||||
this.pagination.page=d;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.$request
|
||||
.post("/message/index", {page: this.pagination.page, size: this.pagination.size})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.position;
|
||||
this.pagination.total = res.data.count;
|
||||
}
|
||||
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style src="@wangeditor/editor/dist/css/style.css"></style>
|
|
@ -16,7 +16,7 @@
|
|||
>
|
||||
<template>
|
||||
<t-form-item name="zhanghu">
|
||||
<t-input v-model="formData.zhanghu" size="large" placeholder="请输入账号:admin">
|
||||
<t-input v-model="formData.zhanghu" size="large" placeholder="请输入账号">
|
||||
<template #prefix-icon>
|
||||
<user-icon/>
|
||||
</template>
|
||||
|
@ -30,7 +30,7 @@
|
|||
type="password"
|
||||
clearable
|
||||
key="password"
|
||||
placeholder="请输入登录密码:admin"
|
||||
placeholder="请输入登录密码"
|
||||
>
|
||||
<template #prefix-icon>
|
||||
<lock-on-icon/>
|
||||
|
@ -69,8 +69,8 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
formData: {
|
||||
zhanghu: 'admin',
|
||||
password: 'qinze731344.',
|
||||
zhanghu: '',
|
||||
password: '',
|
||||
},
|
||||
FORM_RULES: {
|
||||
zhanghu: [{required: true, message: '账号必填', type: 'error'}],
|
||||
|
|
|
@ -219,6 +219,17 @@ export default {
|
|||
add() {
|
||||
this.addMode = true;
|
||||
this.isEdit = false;
|
||||
this.addForm={
|
||||
news_title: '',
|
||||
news_titleshort: '',
|
||||
gory_id: null,
|
||||
news_auto: '',
|
||||
news_source: '',
|
||||
news_content: '',
|
||||
news_image: '',
|
||||
news_image_show:[],
|
||||
showtime:'',
|
||||
};
|
||||
},
|
||||
edit(d) {
|
||||
console.log(d);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</t-form>
|
||||
</div>
|
||||
<div style="padding: 20px">
|
||||
<div style="padding-bottom: 20px;font-weight: bold">人员信息</div>
|
||||
<div style="padding-bottom: 20px;font-weight: bold"></div>
|
||||
<t-form
|
||||
labelAlign="top"
|
||||
layout="inline"
|
||||
|
@ -102,8 +102,12 @@
|
|||
<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 label="意向协会职务" name="position">-->
|
||||
<!-- <t-input v-model="formData.position" placeholder="请输入意向协会职务"></t-input>-->
|
||||
<!-- </t-form-item>-->
|
||||
<t-form-item label="自我介绍" name="achievement_award">
|
||||
<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 }"
|
||||
|
@ -171,6 +175,9 @@
|
|||
<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">
|
||||
<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>
|
||||
|
@ -351,9 +358,11 @@ export default {
|
|||
documents_file: '',
|
||||
documents_file_show: [],
|
||||
enterprise_location:'',
|
||||
introduction:'',
|
||||
enterprise_name:'',
|
||||
},
|
||||
ok: false,
|
||||
current: 0,
|
||||
current: 2,
|
||||
id: 0,
|
||||
info: '',
|
||||
industry_list:[],
|
||||
|
@ -537,6 +546,10 @@ export default {
|
|||
this.$message.error('请上传个人照片!');
|
||||
return;
|
||||
}
|
||||
if(this.formData.introduction==''){
|
||||
this.$message.error('请填写自我介绍!');
|
||||
return;
|
||||
}
|
||||
this.current = 2;
|
||||
},
|
||||
submit(){
|
||||
|
@ -548,6 +561,10 @@ export default {
|
|||
this.$message.error('请输入统一社会信用代码!');
|
||||
return;
|
||||
}
|
||||
if(this.formData.enterprise_name==''){
|
||||
this.$message.error('请输入企业名称!');
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_nature == '') {
|
||||
this.$message.error('请输入企业性质!');
|
||||
return;
|
||||
|
|
|
@ -89,6 +89,10 @@
|
|||
<!-- <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"/>
|
||||
|
@ -147,6 +151,9 @@
|
|||
<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">
|
||||
<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>
|
||||
|
@ -309,7 +316,9 @@ export default {
|
|||
superior_nature: '',
|
||||
tuanweifuzerenxinxi: '',
|
||||
documents_file: '',
|
||||
documents_file_show: []
|
||||
documents_file_show: [],
|
||||
introduction:'',
|
||||
enterprise_name:'',
|
||||
},
|
||||
id: 0,
|
||||
info: '',
|
||||
|
@ -426,6 +435,8 @@ export default {
|
|||
this.formData.documents_file=res.data.documents_file;
|
||||
this.formData.enterprise_location=res.data.enterprise_location;
|
||||
this.formData.documents_file_show= [{url:store.state.user.apiUrl+ res.data.documents_file}];
|
||||
this.formData.introduction=res.data.introduction;
|
||||
this.formData.enterprise_name=res.data.enterprise_name;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
:hover="true"
|
||||
size="large"
|
||||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
cellEmptyContent="-" c
|
||||
>
|
||||
<template #photo_image="{ row }">
|
||||
<img :src="'http://192.168.3.130/'+row.photo_image" style="width: 50px;height: 50px">
|
||||
<img :src="$store.state.user.apiUrl+row.photo_image" style="width: 50px;height: 50px">
|
||||
</template>
|
||||
<template #gender="{ row }">
|
||||
{{row.gender==1?"男":"女"}}
|
||||
|
@ -124,7 +124,7 @@ export default {
|
|||
methods: {
|
||||
del(row){
|
||||
this.$request
|
||||
.post("/member/del",{member_id:row.id})
|
||||
.post("/member/del",{member_id:row.member_id})
|
||||
.then( (res) => {
|
||||
console.log(res);
|
||||
if (res.code==1){
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<t-descriptions-item label="毕业院校" :content="info.institution"></t-descriptions-item>
|
||||
<t-descriptions-item label="学历" :content="info.education"></t-descriptions-item>
|
||||
<t-descriptions-item label="学位" :content="info.academic_degree"></t-descriptions-item>
|
||||
|
||||
<t-descriptions-item label="自我介绍" :content="info.introduction"></t-descriptions-item>
|
||||
</t-descriptions>
|
||||
</t-card>
|
||||
<t-card title="个人信息" :bordered="false" class="info-block">
|
||||
|
@ -80,8 +80,8 @@
|
|||
</t-image-viewer>
|
||||
</div>
|
||||
</t-descriptions-item>
|
||||
<t-descriptions-item label="统一社会信用代码" :content="info.unified_code">
|
||||
</t-descriptions-item>
|
||||
<t-descriptions-item label="统一社会信用代码" :content="info.unified_code"></t-descriptions-item>
|
||||
<t-descriptions-item label="公司名称" :content="info.enterprise_name"></t-descriptions-item>
|
||||
<t-descriptions-item label="企业性质" :content="info.enterprise_nature"></t-descriptions-item>
|
||||
<t-descriptions-item label="企业网址" :content="info.enterprise_website "></t-descriptions-item>
|
||||
<t-descriptions-item label="是否上市">
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
>
|
||||
<template #type="{ row }">
|
||||
<t-tag theme="primary" v-if="row.type==1">理事会</t-tag>
|
||||
<t-tag theme="success" v-if="row.type==2">监事会</t-tag>
|
||||
</template>
|
||||
<template #select="{ row }">
|
||||
<t-space size="24px">
|
||||
<t-button theme="warning" @click="edit(row)">编辑</t-button>
|
||||
|
||||
<t-popconfirm content="确认删除吗" @confirm="del(row)">
|
||||
<t-button theme="danger" >删除</t-button>
|
||||
</t-popconfirm>
|
||||
|
@ -29,6 +32,12 @@
|
|||
<t-form-item label="职位名称" name="name">
|
||||
<t-input placeholder="请输入职位名称" v-model="position_name"/>
|
||||
</t-form-item>
|
||||
<t-form-item label="职位类别" name="name">
|
||||
<t-select v-model="type" :style="{ width: '200px' }">
|
||||
<t-option label="理事会" value="1"></t-option>
|
||||
<t-option label="监事会" value="2"></t-option>
|
||||
</t-select>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
</t-dialog>
|
||||
</t-card>
|
||||
|
@ -39,12 +48,14 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
position_name: '',
|
||||
type:null,
|
||||
addMode: false,
|
||||
isEdit: false,
|
||||
editID:0,
|
||||
list: [],
|
||||
columns: [
|
||||
{colKey: 'position_name', title: '职位名称'},
|
||||
{colKey: 'type', title: '职位类别'},
|
||||
{colKey: 'select', title: '操作', width: 200},
|
||||
],
|
||||
}
|
||||
|
@ -76,8 +87,10 @@ export default {
|
|||
this.isEdit=false;
|
||||
},
|
||||
edit(d){
|
||||
console.log(d);
|
||||
this.editID=d.id;
|
||||
this.position_name=d.position_name;
|
||||
this.type=String(d.type);
|
||||
this.addMode=true;
|
||||
this.isEdit=true;
|
||||
},
|
||||
|
@ -97,12 +110,16 @@ export default {
|
|||
this.$message.error('职位名称不能为空');
|
||||
return;
|
||||
}
|
||||
if (this.type == null) {
|
||||
this.$message.error('职位类别不能为空');
|
||||
return;
|
||||
}
|
||||
var url='/position/add';
|
||||
if(this.isEdit){
|
||||
url='/position/update';
|
||||
}
|
||||
this.$request
|
||||
.post(url,{position_name:this.position_name,id:this.editID})
|
||||
.post(url,{position_name:this.position_name,type:this.type,id:this.editID})
|
||||
.then((res) => {
|
||||
if(res.code==1){
|
||||
this.$message.success(res.msg);
|
||||
|
|
|
@ -14,21 +14,19 @@ router.beforeEach(async (to, from, next) => {
|
|||
const token = localStorage.getItem('associationToken');
|
||||
console.log(token);
|
||||
console.log(to.path);
|
||||
if(store.state.user.association){
|
||||
console.log(to.path);
|
||||
if(store.state.user.association!=''){
|
||||
if(typeof (store.state.user.association)=='object'){
|
||||
var association=store.state.user.association;
|
||||
}else{
|
||||
var association=JSON.parse(store.state.user.association);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (token) {
|
||||
if (to.path === '/login') {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
const roles = store.getters['user/roles'];
|
||||
console.log(roles);
|
||||
if (roles && roles.length > 0) {
|
||||
|
@ -42,7 +40,7 @@ if(store.state.user.association){
|
|||
next({ ...to });
|
||||
} catch (error) {
|
||||
await store.commit('user/removeToken');
|
||||
next(`/login?id=`+association.id);
|
||||
next(`/login?id=`+association.id?association.id:1);
|
||||
NProgress.done();
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +49,13 @@ if(store.state.user.association){
|
|||
if (whiteListRouters.indexOf(to.path) !== -1) {
|
||||
next();
|
||||
} else {
|
||||
next(`/login?id=`+association.id);
|
||||
console.log(association);
|
||||
if(typeof (association)!='undefined'){
|
||||
next(`/login?id=`+association.id);
|
||||
}else{
|
||||
next(`/login?id=1`);
|
||||
}
|
||||
|
||||
}
|
||||
NProgress.done();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,18 @@ export default [
|
|||
redirect: '/association/index',
|
||||
meta: { title: '协会管理', icon: HomeIcon },
|
||||
children: [
|
||||
{
|
||||
path: 'carousel ',
|
||||
name: 'associationCarousel',
|
||||
component: () => import('@/pages/association/carousel.vue'),
|
||||
meta: { title: '轮播图' },
|
||||
},
|
||||
{
|
||||
path: 'opinion',
|
||||
name: 'associationOpinion',
|
||||
component: () => import('@/pages/association/opinion.vue'),
|
||||
meta: { title: '意见反馈' },
|
||||
},
|
||||
{
|
||||
path: 'index',
|
||||
name: 'associationIndex',
|
||||
|
|
|
@ -7,7 +7,8 @@ const state = {
|
|||
token: localStorage.getItem('associationToken') || 'main_token', // 默认token不走权限
|
||||
userInfo: InitUserInfo,
|
||||
association:localStorage.getItem('associationInfo') || '',
|
||||
apiUrl:'http://192.168.3.130'
|
||||
//apiUrl:'http://192.168.3.130',
|
||||
apiUrl:'https://ysx.0rui.cn'
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import axios from 'axios';
|
||||
import store from '../store'
|
||||
//const API_HOST = env === 'mock' ? '/' : proxy[env].API; // 如果是mock模式 就不配置host 会走本地Mock拦截
|
||||
const API_HOST ="/api/";
|
||||
const API_HOST ="https://ysx.0rui.cn/api/";
|
||||
//const API_HOST ="/api/";
|
||||
const CODE = {
|
||||
LOGIN_TIMEOUT: 100000,
|
||||
REQUEST_SUCCESS: 0,
|
||||
|
|
Loading…
Reference in New Issue