Compare commits

..

No commits in common. "9a4d47c1cd4deb90854bef3ebd6c27a8d756dfbe" and "5f1c578b5f40d6d42b1fd57cb11a865b5d282a1e" have entirely different histories.

48 changed files with 2144 additions and 8672 deletions

View File

@ -39,14 +39,14 @@
// } catch (error) { // } catch (error) {
// console.error('Error setting favicon:', error); // console.error('Error setting favicon:', error);
// } // }
// if(typeof (store.state.user.association)=='object'){ if(typeof (store.state.user.association)=='object'){
// var association=store.state.user.association; var association=store.state.user.association;
// }else{ }else{
// var association=JSON.parse(store.state.user.association); var association=JSON.parse(store.state.user.association);
// } }
// console.log(association); console.log(association);
let formData = new FormData(); let formData = new FormData();
formData.append('association_id', 1); formData.append('association_id', association.association_id);
axios.post(store.state.user.apiUrl + '/api/common/icoImage', formData) axios.post(store.state.user.apiUrl + '/api/common/icoImage', formData)
.then(response => { .then(response => {
console.log(response); console.log(response);

View File

@ -27,7 +27,7 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"qrcode.vue": "^1.7.0", "qrcode.vue": "^1.7.0",
"tdesign-icons-vue": "^0.1.11", "tdesign-icons-vue": "^0.1.11",
"tdesign-vue": "^1.10.5", "tdesign-vue": "^1.9.0",
"tvision-color": "~1.6.0", "tvision-color": "~1.6.0",
"vue": "~2.6.14", "vue": "~2.6.14",
"vue-clipboard2": "^0.3.1", "vue-clipboard2": "^0.3.1",

View File

@ -1,5 +1,5 @@
<template> <template>
<router-view :key="$route.fullPath" :class="[mode]" /> <router-view :class="[mode]" />
</template> </template>
<script> <script>
@ -19,7 +19,7 @@ export default Vue.extend({
name: 'user', name: 'user',
component: Layout, component: Layout,
redirect: '/user/user_index', redirect: '/user/user_index',
meta: {title: '会员管理', icon: UsergroupIcon}, meta: {title: '会员管理123', icon: UsergroupIcon},
}; };
console.log(newRouteConfig); console.log(newRouteConfig);
this.$router.addRoute(newRouteConfig); this.$router.addRoute(newRouteConfig);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 KiB

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="key"> <div>
<template v-for="item in list"> <template v-for="item in list">
<template v-if="!item.children || !item.children.length || item.meta?.single"> <template v-if="!item.children || !item.children.length || item.meta?.single">
<t-menu-item <t-menu-item
@ -15,10 +15,8 @@
</template> </template>
{{ item.title }} {{ item.title }}
</t-menu-item> </t-menu-item>
<t-menu-item <t-menu-item
v-else v-else
@click="openUrl(item.path)"
:key="`${item.path}`" :key="`${item.path}`"
:to="item.path" :to="item.path"
:name="item.path" :name="item.path"
@ -32,12 +30,10 @@
</t-menu-item> </t-menu-item>
</template> </template>
<t-submenu v-else :name="item.path" :value="item.path" :title="item.title" :key="item.path"> <t-submenu v-else :name="item.path" :value="item.path" :title="item.title" :key="item.path">
<template #icon> <template #icon>
<t-icon v-if="typeof item.icon === 'string' && item.icon" :name="item.icon" /> <t-icon v-if="typeof item.icon === 'string' && item.icon" :name="item.icon" />
<renderFnIcon :item="item" /> <renderFnIcon :item="item" />
</template> </template>
<menu-content v-if="item.children" :nav-data="item.children" /> <menu-content v-if="item.children" :nav-data="item.children" />
</t-submenu> </t-submenu>
</template> </template>
@ -105,18 +101,9 @@ export default Vue.extend({
}, },
}, },
methods: { methods: {
openUrl(url){
console.log(url);
sessionStorage.removeItem('sUserPage');
},
getHref(item: MenuRoute) { getHref(item: MenuRoute) {
return item.path.match(/(http|https):\/\/([\w.]+\/?)\S*/); return item.path.match(/(http|https):\/\/([\w.]+\/?)\S*/);
}, },
}, },
}); });
</script> </script>
<style>
.key .key .key{
padding-left: 20px;
}
</style>

View File

@ -1,345 +0,0 @@
<template>
<t-card :bordered="false">
<div style="color: #2E2E2E;font-size: 16px;font-weight: 600;height: 50px">
<span>新增</span>
<span v-if="addForm.activity_type==1">协会活动</span>
<span v-if="addForm.activity_type==2">调查问卷</span>
<span v-if="addForm.activity_type==3">公益捐赠</span>
<span v-if="addForm.activity_type==4">学习培训</span>
</div>
<div>
<t-form layout="inline">
<t-form-item label="活动标题" name="activity_name">
<t-input size="large" placeholder="请输入活动标题" v-model="addForm.activity_name"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动简介" name="activity_desc">
<t-input size="large" placeholder="请输入活动简介" v-model="addForm.activity_desc"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动地址" name="activity_location">
<t-input size="large" placeholder="请输入活动地址" v-model="addForm.activity_location"
:style="{ width: '480px' }"/>
</t-form-item>
<!-- <t-form-item label="活动类别" name="activity_type">-->
<!-- <t-select size="large" v-model="addForm.activity_type" :style="{ width: '480px' }">-->
<!-- <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="if_display_registrants">
<t-select size="large" v-model="addForm.if_display_registrants" :style="{ width: '480px' }">
<t-option key="1" label="显示" value="1"/>
<t-option key="2" label="不显示" value="2"/>
</t-select>
</t-form-item>
<t-form-item label="报名范围" name="range">
<t-select size="large" v-model="addForm.range" :style="{ width: '480px' }">
<t-option key="1" label="会员" value="1"/>
<!-- <t-option key="2" label="非会员" value="2"/>-->
<t-option key="3" label="不限制" value="3"/>
</t-select>
</t-form-item>
<t-form-item v-if="addForm.activity_type!=3&&addForm.activity_type!=2" label="报名审核" name="if_auditing">
<t-select size="large" v-model="addForm.if_auditing" :style="{ width: '480px' }">
<t-option key="1" label="否" value="1"/>
<t-option key="2" label="是" value="2"/>
</t-select>
</t-form-item>
<t-form-item label="报名人数" name="number" help="0为不限制">
<t-input size="large" type="number" placeholder="请输入报名人数0为不限制" v-model="addForm.number"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item v-if="addForm.activity_type!=3&&addForm.activity_type!=2" label="签到" name="if_sign">
<t-select size="large" v-model="addForm.if_sign" :style="{ width: '480px' }">
<t-option label="否" value="1"/>
<t-option label="是" value="2"/>
</t-select>
</t-form-item>
<t-form-item v-if="addForm.if_sign==2" label="签到积分" name="custom_points">
<t-input size="large" type="number" placeholder="请输入签到积分" v-model="addForm.custom_points"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item v-if="addForm.activity_type==4" label="付费金额" name="money" help="0为免费">
<t-input size="large" type="number" placeholder="请输入付费金额0为免费" v-model="addForm.money"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动主图" :style="{ width: '100%' }">
<t-upload
ref="uploadRef2"
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.activity_image_show"
theme="image"
:data="{association_id:this.association.association_id}"
tips="请选择单张图片文件上传"
accept="image/*"
:allowUploadDuplicateFile="true"
:format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload>
</t-form-item>
<t-form-item label="视频" v-if="addForm.activity_type==4" :style="{ width: '100%' }">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="activity_video_show"
tips="请选择单个视频文件上传"
accept="video/*"
:showImageFileName="true"
:format-response="formatResponseVideo"
:sizeLimit="{ size: 50, unit: 'MB', message: '视频大小不超过50MB' }"
></t-upload>
</t-form-item>
<t-form-item label="活动简介" name="activity_desc">
<div style="border: 1px solid #ccc;width: 100%;">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 400px;"
v-model="addForm.activity_content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
</t-form>
<!-- <t-form-item label="活动排序" name="weigh">-->
<!-- <t-input placeholder="请输入排序" v-model="addForm.weigh" :style="{ width: '480px' }"/>-->
<!-- </t-form-item>-->
<t-form layout="inline" style="margin-top: 20px;" v-if="addForm.activity_type!=2&&addForm.activity_type!=3">
<t-form-item label="报名开始时间" name="signup_start_time">
<t-date-picker size="large" :clearable="true" placeholder="报名开始时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.signup_start_time"></t-date-picker>
</t-form-item>
<t-form-item label="报名结束时间" name="signup_end_time">
<t-date-picker size="large" :clearable="true" placeholder="报名结束时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.signup_end_time"></t-date-picker>
</t-form-item>
</t-form>
<t-form layout="inline" style="margin-top: 20px;">
<t-form-item label="活动开始时间" name="activity_start_time">
<t-date-picker size="large" :clearable="true" placeholder="活动开始时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.activity_start_time"></t-date-picker>
</t-form-item>
<t-form-item label="活动结束时间" name="activity_end_time">
<t-date-picker size="large" :clearable="true" placeholder="活动结束时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.activity_end_time"></t-date-picker>
</t-form-item>
</t-form>
<t-form layout="inline" style="margin-top: 20px;" v-if="addForm.activity_type==1 || addForm.activity_type==4">
<t-form-item label="短信通知" name="if_sign">
<t-select size="large" v-model="addForm.if_message" :style="{ width: '228px' }">
<t-option label="不发送" :value="2"/>
<t-option label="发送" :value="1"/>
</t-select>
</t-form-item>
</t-form>
<div style="text-align: center;width: 30%;margin: 0px auto;padding-top: 50px;">
<t-button @click="onSubmit" theme="primary" block size="large">
提交
</t-button>
</div>
</div>
</t-card>
</template>
<script lang="ts">
import store from "@/store";
import {Editor, Toolbar} from '@wangeditor/editor-for-vue';
import {CloudDownloadIcon} from "tdesign-icons-vue";
import axios from "axios";
import {toInteger} from "lodash";
export default {
components: {Editor, Toolbar, CloudDownloadIcon},
data() {
return {
addForm: {
// weigh:0,
money: '0',
activity_name: '',
activity_desc: '',
activity_image_show: [],
activity_image: '',
activity_start_time: '',
activity_end_time: '',
activity_content: '',
activity_location: '',
activity_type: null,
if_display_registrants: null,
signup_start_time: '',
signup_end_time: '',
if_auditing: '1',
range: '3',
number: '',
if_sign: '1',
custom_points: '',
if_message:2,
},
activity_video: '',
activity_video_show: [],
addMode: false,
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'uploadVideo',
'group-video',
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 1 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
metaWithUrl: false,
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, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('图片限制为1M请调整好再上传', 2000);
}
},
}
}
},
association: {},
typeName:0,
}
},
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;
var tab=this.$route.name.slice(-1);
this.addForm.activity_type = toInteger(tab);
},
methods: {
onCreated(editor) {
this.editor = Object.seal(editor);
},
formatResponseVideo(res) {
console.log(res);
this.activity_video = res.data.url;
return {url: res.data.fullurl};
},
formatResponse(res) {
console.log(res);
this.addForm.activity_image = res.data.url;
return {url: res.data.fullurl};
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.activity_name == '') {
this.$message.error('活动标题不能为空');
return;
}
if (this.addForm.activity_desc == '') {
this.$message.error('活动简介不能为空');
return;
}
if (this.addForm.activity_type == null) {
this.$message.error('活动类别不能为空');
return;
}
if (this.addForm.activity_image == '') {
this.$message.error('活动图片不能为空');
return;
}
if (this.addForm.activity_content == '') {
this.$message.error('活动详情不能为空');
return;
}
if (this.addForm.activity_start_time == '') {
this.$message.error('活动开始时间不能为空');
return;
}
if (this.addForm.activity_end_time == '') {
this.$message.error('活动结束时间不能为空');
return;
}
if (this.addForm.activity_type == 1 || this.addForm.activity_type == 4) {
if (this.addForm.signup_start_time == '') {
this.$message.error('报名开始时间不能为空');
return;
}
if (this.addForm.signup_end_time == '') {
this.$message.error('报名结束时间不能为空');
return;
}
}
if (this.addForm.activity_location == '') {
this.$message.error('活动地址不能为空');
return;
}
if (this.addForm.activity_type == 2 || this.addForm.activity_type == 3) {
this.addForm.signup_start_time = this.addForm.activity_start_time;
this.addForm.signup_end_time = this.addForm.activity_end_time;
}
console.log(this.addForm);
var url = '/activity/add';
this.addForm.video = this.activity_video;
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success('添加活动成功!');
this.$router.push({
path: '/activity'+this.addForm.activity_type+'/activity_index'+this.addForm.activity_type,
},500);
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,382 +0,0 @@
<template>
<t-card :bordered="false">
<div style="color: #2E2E2E;font-size: 20px;height: 50px">修改协会活动</div>
<div>
<t-form layout="inline">
<t-form-item label="活动标题" name="activity_name">
<t-input size="large" placeholder="请输入活动标题" v-model="addForm.activity_name"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动简介" name="activity_desc">
<t-input size="large" placeholder="请输入活动简介" v-model="addForm.activity_desc"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动地址" name="activity_location">
<t-input size="large" placeholder="请输入活动地址" v-model="addForm.activity_location"
:style="{ width: '480px' }"/>
</t-form-item>
<!-- <t-form-item label="活动类别" name="activity_type">-->
<!-- <t-select size="large" v-model="addForm.activity_type" :style="{ width: '480px' }">-->
<!-- <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="if_display_registrants">
<t-select size="large" v-model="addForm.if_display_registrants" :style="{ width: '480px' }">
<t-option key="1" label="显示" value="1"/>
<t-option key="2" label="不显示" value="2"/>
</t-select>
</t-form-item>
<t-form-item label="报名范围" name="range">
<t-select size="large" v-model="addForm.range" :style="{ width: '480px' }">
<t-option key="1" label="会员" value="1"/>
<!-- <t-option key="2" label="非会员" value="2"/>-->
<t-option key="3" label="不限制" value="3"/>
</t-select>
</t-form-item>
<t-form-item v-if="addForm.activity_type!=3&&addForm.activity_type!=2" label="报名审核" name="if_auditing">
<t-select size="large" v-model="addForm.if_auditing" :style="{ width: '480px' }">
<t-option key="1" label="否" value="1"/>
<t-option key="2" label="是" value="2"/>
</t-select>
</t-form-item>
<t-form-item label="报名人数" name="number">
<t-input size="large" placeholder="请输入报名人数0为不限制" v-model="addForm.number"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item v-if="addForm.activity_type!=3&&addForm.activity_type!=2" label="签到" name="if_sign">
<t-select size="large" v-model="addForm.if_sign" :style="{ width: '480px' }">
<t-option label="否" value="1"/>
<t-option label="是" value="2"/>
</t-select>
</t-form-item>
<t-form-item v-if="addForm.if_sign==2&&addForm.activity_type!=3&&addForm.activity_type!=2" label="签到积分" name="custom_points">
<t-input size="large" placeholder="请输入签到积分" v-model="addForm.custom_points"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item v-if="addForm.activity_type==4" label="付费金额" name="money">
<t-input size="large" placeholder="请输入付费金额0为免费" v-model="addForm.money"
:style="{ width: '480px' }"/>
</t-form-item>
<t-form-item label="活动主图" :style="{ width: '100%' }">
<t-upload
ref="uploadRef2"
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.activity_image_show"
theme="image"
:data="{association_id:this.association.association_id}"
tips="请选择单张图片文件上传"
accept="image/*"
:allowUploadDuplicateFile="true"
:format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload>
</t-form-item>
<t-form-item label="视频" v-if="addForm.activity_type==4" :style="{ width: '100%' }">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="activity_video_show"
tips="请选择单个视频文件上传"
accept="video/*"
:showImageFileName="true"
:imageViewerProps="true"
:format-response="formatResponseVideo"
:sizeLimit="{ size: 50, unit: 'MB', message: '视频大小不超过50MB' }"
></t-upload>
</t-form-item>
<t-form-item label="活动简介" name="activity_desc">
<div style="border: 1px solid #ccc;width: 100%;">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 400px;"
v-model="addForm.activity_content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
</t-form>
<!-- <t-form-item label="活动排序" name="weigh">-->
<!-- <t-input placeholder="请输入排序" v-model="addForm.weigh" :style="{ width: '480px' }"/>-->
<!-- </t-form-item>-->
<t-form layout="inline" style="margin-top: 20px;" v-if="addForm.activity_type!=2&&addForm.activity_type!=3">
<t-form-item label="报名开始时间" name="signup_start_time">
<t-date-picker size="large" :clearable="true" placeholder="报名开始时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.signup_start_time"></t-date-picker>
</t-form-item>
<t-form-item label="报名结束时间" name="signup_end_time">
<t-date-picker size="large" :clearable="true" placeholder="报名结束时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.signup_end_time"></t-date-picker>
</t-form-item>
</t-form>
<t-form layout="inline" style="margin-top: 20px;">
<t-form-item label="活动开始时间" name="activity_start_time">
<t-date-picker size="large" :clearable="true" placeholder="活动开始时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.activity_start_time"></t-date-picker>
</t-form-item>
<t-form-item label="活动结束时间" name="activity_end_time">
<t-date-picker size="large" :clearable="true" placeholder="活动结束时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.activity_end_time"></t-date-picker>
</t-form-item>
</t-form>
<t-form layout="inline" style="margin-top: 20px;" v-if="addForm.activity_type==1 || addForm.activity_type==4">
<t-form-item label="短信通知" name="if_sign">
<t-select size="large" v-model="addForm.if_message" :style="{ width: '228px' }">
<t-option label="不发送" :value="2"/>
<t-option label="发送" :value="1"/>
</t-select>
</t-form-item>
</t-form>
<div style="text-align: center;width: 30%;margin: 0px auto;padding-top: 50px;">
<t-button @click="onSubmit" theme="primary" block size="large">
提交
</t-button>
</div>
</div>
</t-card>
</template>
<script lang="ts">
import store from "@/store";
import {Editor, Toolbar} from '@wangeditor/editor-for-vue';
import {CloudDownloadIcon} from "tdesign-icons-vue";
import axios from "axios";
export default {
components: {Editor, Toolbar, CloudDownloadIcon},
data() {
return {
addForm: {
// weigh:0,
money: '0',
activity_name: '',
activity_desc: '',
activity_image_show: [],
activity_image: '',
activity_start_time: '',
activity_end_time: '',
activity_content: '',
activity_location: '',
activity_type: 1,
if_display_registrants: null,
signup_start_time: '',
signup_end_time: '',
if_auditing: '1',
range: '3',
number: '',
if_sign: '1',
custom_points: '',
if_message:2,
},
addMode: false,
editID: 0,
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'uploadVideo',
'group-video',
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
activity_video: '',
activity_video_show: [],
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
metaWithUrl: false,
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, '', '')
},
onError: (file, err, res) => {
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('限制为50M请调整好再上传', 2000);
}
},
}
}
},
association: {},
}
},
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;
if (typeof (this.$route.query.id) !== 'undefined') {
console.log(this.$route.query);
this.editID = this.$route.query.id;
this.getActInfo();
}
},
methods: {
onCreated(editor) {
this.editor = Object.seal(editor);
},
formatResponseVideo(res) {
console.log(res);
this.activity_video = res.data.url;
return {url: res.data.fullurl};
},
formatResponse(res) {
console.log(res);
this.addForm.activity_image = res.data.url;
return {url: res.data.fullurl};
},
getActInfo() {
this.$request
.post('/activity/find', {id: this.editID})
.then((res) => {
this.edit(res.data);
})
.catch((e) => {
console.log(e);
});
},
edit(d) {
this.addForm.id = d.id;
this.activity_video = d.video;
if (d.video == '') {
this.activity_video_show = [];
} else {
this.activity_video_show = [{url: store.state.user.apiUrl + d.video, name: d.video}];
}
// this.addForm.weigh = d.weigh;
this.addForm.activity_name = d.activity_name;
this.addForm.activity_desc = d.activity_desc;
this.addForm.activity_image_show = [{url: store.state.user.apiUrl + d.activity_image}];
this.addForm.activity_image = d.activity_image;
this.addForm.activity_start_time = d.activity_start_time;
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.addForm.if_display_registrants = d.if_display_registrants;
this.addForm.money = d.money;
this.addForm.signup_start_time = d.signup_start_time;
this.addForm.signup_end_time = d.signup_end_time;
this.addForm.if_message = Number(d.if_message);
this.addForm.if_auditing = String(d.if_auditing);
this.addForm.range = String(d.range);
this.addForm.number = String(d.number);
this.addForm.if_sign = String(d.if_sign);
this.addForm.custom_points = String(d.custom_points);
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.activity_name == '') {
this.$message.error('活动标题不能为空');
return;
}
if (this.addForm.activity_desc == '') {
this.$message.error('活动简介不能为空');
return;
}
if (this.addForm.activity_type == null) {
this.$message.error('活动类别不能为空');
return;
}
if (this.addForm.activity_image == '') {
this.$message.error('活动图片不能为空');
return;
}
if (this.addForm.activity_content == '') {
this.$message.error('活动详情不能为空');
return;
}
if (this.addForm.activity_start_time == '') {
this.$message.error('活动开始时间不能为空');
return;
}
if (this.addForm.activity_end_time == '') {
this.$message.error('活动结束时间不能为空');
return;
}
if (this.addForm.activity_type == 1 || this.addForm.activity_type == 4) {
if (this.addForm.signup_start_time == '') {
this.$message.error('报名开始时间不能为空');
return;
}
if (this.addForm.signup_end_time == '') {
this.$message.error('报名结束时间不能为空');
return;
}
}
if (this.addForm.activity_location == '') {
this.$message.error('活动地址不能为空');
return;
}
if (this.addForm.activity_type == 2 || this.addForm.activity_type == 3) {
this.addForm.signup_start_time = this.addForm.activity_start_time;
this.addForm.signup_end_time = this.addForm.activity_end_time;
}
console.log(this.addForm);
var url = '/activity/update';
this.addForm.video = this.activity_video;
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success('修改活动成功!');
this.$router.push({
path: '/activity'+this.addForm.activity_type+'/activity_index'+this.addForm.activity_type,
},500);
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="置顶活动列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增置顶</t-button> <t-button @click="add">新增置顶</t-button>
<t-table <t-table

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="轮播图管理" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增</t-button> <t-button @click="add">新增</t-button>
<t-table <t-table
@ -50,16 +50,15 @@
<t-form-item label="排序" name="weight"> <t-form-item label="排序" name="weight">
<t-input placeholder="请输入排序" v-model="addForm.weight"/> <t-input placeholder="请输入排序" v-model="addForm.weight"/>
</t-form-item> </t-form-item>
<t-form-item label="轮播图片"> <t-form-item label="轮播图片/视频">
<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="请选择单张图片/视频文件上传"
accept="image/*" accept="image/*,video/*"
:data="{association_id:this.association.association_id}" :data="{association_id:this.association.association_id}"
:showImageFileName="true" :showImageFileName="true"
:format-response="formatResponse" :format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload> ></t-upload>
</t-form-item> </t-form-item>
</t-form> </t-form>
@ -87,7 +86,7 @@ export default {
list: [], list: [],
columns: [ columns: [
{colKey: 'weight', title: '排序', align: 'center'}, {colKey: 'weight', title: '排序', align: 'center'},
{colKey: 'image', title: '图片', align: 'center'}, {colKey: 'image', title: '图片视频', align: 'center'},
{colKey: 'type', title: '类别', align: 'center'}, {colKey: 'type', title: '类别', align: 'center'},
{colKey: 'url', title: '跳转链接', align: 'center'}, {colKey: 'url', title: '跳转链接', align: 'center'},
{colKey: 'select', title: '操作', width: 200, align: 'center'}, {colKey: 'select', title: '操作', width: 200, align: 'center'},

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="关于我们" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-row> <t-row>
<t-col :span="6" :offset="3"> <t-col :span="6" :offset="3">
@ -11,7 +11,6 @@
theme="image" theme="image"
tips="请选择比例为11单张图片文件上传" tips="请选择比例为11单张图片文件上传"
accept="image/*" accept="image/*"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
:format-response="(response) => formatResponse(response, 0)" :format-response="(response) => formatResponse(response, 0)"
></t-upload> ></t-upload>
</t-form-item> </t-form-item>
@ -26,16 +25,16 @@
></t-upload> ></t-upload>
</t-form-item> </t-form-item>
<t-form-item label="协会名称" name="association_name"> <t-form-item label="协会名称" name="association_name">
<t-input size="large" placeholder="请输入协会名称" v-model="addForm.association_name"/> <t-input placeholder="请输入协会名称" v-model="addForm.association_name"/>
</t-form-item> </t-form-item>
<t-form-item label="协会地址" name="association_dizhi"> <t-form-item label="协会地址" name="association_dizhi">
<t-input size="large" placeholder="请输入协会地址" v-model="addForm.association_dizhi"/> <t-input placeholder="请输入协会地址" v-model="addForm.association_dizhi"/>
</t-form-item> </t-form-item>
<t-form-item label="协会邮箱" name="association_emal"> <t-form-item label="协会邮箱" name="association_emal">
<t-input size="large" placeholder="请输入协会邮箱" v-model="addForm.association_emal"/> <t-input placeholder="请输入协会邮箱" v-model="addForm.association_emal"/>
</t-form-item> </t-form-item>
<t-form-item label="联系方式" name="association_phone"> <t-form-item label="联系方式" name="association_phone">
<t-input size="large" placeholder="请输入联系方式" v-model="addForm.association_phone"/> <t-input placeholder="请输入联系方式" v-model="addForm.association_phone"/>
</t-form-item> </t-form-item>
<t-form-item label="协会简介" name="association_desc"> <t-form-item label="协会简介" name="association_desc">
<div style="border: 1px solid #ccc;"> <div style="border: 1px solid #ccc;">
@ -152,7 +151,6 @@ export default {
autoFocus: true, autoFocus: true,
MENU_CONF: { MENU_CONF: {
uploadImage: { uploadImage: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload', server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file', fieldName: 'file',
meta:{ meta:{

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="意见反馈列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-table <t-table
rowKey="index" rowKey="index"
@ -35,7 +35,7 @@ export default {
columns: [ columns: [
{colKey: 'name', title: '反馈人', align: 'center'}, {colKey: 'name', title: '反馈人', align: 'center'},
{colKey: 'phone', title: '联系方式', align: 'center'}, {colKey: 'phone', title: '联系方式', align: 'center'},
{colKey: 'text', title: '反馈内容', align: 'center'}, {colKey: 'content', title: '反馈内容', align: 'center'},
{colKey: 'createtime', title: '创建时间', align: 'center'}, {colKey: 'createtime', title: '创建时间', align: 'center'},
], ],
pagination: { pagination: {

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="管理员列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增</t-button> <t-button @click="add">新增</t-button>
<t-table <t-table

View File

@ -33,7 +33,6 @@
tips="请选择单张图片文件上传" tips="请选择单张图片文件上传"
accept="image/*" accept="image/*"
:format-response="formatResponse" :format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload> ></t-upload>
</t-form-item> </t-form-item>
<div style="width: 100%"></div> <div style="width: 100%"></div>
@ -145,7 +144,6 @@ export default {
autoFocus: true, autoFocus: true,
MENU_CONF: { MENU_CONF: {
uploadImage: { uploadImage: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload', server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file', fieldName: 'file',
meta:{ meta:{

View File

@ -1,167 +1,52 @@
<template> <template>
<div> <div>
<!-- <t-back-top--> <!-- <t-back-top-->
<!-- container=".tdesign-starter-layout"--> <!-- container=".tdesign-starter-layout"-->
<!-- :visible-height="0"--> <!-- :visible-height="0"-->
<!-- style="position: absolute"--> <!-- style="position: absolute"-->
<!-- :offset="['24px', '80px']"--> <!-- :offset="['24px', '80px']"-->
<!-- >--> <!-- >-->
<!-- <t-icon name="backtop" size="20px" />--> <!-- <t-icon name="backtop" size="20px" />-->
<!-- </t-back-top>--> <!-- </t-back-top>-->
<!-- 顶部 card --> <!-- 顶部 card -->
<!-- <top-panel class="row-container" />--> <top-panel class="row-container" />
<!-- &lt;!&ndash; 中部图表 &ndash;&gt;--> <!-- 中部图表 -->
<!-- <middle-chart class="row-container" />--> <middle-chart class="row-container" />
<!-- &lt;!&ndash; 列表排名 &ndash;&gt;--> <!-- 列表排名 -->
<!-- <rank-list class="row-container" />--> <rank-list class="row-container" />
<!-- &lt;!&ndash; 出入库概览 &ndash;&gt;--> <!-- 出入库概览 -->
<!-- <output-overview class="row-container" />--> <output-overview class="row-container" />
<div class="dashboard-detail">
<t-card title="待办事项" class="dashboard-detail-card" :bordered="false">
<t-row :gutter="[16, 16]">
<t-col v-for="(item, index) in list" :key="index" :xs="6" :xl="3">
<div @click="openDbUrl(index)">
<t-card :title="item.name" style="cursor: pointer;">
<div style="display: flex;justify-content: space-between;align-items: center">
<div style="font-size: 30px;color:#0052D9">{{ item.value }}</div>
<div>
<icon name="chevron-right-s" style=""/>
</div>
</div>
</t-card>
</div>
</t-col>
</t-row>
</t-card>
</div>
<div class="dashboard-detail" style="margin-top: 10px;">
<t-card title="账户信息" class="dashboard-detail-card" :bordered="false">
<t-row :gutter="[16, 16]">
<t-col v-for="(item, index) in user_list" :key="index" :xs="6" :xl="3">
<div @click="openDbUrlTwo(index)">
<t-card :title="item.name" style="cursor: pointer;">
<div style="display: flex;justify-content: space-between;align-items: center">
<div style="font-size: 30px;color:#0052D9">{{ item.value }}</div>
<div>
<icon name="chevron-right-s" style=""/>
</div>
</div>
</t-card>
</div>
</t-col>
</t-row>
</t-card>
</div>
</div> </div>
</template> </template>
<script lang="ts"> <script>
import {Icon} from 'tdesign-icons-vue'; import TopPanel from './components/TopPanel.vue';
import MiddleChart from './components/MiddleChart.vue';
import RankList from './components/RankList.vue';
import OutputOverview from './components/OutputOverview.vue';
export default { export default {
name: 'DashboardBase',
components: { components: {
Icon, TopPanel,
}, MiddleChart,
data() { RankList,
return { OutputOverview,
list: [
{name: '入会审核', value: '0'},
{name: '青企圈审核', value: '0'},
{name: '青企圈评论审核', value: '0'},
{name: '会员发票', value: '0'},
{name: '报名审核', value: '0'},
{name: '生日提醒', value: '0'},
{name: '会费逾期', value: '0'},
],
user_list: [
{name: '登陆日志', value: '0'},
{name: '操作日志', value: '0'},
{name: '短信余量', value: '0'},
{name: '已用空间', value: '0'},
]
}
}, },
mounted() { mounted() {
this.getInfo(); // var reload=localStorage.getItem('reload');
this.getInfoTwo(); // if(!reload){
this.getMsg(); // localStorage.setItem('reload', 1);
// setTimeout(() => {
// window.location.reload();
// }, 50);
// }
}, },
methods: { };
getMsg(){
this.$request
.post('/sending_message/duanxinCount')
.then((res) => {
var key=res.data.Response.SmsPackagesStatisticsSet[0];
this.user_list[2].value=key.CurrentUsage+'/'+key.PackageAmount;
})
.catch((e) => {
console.log(e);
});
},
getInfo(){
this.$request
.post('/index/todo')
.then((res) => {
console.log(res.data);
var d=res.data;
this.list[0].value=d.membershipReview;
this.list[1].value=d.YouthEnterpriseCircleAudit;
this.list[2].value=d.CommentModeration;
this.list[3].value=d.Membershipinvoice;
this.list[4].value=d.Registrationreview;
this.list[5].value=d.birthdays;
this.list[6].value=d.Overduemembershipfees;
})
.catch((e) => {
console.log(e);
});
},
getInfoTwo(){
this.$request
.post('/index/AccountInformation')
.then((res) => {
console.log(res.data);
var d=res.data;
this.user_list[0].value=d.AccessLog;
this.user_list[1].value=d.BackendLog;
//this.user_list[2].value=d.SMSmargin;
this.user_list[3].value=d.fileSize+' / '+d.Storagespace;
//this.user_list[4].value=d.formattedRemainingspace;
})
.catch((e) => {
console.log(e);
});
},
openDbUrlTwo(index){
if(index==0){
this.$router.push('/log/visit');
}else if(index==1){
this.$router.push('/log/operate');
}
},
openDbUrl(index) {
console.log(index);
if(index==0){
this.$router.push('/user/user_index_0');
}else if(index==1){
this.$router.push('/tweets/tweets_index/tweets_index1');
}else if(index==2){
this.$router.push('/tweets/pl_index/pl_index1');
}else if(index==3){
this.$router.push('/user_invoice/user_invoice3');
}else if(index==4){
this.$router.push('/activity1/activity_index1');
}else if(index==6){
this.$router.push('/user/user_index_3');
}
}
}
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.row-container { .row-container {
margin-bottom: 16px; margin-bottom: 16px;
} }
/deep/ .t-card__body { /deep/ .t-card__body {
padding-top: 0; padding-top: 0;
} }

View File

@ -1,77 +0,0 @@
<template>
<t-card title="操作日志列表" :bordered="false">
<div class="form-step-container">
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
</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">
export default {
data() {
return {
list: [],
pagination: {
page: 1,
size: 10,
total: 0,
},
columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'username', title: '操作帐号'},
{colKey: 'ip', title: '操作IP'},
{colKey: 'createtime', title: '操作时间'},
{colKey: 'title', title: '操作内容'},
{colKey: 'url', title: '操作URL', width: 200},
],
}
},
mounted() {
//this.member_id=this.$route.query.id;
this.getList();
},
methods: {
getList() {
this.$request
.post("/index/backendLog", {page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.data;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -1,76 +0,0 @@
<template>
<t-card title="登陆日志列表" :bordered="false">
<div class="form-step-container">
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
</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">
export default {
data() {
return {
list: [],
pagination: {
page: 1,
size: 10,
total: 0,
},
columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'username', title: '登陆帐号'},
{colKey: 'ip', title: '访问IP'},
{colKey: 'createtime', title: '访问时间'},
{colKey: 'if_login', title: '访问状态', width: 200},
],
}
},
mounted() {
//this.member_id=this.$route.query.id;
this.getList();
},
methods: {
getList() {
this.$request
.post("/index/loginLog", {page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.data;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -1,75 +0,0 @@
<template>
<t-card title="登陆日志列表" :bordered="false">
<div class="form-step-container">
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
</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">
export default {
data() {
return {
list: [],
pagination: {
page: 1,
size: 10,
total: 0,
},
columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'name', title: '登陆名称'},
{colKey: 'ip_code', title: '访问IP'},
{colKey: 'datetime', title: '访问时间'},
],
}
},
mounted() {
//this.member_id=this.$route.query.id;
this.getList();
},
methods: {
getList() {
this.$request
.post("/index/wxloginLog", {page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.data;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -1,284 +0,0 @@
<template>
<t-card title="添加新闻" :bordered="false">
<div class="form-step-container">
<!-- <t-dialog :header="isEdit?'编辑新闻':'新增新闻'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"-->
<!-- width="45%" top="20px">-->
<t-form >
<t-form-item label="文章标题" name="news_title">
<t-input size="large" placeholder="请输入文章标题" v-model="addForm.news_title"/>
</t-form-item>
<t-form-item label="简短标题" name="news_titleshort">
<t-input size="large" placeholder="请输入简短标题" v-model="addForm.news_titleshort"/>
</t-form-item>
<t-form-item label="所属类目" name="activity_location">
<t-select size="large" v-model="addForm.gory_id">
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item label="作者" name="news_auto">
<t-input size="large" placeholder="请输入作者" v-model="addForm.news_auto"/>
</t-form-item>
<t-form-item label="来源" name="news_source">
<t-input size="large" placeholder="请输入来源" v-model="addForm.news_source"/>
</t-form-item>
<t-form-item label="点击量" name="news_source">
<t-input size="large" placeholder="请输入自定义点击量" v-model="addForm.news_hits"/>
</t-form-item>
<t-form-item label="微信文章链接" name="wx_url">
<t-input size="large" placeholder="请输入微信文章链接" v-model="addForm.wx_url"/>
</t-form-item>
<t-form-item label="新闻内容" name="news_content">
<div style="border: 1px solid #ccc;z-index: 99">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 400px;"
v-model="addForm.news_content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="新闻主图">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.news_image_show"
theme="image"
tips="请选择单张图片文件上传"
accept="image/*"
:format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload>
</t-form-item>
<t-form-item
label="展示时间"
name="days">
<t-date-picker size="large" :style="{ width: '200px' }" :clearable="true" placeholder="展示时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.showtime"></t-date-picker>
</t-form-item>
</t-form>
<div style="padding: 50px 0px;text-align: center">
<t-button size="large" @click="onSubmit">提交</t-button>
</div>
</div>
</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 {
visible: false,
infoMode: false,
ser:{
news_title:'',
gory_id:'',
},
addForm: {
news_title: '',
news_titleshort: '',
gory_id: null,
news_auto: '',
news_source: '',
news_content: '',
news_image: '',
news_image_show:[],
showtime:'',
news_hits:0,
wx_url:'',
},
addMode: false,
isEdit: false,
editID: 0,
gory_list:[],
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 1 * 1024 * 1024,
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, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('图片限制为1M请调整好再上传', 2000);
}
},
},
uploadVideo: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
customInsert(res: any, insertFn: InsertFnType) { // TS
// customInsert(res, insertFn) { // JS
// res
console.log(res);
// res url alt href
insertFn(res.data.fullurl, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('视频限制为50M请调整好再上传', 2000);
}
},
}
}
},
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() //
},
mounted() {
//this.member_id=this.$route.query.id;
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.id;
this.getGory();
},
methods: {
formatResponse(res) {
console.log(res);
this.addForm.news_image = res.data.url;
return {url: res.data.fullurl};
},
onCreated(editor) {
this.editor = Object.seal(editor);
},
edit(d) {
console.log(d);
this.addForm.news_id = d.news_id;
this.addForm.news_title = d.news_title;
this.addForm.news_titleshort = d.news_titleshort;
this.addForm.news_image_show = [{url: store.state.user.apiUrl + d.news_image}];
this.addForm.news_image = d.news_image;
this.addForm.gory_id = d.gory_id;
this.addForm.news_auto = d.news_auto;
this.addForm.news_source = d.news_source;
this.addForm.news_content = d.news_content;
this.addForm.showtime = d.showtime
this.addForm.news_hits = d.news_hits;
this.addForm.wx_url=d.wx_url;
this.addMode = true;
this.isEdit = true;
},
getGory(){
this.$request
.post("/gory/index")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.gory_list=res.data;
}
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.news_title == '') {
this.$message.error('新闻标题不能为空');
return;
}
if (this.addForm.news_titleshort == '') {
this.$message.error('简短标题不能为空');
return;
}
if (this.addForm.gory_id == null) {
this.$message.error('请选择新闻分类');
return;
}
if (this.addForm.news_auto == '') {
this.$message.error('作者不能为空');
return;
}
if (this.addForm.news_source == '') {
this.$message.error('来源不能为空');
return;
}
// if (this.addForm.news_content == '') {
// this.$message.error('');
// return;
// }
if (this.addForm.news_image=='') {
this.$message.error('新闻主图不能为空');
return;
}
if (this.addForm.showtime=='') {
this.$message.error('展示时间不能为空');
return;
}
var url = '/news/add';
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success(res.msg);
setTimeout(()=>{
this.$router.push({
path: '/news/news_index',
},500);
})
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
this.infoMode = false;
}
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,300 +0,0 @@
<template>
<t-card title="编辑新闻" :bordered="false">
<div class="form-step-container">
<!-- <t-dialog :header="isEdit?'编辑新闻':'新增新闻'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"-->
<!-- width="45%" top="20px">-->
<t-form >
<t-form-item label="文章标题" name="news_title">
<t-input size="large" placeholder="请输入文章标题" v-model="addForm.news_title"/>
</t-form-item>
<t-form-item label="简短标题" name="news_titleshort">
<t-input size="large" placeholder="请输入简短标题" v-model="addForm.news_titleshort"/>
</t-form-item>
<t-form-item label="所属类目" name="activity_location">
<t-select size="large" v-model="addForm.gory_id">
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item label="作者" name="news_auto">
<t-input size="large" placeholder="请输入作者" v-model="addForm.news_auto"/>
</t-form-item>
<t-form-item label="来源" name="news_source">
<t-input size="large" placeholder="请输入来源" v-model="addForm.news_source"/>
</t-form-item>
<t-form-item label="点击量" name="news_source">
<t-input size="large" placeholder="请输入自定义点击量" v-model="addForm.news_hits"/>
</t-form-item>
<t-form-item label="微信文章链接" name="wx_url">
<t-input size="large" placeholder="请输入微信文章链接" v-model="addForm.wx_url"/>
</t-form-item>
<t-form-item label="新闻内容" name="news_content">
<div style="border: 1px solid #ccc;z-index: 99">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 400px;"
v-model="addForm.news_content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="新闻主图">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.news_image_show"
theme="image"
tips="请选择单张图片文件上传"
accept="image/*"
:format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload>
</t-form-item>
<t-form-item
label="展示时间"
name="days">
<t-date-picker size="large" :style="{ width: '200px' }" :clearable="true" placeholder="展示时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.showtime"></t-date-picker>
</t-form-item>
</t-form>
<div style="padding: 50px 0px;text-align: center">
<t-button size="large" @click="onSubmit">提交</t-button>
</div>
</div>
</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 {
visible: false,
infoMode: false,
ser:{
news_title:'',
gory_id:'',
},
addForm: {
news_title: '',
news_titleshort: '',
gory_id: null,
news_auto: '',
news_source: '',
news_content: '',
news_image: '',
news_image_show:[],
showtime:'',
news_hits:0,
wx_url:'',
},
addMode: false,
isEdit: false,
editID: 0,
gory_list:[],
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 1 * 1024 * 1024,
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, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('图片限制为1M请调整好再上传', 2000);
}
},
},
uploadVideo: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
customInsert(res: any, insertFn: InsertFnType) { // TS
// customInsert(res, insertFn) { // JS
// res
console.log(res);
// res url alt href
insertFn(res.data.fullurl, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('视频限制为50M请调整好再上传', 2000);
}
},
}
}
},
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() //
},
mounted() {
//this.member_id=this.$route.query.id;
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.id;
this.getGory();
if (typeof (this.$route.query.id) !== 'undefined') {
console.log(this.$route.query);
this.editID = this.$route.query.id;
this.getNewsInfo();
}
},
methods: {
getNewsInfo(){
this.$request
.post('/news/find', {news_id: this.editID})
.then((res) => {
this.edit(res.data);
})
.catch((e) => {
console.log(e);
});
},
formatResponse(res) {
console.log(res);
this.addForm.news_image = res.data.url;
return {url: res.data.fullurl};
},
onCreated(editor) {
this.editor = Object.seal(editor);
},
edit(d) {
console.log(d);
this.addForm.news_id = d.news_id;
this.addForm.news_title = d.news_title;
this.addForm.news_titleshort = d.news_titleshort;
this.addForm.news_image_show = [{url: store.state.user.apiUrl + d.news_image}];
this.addForm.news_image = d.news_image;
this.addForm.gory_id = d.gory_id;
this.addForm.news_auto = d.news_auto;
this.addForm.news_source = d.news_source;
this.addForm.news_content = d.news_content;
this.addForm.showtime = d.showtime
this.addForm.news_hits = d.news_hits;
this.addForm.wx_url=d.wx_url;
this.addMode = true;
this.isEdit = true;
},
getGory(){
this.$request
.post("/gory/index")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.gory_list=res.data;
}
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.news_title == '') {
this.$message.error('新闻标题不能为空');
return;
}
if (this.addForm.news_titleshort == '') {
this.$message.error('简短标题不能为空');
return;
}
if (this.addForm.gory_id == null) {
this.$message.error('请选择新闻分类');
return;
}
if (this.addForm.news_auto == '') {
this.$message.error('作者不能为空');
return;
}
if (this.addForm.news_source == '') {
this.$message.error('来源不能为空');
return;
}
// if (this.addForm.news_content == '') {
// this.$message.error('');
// return;
// }
if (this.addForm.news_image=='') {
this.$message.error('新闻主图不能为空');
return;
}
if (this.addForm.showtime=='') {
this.$message.error('展示时间不能为空');
return;
}
var url = '/news/update';
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success(res.msg);
setTimeout(()=>{
this.$router.push({
path: '/news/news_index',
},500);
})
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
this.infoMode = false;
}
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,36 +1,7 @@
<template> <template>
<t-card title="新闻列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-form <t-button @click="add">新增</t-button>
ref="form"
:data="ser"
:label-width="80"
@submit="onSubmit"
>
<t-row>
<!-- <t-form-item name="nikename">-->
<!-- <t-button @click="add">添加新闻</t-button>-->
<!-- </t-form-item>-->
<t-form-item label="标题">
<t-input
v-model="ser.news_title"
class="form-item-content"
type="search"
placeholder="请输入标题"
style="width: 150px"
/>
</t-form-item>
<t-form-item label="所属类目" style="margin-left: 20px;">
<t-select v-model="ser.gory_id">
<t-option :key="0" label="全部" value=""></t-option>
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item name="nikename">
<t-button theme="warning" @click="serDo" style="margin-left: 20px">搜索</t-button>
</t-form-item>
</t-row>
</t-form>
<t-table <t-table
rowKey="index" rowKey="index"
:data="list" :data="list"
@ -65,7 +36,68 @@
></t-pagination> ></t-pagination>
</div> </div>
</div> </div>
<t-dialog :header="isEdit?'编辑新闻':'新增新闻'" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"
width="45%" top="20px">
<t-form>
<t-form-item label="文章标题" name="news_title">
<t-input placeholder="请输入文章标题" v-model="addForm.news_title"/>
</t-form-item>
<t-form-item label="简短标题" name="news_titleshort">
<t-input placeholder="请输入简短标题" v-model="addForm.news_titleshort"/>
</t-form-item>
<t-form-item label="所属类目" name="activity_location">
<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-select>
</t-form-item>
<t-form-item label="作者" name="news_auto">
<t-input placeholder="请输入作者" v-model="addForm.news_auto"/>
</t-form-item>
<t-form-item label="来源" name="news_source">
<t-input placeholder="请输入来源" v-model="addForm.news_source"/>
</t-form-item>
<t-form-item label="点击量" name="news_source">
<t-input placeholder="请输入自定义点击量" v-model="addForm.news_hits"/>
</t-form-item>
<t-form-item label="新闻内容" name="news_content">
<div style="border: 1px solid #ccc;z-index: 99">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 200px"
v-model="addForm.news_content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="新闻主图">
<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>
<t-form-item
label="展示时间"
name="days">
<t-date-picker :style="{ width: '200px' }" :clearable="true" placeholder="展示时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.showtime"></t-date-picker>
</t-form-item>
</t-form>
</t-dialog>
</t-card> </t-card>
</template> </template>
@ -79,10 +111,6 @@ export default {
return { return {
visible: false, visible: false,
infoMode: false, infoMode: false,
ser:{
news_title:'',
gory_id:'',
},
addForm: { addForm: {
news_title: '', news_title: '',
news_titleshort: '', news_titleshort: '',
@ -94,7 +122,6 @@ 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,
@ -134,7 +161,6 @@ export default {
autoFocus: true, autoFocus: true,
MENU_CONF: { MENU_CONF: {
uploadImage: { uploadImage: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload', server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file', fieldName: 'file',
meta:{ meta:{
@ -180,10 +206,6 @@ export default {
this.getGory(); this.getGory();
}, },
methods: { methods: {
serDo(){
this.pagination.page = 1;
this.getList();
},
onCurrentChange(d) { onCurrentChange(d) {
this.pagination.page = d; this.pagination.page = d;
this.getList(); this.getList();
@ -261,32 +283,27 @@ export default {
news_image_show:[], news_image_show:[],
showtime:'', showtime:'',
news_hits:0, news_hits:0,
wx_url:'',
}; };
}, },
edit(d) { edit(d) {
// console.log(d); console.log(d);
// this.addForm.news_id = d.news_id; this.addForm.news_id = d.news_id;
// this.addForm.news_title = d.news_title; this.addForm.news_title = d.news_title;
// this.addForm.news_titleshort = d.news_titleshort; this.addForm.news_titleshort = d.news_titleshort;
// this.addForm.news_image_show = [{url: store.state.user.apiUrl + d.news_image}]; this.addForm.news_image_show = [{url: store.state.user.apiUrl + d.news_image}];
// this.addForm.news_image = d.news_image; this.addForm.news_image = d.news_image;
// this.addForm.gory_id = d.gory_id; this.addForm.gory_id = d.gory_id;
// this.addForm.news_auto = d.news_auto; this.addForm.news_auto = d.news_auto;
// this.addForm.news_source = d.news_source; this.addForm.news_source = d.news_source;
// 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;
this.$router.push({
path: '/news/news_edit?id=' + d.news_id
});
}, },
getList() { getList() {
this.$request this.$request
.post("/news", {page: this.pagination.page, size: this.pagination.size,gory_id:this.ser.gory_id,news_title:this.ser.news_title}) .post("/news", {page: this.pagination.page, size: this.pagination.size})
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code == 1) {
@ -334,10 +351,10 @@ export default {
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;

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="新闻类目列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增</t-button> <t-button @click="add">新增</t-button>
<t-table <t-table
@ -47,7 +47,6 @@ export default {
editID:0, editID:0,
list: [], list: [],
columns: [ columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'weigh', title: '排序'}, {colKey: 'weigh', title: '排序'},
{colKey: 'name', title: '类目名称'}, {colKey: 'name', title: '类目名称'},
{colKey: 'createtime', title: '添加时间'}, {colKey: 'createtime', title: '添加时间'},

View File

@ -160,7 +160,6 @@ export default {
autoFocus: true, autoFocus: true,
MENU_CONF: { MENU_CONF: {
uploadImage: { uploadImage: {
maxFileSize: 50 * 1024 * 1024,
//server: store.state.user.apiUrl + '/api/wx_news/wxuploadimg', //server: store.state.user.apiUrl + '/api/wx_news/wxuploadimg',
server:'/api/wx_news/wxuploadimg', server:'/api/wx_news/wxuploadimg',
fieldName: 'file', fieldName: 'file',

View File

@ -1,75 +0,0 @@
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
: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', width: 300},
{colKey: 'phone', title: '联系方式', align: 'center'},
{colKey: 'text', title: '内容', align: 'center'},
{colKey: 'createtime', title: '留言时间', align: 'center'},
],
pagination: {
page: 1,
size: 10,
total: 0,
},
}
},
mounted() {
this.getList();
},
methods: {
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
getList() {
this.$request
.post("/pc_leave_message/index", {page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.ret;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>

View File

@ -1,353 +0,0 @@
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-form
ref="form"
:data="ser"
:label-width="80"
@submit="onSubmit"
>
<t-row>
<t-form-item name="nikename">
<t-button @click="add">添加新闻</t-button>
</t-form-item>
<t-form-item label="标题">
<t-input
v-model="ser.title"
class="form-item-content"
type="search"
placeholder="请输入标题"
style="width: 150px"
/>
</t-form-item>
<t-form-item label="所属类目" style="margin-left: 20px;">
<t-select v-model="ser.category_id">
<t-option :key="0" label="全部" value=""></t-option>
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.category_name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item name="nikename">
<t-button theme="warning" @click="serDo" style="margin-left: 20px">搜索</t-button>
</t-form-item>
</t-row>
</t-form>
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
:pagination="pagination"
>
<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>
<template #top="{ row }">
<t-button theme="success" size="small" v-if="row.if_recommend==1" @click="topNews(row)">点击置顶</t-button>
<t-button theme="warning" size="small" v-if="row.if_recommend==2" @click="topNewsDel(row)">取消置顶</t-button>
</template>
</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";
import {Editor, Toolbar} from '@wangeditor/editor-for-vue';
export default {
components: {Editor, Toolbar},
data() {
return {
visible: false,
infoMode: false,
ser:{
title:'',
category_id:'',
},
addForm: {
title: '',
category_id: null,
article_source: '',
content: '',
image: '',
image_show:[],
number_of_views:0,
display_time:'',
wx_url:'',
},
addMode: false,
isEdit: false,
editID: 0,
list: [],
gory_list:[],
columns: [
{colKey: 'title', title: '新闻标题', align: 'center', width: 300},
{colKey: 'category_name', title: '所属类目', align: 'center'},
{colKey: 'number_of_views', title: '点击量', align: 'center'},
{colKey: 'article_source', title: '来源', align: 'center'},
{colKey: 'display_time', title: '展示时间', align: 'center'},
// {colKey: 'top', title: '', align: 'center'},
{colKey: 'select', title: '操作', width: 200, align: 'center'},
],
pagination: {
page: 1,
size: 10,
total: 0,
},
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 50 * 1024 * 1024,
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, '', '')
},
onError:(file, err, res)=>{
if(err.message.indexOf('exceeds maximum allowed size') !== -1){
this.$message.error('限制为50M请调整好再上传',2000);
}
},
},
uploadVideo: {
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
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() {
//this.member_id=this.$route.query.id;
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.id;
this.getList();
this.getGory();
},
methods: {
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
formatResponse(res) {
console.log(res);
this.addForm.image = res.data.url;
return {url: res.data.fullurl};
},
onCreated(editor) {
this.editor = Object.seal(editor);
},
del(d) {
console.log(d);
this.$request
.post('/pc_news/articledel', {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={
title: '',
category_id: null,
article_source: '',
content: '',
image: '',
image_show:[],
number_of_views:0,
display_time:'',
wx_url:'',
};
},
edit(d) {
this.$router.push({
path: '/pc/pc_news_edit?id=' + d.id,
});
},
serDo(){
this.pagination.page=1;
this.getList();
},
getList() {
this.$request
.post("/pc_news/article", {page: this.pagination.page, size: this.pagination.size,...this.ser})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.ret;
this.pagination.total = res.data.count;
}else{
this.list = [];
this.pagination.total =0;
}
})
.catch((e) => {
console.log(e);
});
},
getGory(){
this.$request
.post("/pc/pc_news/gory")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.gory_list=res.data;
}
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.title == '') {
this.$message.error('新闻标题不能为空');
return;
}
if (this.addForm.category_id == null) {
this.$message.error('请选择新闻分类');
return;
}
if (this.addForm.article_source == '') {
this.$message.error('来源不能为空');
return;
}
// if (this.addForm.content == '') {
// this.$message.error('');
// return;
// }
if (this.addForm.image=='') {
this.$message.error('新闻主图不能为空');
return;
}
var url = '/pc_news/articleadd';
if (this.isEdit) {
url = '/pc_news/articleupdate';
}
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);
});
},
topNews(row){
console.log(row);
this.$request
.post('/common/listtopping', {id: row.id,type:'pcactivity'})
.then((res) => {
if (res.code == 1) {
this.$message.success('置顶成功');
this.getList();
} else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
topNewsDel(row){
console.log(row);
this.$request
.post('/common/listcancel', {id: row.id,type:'pcactivity'})
.then((res) => {
if (res.code == 1) {
this.$message.success('取消置顶成功');
this.getList();
} else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
this.infoMode = false;
}
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,251 +0,0 @@
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-form>
<t-form-item label="文章标题" name="news_title">
<t-input size="large" placeholder="请输入文章标题" v-model="addForm.title"/>
</t-form-item>
<t-form-item label="所属类目" name="activity_location">
<t-select size="large" v-model="addForm.category_id">
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.category_name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item label="来源" name="news_source">
<t-input size="large" placeholder="请输入来源" v-model="addForm.article_source"/>
</t-form-item>
<t-form-item label="点击量" name="news_source">
<t-input size="large" placeholder="请输入自定义点击量" v-model="addForm.number_of_views"/>
</t-form-item>
<t-form-item label="微信文章链接" name="wx_url">
<t-input size="large" placeholder="请输入微信文章链接" v-model="addForm.wx_url"/>
</t-form-item>
<t-form-item label="新闻内容" name="news_content">
<div style="border: 1px solid #ccc;z-index: 99">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 400px"
v-model="addForm.content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="新闻主图">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.image_show"
theme="image"
tips="请选择单张图片文件上传"
accept="image/*"
:format-response="formatResponse"
></t-upload>
</t-form-item>
<t-form-item
label="展示时间"
name="days">
<t-date-picker size="large" :style="{ width: '200px' }" :clearable="true" placeholder="展示时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.display_time"></t-date-picker>
</t-form-item>
</t-form>
<div style="padding: 50px 0px;text-align: center">
<t-button size="large" @click="onSubmit">提交</t-button>
</div>
</div>
</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: {
title: '',
category_id: null,
article_source: '',
content: '',
image: '',
image_show:[],
number_of_views:0,
display_time:'',
wx_url:'',
},
addMode: false,
isEdit: false,
editID: 0,
gory_list:[],
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 1 * 1024 * 1024,
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, '', '')
},
onError:(file, err, res)=>{
if(err.message.indexOf('exceeds maximum allowed size') !== -1){
this.$message.error('图片限制为1M请调整好再上传',2000);
}
},
},
uploadVideo: {
maxFileSize: 1 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
customInsert(res: any, insertFn: InsertFnType) { // TS
// customInsert(res, insertFn) { // JS
// res
console.log(res);
// res url alt href
insertFn(res.data.fullurl, '', '')
},
onError:(file, err, res)=>{
if(err.message.indexOf('exceeds maximum allowed size') !== -1){
this.$message.error('视频限制为50M请调整好再上传',2000);
}
},
}
}
},
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() //
},
mounted() {
//this.member_id=this.$route.query.id;
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.id;
this.getGory();
},
methods: {
formatResponse(res) {
console.log(res);
this.addForm.image = res.data.url;
return {url: res.data.fullurl};
},
onCreated(editor) {
this.editor = Object.seal(editor);
},
edit(d) {
console.log(d);
this.addForm.id = d.id;
this.addForm.title = d.title;
this.addForm.image_show = [{url: store.state.user.apiUrl + d.image}];
this.addForm.image = d.image;
this.addForm.category_id = d.category_id;
this.addForm.article_source = d.article_source;
this.addForm.content = d.content;
this.addForm.number_of_views = d.number_of_views;
this.addForm.display_time=d.display_time;
this.addForm.wx_url=d.wx_url;
this.addMode = true;
this.isEdit = true;
},
getGory(){
this.$request
.post("/pc/pc_news/gory")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.gory_list=res.data;
}
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.title == '') {
this.$message.error('新闻标题不能为空');
return;
}
if (this.addForm.category_id == null) {
this.$message.error('请选择新闻分类');
return;
}
if (this.addForm.article_source == '') {
this.$message.error('来源不能为空');
return;
}
// if (this.addForm.content == '') {
// this.$message.error('');
// return;
// }
if (this.addForm.image=='') {
this.$message.error('新闻主图不能为空');
return;
}
var url = '/pc_news/articleadd';
if (this.isEdit) {
url = '/pc_news/articleupdate';
}
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success(res.msg);
setTimeout(()=>{
this.$router.push({
path: '/pc/pc_news',
},500);
})
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,294 +0,0 @@
<script setup lang="ts">
</script>
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-form>
<t-form-item label="文章标题" name="news_title">
<t-input size="large" placeholder="请输入文章标题" v-model="addForm.title"/>
</t-form-item>
<t-form-item label="所属类目" name="activity_location">
<t-select size="large" v-model="addForm.category_id">
<t-option v-for="(item,index) in gory_list" :key="index" :label="item.category_name" :value="item.id" />
</t-select>
</t-form-item>
<t-form-item label="来源" name="news_source">
<t-input size="large" placeholder="请输入来源" v-model="addForm.article_source"/>
</t-form-item>
<t-form-item label="点击量" name="news_source">
<t-input size="large" placeholder="请输入自定义点击量" v-model="addForm.number_of_views"/>
</t-form-item>
<t-form-item label="微信文章链接" name="wx_url">
<t-input size="large" placeholder="请输入微信文章链接" v-model="addForm.wx_url"/>
</t-form-item>
<t-form-item label="新闻内容" name="news_content">
<div style="border: 1px solid #ccc;z-index: 99">
<!-- 工具栏 -->
<Toolbar
style="border-bottom: 1px solid #ccc"
mode="default"
:editor="editor"
:defaultConfig="toolbarConfig"
/>
<Editor
style="height: 200px"
v-model="addForm.content"
:defaultConfig="editorConfig"
mode="default"
@onCreated="(e) => onCreated(e)"
/>
</div>
</t-form-item>
<t-form-item label="新闻主图">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.image_show"
theme="image"
tips="请选择单张图片文件上传"
accept="image/*"
:format-response="formatResponse"
:sizeLimit="{ size: 500, unit: 'KB', message: '图片大小不超过500KB' }"
></t-upload>
</t-form-item>
<t-form-item
label="展示时间"
name="days">
<t-date-picker size="large" :style="{ width: '200px' }" :clearable="true" placeholder="展示时间"
:enableTimePicker="true" :allow-input="false"
v-model="addForm.display_time"></t-date-picker>
</t-form-item>
</t-form>
<div style="padding: 50px 0px;text-align: center">
<t-button size="large" @click="onSubmit">提交</t-button>
</div>
</div>
</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 {
visible: false,
infoMode: false,
ser:{
news_title:'',
gory_id:'',
},
addForm: {
news_title: '',
news_titleshort: '',
gory_id: null,
news_auto: '',
news_source: '',
news_content: '',
news_image: '',
news_image_show:[],
showtime:'',
news_hits:0,
wx_url:'',
},
addMode: false,
isEdit: false,
editID: 0,
gory_list:[],
editor: null,
toolbarConfig: {
showLinkImg: false,
uploadImgShowBase64: true,
excludeKeys: [
'insertVideo', //
'insertImage',//
'insertLink',//
'insertTable',//
'codeBlock',//
]
},
editorConfig: {
placeholder: '',
readOnly: false, //
autoFocus: true,
MENU_CONF: {
uploadImage: {
maxFileSize: 1 * 1024 * 1024,
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, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('图片限制为1M请调整好再上传', 2000);
}
},
},
uploadVideo: {
maxFileSize: 50 * 1024 * 1024,
server: store.state.user.apiUrl + '/api/common/upload',
fieldName: 'file',
customInsert(res: any, insertFn: InsertFnType) { // TS
// customInsert(res, insertFn) { // JS
// res
console.log(res);
// res url alt href
insertFn(res.data.fullurl, '', '')
},
onError: (file, err, res) => {
console.log(err);
if (err.message.indexOf('exceeds maximum allowed size') !== -1) {
this.$message.error('视频限制为50M请调整好再上传', 2000);
}
},
}
}
},
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() //
},
mounted() {
//this.member_id=this.$route.query.id;
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.id;
if (typeof (this.$route.query.id) !== 'undefined') {
console.log(this.$route.query);
this.editID = this.$route.query.id;
this.getActInfo();
}
this.getGory();
},
methods: {
getActInfo(){
this.$request
.post('/pc_news/articlefind', {id: this.editID})
.then((res) => {
console.log(res);
this.edit(res.data);
})
.catch((e) => {
console.log(e);
});
},
formatResponse(res) {
console.log(res);
this.addForm.news_image = res.data.url;
return {url: res.data.fullurl};
},
onCreated(editor) {
this.editor = Object.seal(editor);
},
edit(d) {
console.log(d);
this.addForm.id = d.id;
this.addForm.title = d.title;
this.addForm.image_show = [{url: store.state.user.apiUrl + d.image}];
this.addForm.image = d.image;
this.addForm.category_id = d.category_id;
this.addForm.article_source = d.article_source;
this.addForm.content = d.content;
this.addForm.number_of_views = d.number_of_views;
this.addForm.display_time=d.display_time;
this.addForm.wx_url=d.wx_url;
this.addMode = true;
this.isEdit = true;
},
getGory(){
this.$request
.post("/gory/index")
.then((res) => {
console.log(res);
if (res.code == 1) {
this.gory_list=res.data;
}
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
console.log(this.addForm);
if (this.addForm.news_title == '') {
this.$message.error('新闻标题不能为空');
return;
}
if (this.addForm.news_titleshort == '') {
this.$message.error('简短标题不能为空');
return;
}
if (this.addForm.gory_id == null) {
this.$message.error('请选择新闻分类');
return;
}
if (this.addForm.news_auto == '') {
this.$message.error('作者不能为空');
return;
}
if (this.addForm.news_source == '') {
this.$message.error('来源不能为空');
return;
}
// if (this.addForm.news_content == '') {
// this.$message.error('');
// return;
// }
if (this.addForm.news_image=='') {
this.$message.error('新闻主图不能为空');
return;
}
if (this.addForm.showtime=='') {
this.$message.error('展示时间不能为空');
return;
}
var url = '/news/update';
this.addForm.id=this.editID
this.$request
.post(url, this.addForm)
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success(res.msg);
setTimeout(()=>{
this.$router.push({
path: '/pc/pc_news',
},500);
})
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
this.infoMode = false;
}
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>

View File

@ -1,129 +0,0 @@
<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="类目管理" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit">
<t-form>
<t-form-item label="类目名称" name="name">
<t-input placeholder="请输入类目名称" v-model="category_name"/>
</t-form-item>
</t-form>
</t-dialog>
</t-card>
</template>
<script lang="ts">
export default {
data() {
return {
category_name: '',
addMode: false,
isEdit: false,
editID:0,
list: [],
columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'category_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('/pc_news/gorydeletetime',{id:d.id})
// .then((res) => {
// if(res.code==1){
// this.$message.success('');
// this.getList();
// }else {
// this.$message.error(res.msg);
// }
// console.log(res);
// })
// .catch((e) => {
// console.log(e);
// });
// },
add(){
this.category_name= '';
this.addMode=true;
this.isEdit=false;
},
edit(d){
this.editID=d.id;
this.category_name=d.category_name;
this.addMode=true;
this.isEdit=true;
},
getList() {
this.$request
.post("/pc/pc_news/gory")
.then((res) => {
console.log(res);
this.list = res.data;
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
if (this.category_name == '') {
this.$message.error('类目名称不能为空');
return;
}
var url='/pc_news/goryadd';
if(this.isEdit){
url='/pc_news/goryupdate';
}
this.$request
.post(url,{category_name:this.category_name,id:this.editID})
.then((res) => {
if(res.code==1){
this.$message.success('操作成功!');
this.addMode=false;
this.getList();
}else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
onCloseMy() {
this.addMode = false;
}
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -1,171 +0,0 @@
<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 #image="{ row }">
<img :src="$store.state.user.apiUrl+row.image" style="width: 200px">
</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="weight">
<t-input placeholder="请输入排序" v-model="addForm.wight"/>
</t-form-item>
<t-form-item label="轮播图片">
<t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.image_show"
tips="请选择单张图片"
theme="image"
accept="image/*"
:data="{association_id:this.association.association_id}"
: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: {
image: '',
image_show:[],
wight:0
},
addMode: false,
isEdit: false,
editID: 0,
list: [],
columns: [
{colKey: 'wight', title: '排序', align: 'center'},
{colKey: 'image', title: '图片视频', align: 'center'},
{colKey: 'select', title: '操作', width: 200, align: 'center'},
],
association:{}
}
},
mounted() {
//this.member_id=this.$route.query.id;
if(typeof (store.state.user.association)=='object'){
this.association=store.state.user.association;
}else{
this.association=JSON.parse(store.state.user.association);
}
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('/pc_image/delete', {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={
image_show: [],
image: '',
wight: '',
};
},
edit(d) {
console.log(d);
this.addForm.image_show = [{url: store.state.user.apiUrl + d.image,name:d.image}];
this.addForm.image = d.image;
this.addForm.id = d.id;
this.addForm.wight = d.wight;
this.addMode = true;
this.isEdit = true;
},
getList() {
this.$request
.post("/pc_image/index")
.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.image=='') {
this.$message.error('轮播图内容不能为空');
return;
}
var url = '/pc_image/add';
if (this.isEdit) {
url = '/pc_image/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>

View File

@ -1,248 +0,0 @@
<template>
<t-card title="用户积分列表" :bordered="false">
<div class="form-step-container">
<t-form
ref="form"
:data="formData"
:label-width="80"
@submit="onSubmit"
:style="{ marginBottom: '30px' }"
>
<t-row>
<t-form-item label="会员姓名" name="nikename">
<t-input
v-model="formData.nikename"
class="form-item-content"
type="search"
placeholder="请输入会员姓名"
style="width: 150px"
/>
</t-form-item>
<!-- <t-form-item label="手机号" name="phone">-->
<!-- <t-input-->
<!-- v-model="formData.phone"-->
<!-- class="form-item-content"-->
<!-- placeholder="请输入手机号" style="width: 150px"-->
<!-- />-->
<!-- </t-form-item>-->
<div>
<t-space>
<t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button>
</t-space>
</div>
</t-row>
</t-form>
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
<template #photo_image="{ row }">
<img v-if="row.photo_image" :src="$store.state.user.apiUrl+row.photo_image" style="width: 50px;height: 50px">
</template>
<template #select="{ row }">
<t-space size="24px">
<t-button theme="default" @click="openInfoMode(row)">积分明细</t-button>
<t-button theme="primary" @click="openAddMode(row)">加减积分</t-button>
</t-space>
</template>
</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-dialog header="加减积分" :visible="addMode" :onClose="onCloseMy" @confirm="AddonSubmit">
<t-form>
<t-form-item label="用户" name="nikename">
<t-input placeholder="用户" disabled="" v-model="addInfo.nikename"/>
</t-form-item>
<t-form-item label="积分分值" name="points_number">
<t-input placeholder="请输入积分分值" type="number" v-model="addFrom.number"/>
</t-form-item>
<t-form-item label="操作类型" name="type">
<t-select v-model="addFrom.type">
<t-option label="增加积分" :value="1"></t-option>
<t-option label="扣除积分" :value="2"></t-option>
</t-select>
</t-form-item>
<t-form-item label="操作备注" name="desc">
<t-input placeholder="请输入操作备注" v-model="addFrom.content"/>
</t-form-item>
</t-form>
</t-dialog>
<t-dialog header="积分明细" :confirmBtn="null" :visible="InfoMode" :onClose="onCloseMy"
width="65%" top="50px">
<div>
<t-table
rowKey="index"
:data="InfoList"
:columns="columnsInfo"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
>
<template #type="{ row }">
<t-space size="24px">
<t-tag v-if="row.type==1" theme="success">增加</t-tag>
<t-tag v-if="row.type==2" theme="danger">扣除</t-tag>
</t-space>
</template>
</t-table>
<div style="margin-top: 30px">
<t-pagination
:total="paginationInfo.total"
:page-size="paginationInfo.size"
@current-change="onCurrentChangeInfo"
:showPageSize="false"
></t-pagination>
</div>
</div>
</t-dialog>
</t-card>
</template>
<script lang="ts">
export default {
data() {
return {
list: [],
pagination: {
page: 1,
size: 10,
total: 0,
},
addFrom:{
number:'',
type:1,
content:'',
member_id:0,
},
addMode:false,
formData:{
nikename:'',
phone:'',
},
addInfo:{},
columns: [
{colKey: 'id', title: 'ID'},
{colKey: 'photo_image', title: '证件照'},
{colKey: 'nikename', title: '姓名'},
{colKey: 'phone', title: '手机号'},
{colKey: 'points_number', title: '积分'},
{colKey: 'select', title: '操作', width: 200},
],
columnsInfo: [
{colKey: 'id', title: 'ID'},
{colKey: 'number', title: '积分'},
{colKey: 'type', title: '类型'},
{colKey: 'content', title: '说明'},
{colKey: 'createtime', title: '时间'},
],
paginationInfo: {
page: 1,
size: 10,
total: 0,
},
InfoMode:false,
InfoList:[],
}
},
mounted() {
//this.member_id=this.$route.query.id;
this.getList();
},
methods: {
AddonSubmit(){
this.addFrom.member_id=this.addInfo.id;
console.log(this.addFrom);
this.$request
.post("/points_rule/memberPointUpdate", this.addFrom)
.then((res) => {
if (res.code == 1) {
this.$message.success('操作成功!');
this.getList();
this.addMode=false;
} else {
this.$message.error(res.msg);
}
})
.catch((e) => {
console.log(e);
});
},
openInfoMode(row){
this.$request
.post("/points_rule/memberPointefind", {page: this.paginationInfo.page, size: this.paginationInfo.size,id:row.id})
.then((res) => {
this.InfoList = res.data.ret;
this.paginationInfo.total = res.data.count;
this.InfoMode=true;
})
.catch((e) => {
console.log(e);
});
},
openAddMode(row){
this.addInfo=row;
this.addMode=true;
this.addFrom={
number:'',
type:1,
content:'',
member_id:0,
};
},
onSubmit(){
this.pagination.page=1;
this.getList();
},
onCloseMy(){
this.addMode=false;
this.InfoMode=false;
},
getList() {
this.$request
.post("/points_rule/memberPointeIndex", {page: this.pagination.page, size: this.pagination.size,...this.formData})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.ret;
this.pagination.total = res.data.count;
}else{
this.list = [];
this.pagination.total = 0;
}
})
.catch((e) => {
console.log(e);
});
},
onCurrentChangeInfo(d){
this.paginationInfo.page=d;
this.openInfoMode();
},
onCurrentChange(d) {
this.pagination.page = d;
this.getList();
},
}
}
</script>
<style scoped lang="less">
</style>

View File

@ -1,118 +0,0 @@
<template>
<t-card :bordered="false">
<div style="padding-bottom:40px;font-size: 16px;font-weight: 600">积分细则设置</div>
<div class="form-step-container">
<t-form :labelWidth="150">
<t-form-item label="每日签到积分" name="association_name">
<t-input size="large" type="number" placeholder="请输入每日签到积分" v-model="sign_in_points"
style="width: 500px"/>
</t-form-item>
<t-form-item label="青企圈消耗积分" name="association_dizhi">
<t-input size="large" type="number" placeholder="请输入青企圈消耗积分" v-model="consumption_poin"
style="width: 500px"/>
</t-form-item>
</t-form>
<div style="margin:40px">
<t-button @click="updateInfo" theme="primary" size="large">保存</t-button>
</div>
</div>
</t-card>
</template>
<script lang="ts">
export default {
data() {
return {
info: {},
consumption_poin: '',
sign_in_points: '',
}
},
mounted() {
this.getInfo();
},
methods: {
getInfo() {
this.$request
.post('/points_rule/find', {id: 1})
.then((res) => {
this.consumption_poin = res.data.consumption_poin;
this.sign_in_points = res.data.sign_in_points;
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
updateInfo() {
this.$request
.post('/points_rule/update', {
id: 1,
consumption_poin: this.consumption_poin,
sign_in_points: this.sign_in_points
})
.then((res) => {
if (res.code == 1) {
this.$message.success(res.msg);
} else {
this.$message.error(res.msg);
}
this.getInfo();
})
.catch((e) => {
console.log(e);
});
},
onSubmit() {
if (this.association_name == '') {
this.$message.error('协会名称不能为空');
return;
}
if (this.association_phone == '') {
this.$message.error('协会联系方式不能为空');
return;
}
if (this.association_emal == '') {
this.$message.error('协会邮箱不能为空');
return;
}
if (this.association_dizhi == '') {
this.$message.error('协会地址不能为空');
return;
}
if (this.association_desc == '') {
this.$message.error('协会简介不能为空');
return;
}
if (this.association_guizhang == '') {
this.$message.error('协会规章制度不能为空');
return;
}
if (this.association_image == '') {
this.$message.error('协会头像不能为空');
return;
}
if (this.ruhuixizhu == '') {
this.$message.error('入会须知不能为空');
return;
}
this.$request
.post('/association/update', this.addForm)
.then((res) => {
if (res.code == 1) {
this.$message.success(res.msg);
//localStorage.setItem('associationInfo', JSON.stringify(this.addForm) );
this.getList();
} else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
<template> <template>
<t-card title="青企圈列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<!-- <t-tabs v-model="state" @change="tabIndexChange">--> <t-tabs v-model="state" @change="tabIndexChange">
<!-- <t-tab-panel :value="2" label="已通过" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="2" label="已通过" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="1" label="待审核" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="1" label="待审核" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="3" label="已拒绝" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="3" label="已拒绝" :destroyOnHide="false"></t-tab-panel>
<!-- </t-tabs>--> </t-tabs>
<t-table <t-table
rowKey="index" rowKey="index"
:data="list" :data="list"
@ -21,18 +21,10 @@
<template #member_info="{ row }"> <template #member_info="{ row }">
<div>{{row.member.nikename}}</div> <div>{{row.member.nikename}}</div>
</template> </template>
<template #files="{ row ,rowIndex}"> <template #files="{ row }">
<!-- <a v-for="item in row.files" :href="$store.state.user.apiUrl+item" target="_blank">--> <a v-for="item in row.files" :href="$store.state.user.apiUrl+item" target="_blank">
<!-- <img :src="$store.state.user.apiUrl+item" style="width: 100px;margin-right: 10px"/>--> <img :src="$store.state.user.apiUrl+item" style="width: 100px;margin-right: 10px"/>
<!-- </a>--> </a>
<t-image-viewer v-model="visible[rowIndex]" :images="row.files" @close="delViewer(index)">
<template #trigger="{ open }">
<div @click="open" style="cursor: pointer" v-if="row.files.length>0">
<img alt="test" :src="row.files[0]" style="width: 200px"/>
<div>预览图片 {{row.files.length}}</div>
</div>
</template>
</t-image-viewer>
</template> </template>
<template #this_top="{ row }"> <template #this_top="{ row }">
<t-tag v-if="row.is_top==0" theme="success" @click="topNews(row)" style="cursor: pointer">点击置顶</t-tag> <t-tag v-if="row.is_top==0" theme="success" @click="topNews(row)" style="cursor: pointer">点击置顶</t-tag>
@ -72,12 +64,10 @@
</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() {
return { return {
visible: [],
state: 2, state: 2,
list: [], list: [],
reason:'', reason:'',
@ -92,7 +82,7 @@ export default {
], ],
pagination: { pagination: {
page: 1, page: 1,
size: 5, size: 10,
total: 0, total: 0,
}, },
} }
@ -104,14 +94,10 @@ export default {
}else{ }else{
this.association=JSON.parse(store.state.user.association); this.association=JSON.parse(store.state.user.association);
} }
var tab=this.$route.name.slice(-1);
this.state = toInteger(tab);
this.getList(); this.getList();
//this.getGory();
}, },
methods: { methods: {
delViewer(d){
console.log(d);
},
tabIndexChange(index){ tabIndexChange(index){
this.state=index; this.state=index;
this.pagination.page=1; this.pagination.page=1;
@ -137,7 +123,7 @@ export default {
review(d,type){ review(d,type){
console.log(d); console.log(d);
this.$request this.$request
.post('/tweets/review', {id: d.id,status:type,reason:this.reason,member_id:d.member_id}) .post('/tweets/review', {id: d.id,status:type,reason:this.reason})
.then((res) => { .then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.$message.success(res.msg); this.$message.success(res.msg);
@ -170,7 +156,7 @@ export default {
}); });
}, },
onCurrentChange(d){ onCurrentChange(d){
this.pagination.page=d; this.page=d;
this.getList(); this.getList();
}, },
getList() { getList() {
@ -179,16 +165,8 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code == 1) {
var list = res.data.paginator.data; this.list = res.data.data;
const apiUrl = store.state.user.apiUrl; // API URL this.pagination.total = res.data.total;
const transformedSelectList = list.map(item => ({
...item, //
files: item.files.length > 0 ? item.files.map(file => apiUrl + file) : []
}));
console.log(transformedSelectList);
this.list = transformedSelectList;
this.visible=Array(this.list.length).fill(false);
this.pagination.total = res.data.count;
} }
}) })

View File

@ -1,164 +0,0 @@
<template>
<t-card title="青企圈评论列表" :bordered="false">
<div class="form-step-container">
<!-- <t-tabs v-model="state" @change="tabIndexChange">-->
<!-- <t-tab-panel :value="1" label="待审核" :destroyOnHide="false"></t-tab-panel>-->
<!-- <t-tab-panel :value="2" label="已通过" :destroyOnHide="false"></t-tab-panel>-->
<!-- <t-tab-panel :value="3" label="已拒绝" :destroyOnHide="false"></t-tab-panel>-->
<!-- </t-tabs>-->
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
:pagination="pagination"
>
<template #tweet="{ row }">
<div>{{row.tweet==null?'-':row.tweet.title}}</div>
</template>
<template #member_info="{ row }">
<div>{{row.member.nikename}}</div>
</template>
<template #status="{ row }">
<t-tag v-if="row.status==1" theme="primary">待审核</t-tag>
<t-tag v-if="row.status==2" theme="success">已发布</t-tag>
<t-tag v-if="row.status==3" theme="danger">已拒绝</t-tag>
</template>
<template #select="{ row }">
<t-space :size="0">
<t-popconfirm v-if="row.status==1" content="确定要审核通过吗?" @confirm="review(row,1)">
<t-button theme="primary">通过</t-button>
</t-popconfirm>
<t-popconfirm v-if="row.status==1" theme="danger" @confirm="review(row,2)">
<template slot="content">
<p class="title">拒绝理由</p>
<p class="describe" style="margin-top: 10px">
<t-input v-model="reason" placeholder="请输入拒绝理由"/>
</p>
</template>
<t-button theme="warning" style="margin: 0px 10px">拒绝</t-button>
</t-popconfirm>
<!-- <t-popconfirm content="确认删除吗?" @confirm="del(row)">-->
<!-- <t-button theme="danger">删除</t-button>-->
<!-- </t-popconfirm>-->
</t-space>
</template>
</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";
import {toInteger} from "lodash";
export default {
data() {
return {
state: 1,
list: [],
reason:'',
columns: [
{colKey: 'tweet', title: '帖子标题', align: 'center'},
{colKey: 'content', title: '评论内容', align: 'center'},
{colKey: 'member_info', title: '发布者', align: 'center'},
{colKey: 'createtime', title: '评论时间', align: 'center'},
{colKey: 'status', title: '状态', align: 'center'},
{colKey: 'select', title: '操作', width: 200},
],
pagination: {
page: 1,
size: 10,
total: 0,
},
}
},
mounted() {
//this.member_id=this.$route.query.id;
if(typeof (store.state.user.association)=='object'){
this.association=store.state.user.association;
}else{
this.association=JSON.parse(store.state.user.association);
}
var tab=this.$route.name.slice(-1);
this.state=tab;
this.getList();
//this.getGory();
},
methods: {
tabIndexChange(index){
this.state=index;
this.pagination.page=1;
this.list=[];
this.getList();
},
review(d,type){
console.log(d);
this.$request
.post('/tweet_comments/review', {id: d.id,status:type,reason:this.reason,member_id:d.member_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);
});
},
del(d) {
console.log(d);
this.$request
.post('/tweets/destroy', {id: d.id})
.then((res) => {
if (res.code == 1) {
this.$message.success('删除成功!');
this.pagination.page=1;
this.getList();
} else {
this.$message.error(res.msg);
}
console.log(res);
})
.catch((e) => {
console.log(e);
});
},
onCurrentChange(d){
this.pagination.page=d;
this.getList();
},
getList() {
this.$request
.post("/tweet_comments/index", {state:this.state,page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.paginator.data;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="会员列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-form <t-form
ref="form" ref="form"
@ -9,55 +9,64 @@
:style="{ marginBottom: '30px' }" :style="{ marginBottom: '30px' }"
> >
<t-row> <t-row>
<t-form-item label="会员姓名" name="nikename"> <t-col :span="8">
<t-input <t-row :gutter="[16, 24]">
v-model="formData.nikename" <t-col :flex="2">
class="form-item-content" <t-form-item label="会员姓名" name="nikename">
type="search" <t-input
placeholder="请输入会员姓名" v-model="formData.nikename"
style="width: 150px" class="form-item-content"
/> type="search"
</t-form-item> placeholder="请输入会员姓名"
<t-form-item label="手机号" name="phone"> :style="{ minWidth: '134px' }"
<t-input />
v-model="formData.phone" </t-form-item>
class="form-item-content" </t-col>
placeholder="请输入手机号" style="width: 150px"
/> <t-col :flex="2">
</t-form-item> <t-form-item label="手机号" name="phone">
<t-form-item label="职务" name="phone"> <t-input
<t-select v-model="formData.position_id" style="width: 150px"> v-model="formData.phone"
<t-option label="全部" value=""/> class="form-item-content"
<t-option v-for="(item,index) in positionList" :label="item.position_name" :value="item.id"/> placeholder="请输入手机号"
</t-select> :style="{ minWidth: '134px' }"
</t-form-item> />
<t-form-item label="区域" name="phone"> </t-form-item>
<t-cascader v-model="formData.region_id" :options="region_list" style="width: 150px"></t-cascader> </t-col>
</t-form-item> <t-col :flex="3">
<t-form-item label="届数" name="phone"> <t-form-item label="职务" name="phone">
<t-select v-model="formData.number_of_sessions" style="width: 150px"> <t-select v-model="formData.position_id" style="width: 200px">
<t-option label="全部" :value="0"/> <t-option label="全部" value="" />
<t-option label="第十二届" :value="12"/> <t-option v-for="(item,index) in positionList" :label="item.position_name" :value="item.id" />
</t-select> </t-select>
</t-form-item> </t-form-item>
<div> </t-col>
<t-space> <t-col :flex="3">
<t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button> <t-form-item label="区域" name="phone">
<t-button theme="success" @click="()=>$router.push('/user/user_add')"> 新增会员</t-button> <t-select v-model="formData.region_id" style="width: 200px">
<t-button @click="dow" theme="primary">{{ selectedRowKeys.length > 0 ? '选中导出' : '导出全部' }} <t-option label="全部" value="" />
</t-button> <t-option v-for="(item,index) in region_list" :label="item.region_name" :value="item.id" />
</t-space> </t-select>
</div> </t-form-item>
</t-col>
</t-row>
</t-col>
<t-col :span="2" class="operation-container">
<t-button theme="primary" type="submit" :style="{ marginLeft: '8px' }"> 查询</t-button>
</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">
<!-- <t-tab-panel :value="1" label="正式会员" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="1" label="正式会员" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="0" label="待审核" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="0" label="待审核" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="3" label="待缴纳会费" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="3" label="待缴纳会费" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="2" label="已拒绝" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="2" label="已拒绝" :destroyOnHide="false"></t-tab-panel>
<!-- </t-tabs>--> </t-tabs>
<t-table <t-table
row-key="member_id" rowKey="index"
:data="list" :data="list"
:columns="columns" :columns="columns"
:stripe="false" :stripe="false"
@ -65,35 +74,26 @@
:hover="true" :hover="true"
size="large" size="large"
table-layout="auto" table-layout="auto"
cellEmptyContent="-" cellEmptyContent="-" c
:selected-row-keys="selectedRowKeys"
@select-change="rehandleSelectChange"
> >
<template #photo_image="{ row }"> <template #photo_image="{ row }">
<img v-if="row.photo_image" :src="$store.state.user.apiUrl+row.photo_image" style="width: 50px;height: 50px"> <img v-if="row.photo_image" :src="$store.state.user.apiUrl+row.photo_image" style="width: 50px;height: 50px">
</template> </template>
<template #gender="{ row }"> <template #gender="{ row }">
{{ row.gender == 1 ? "男" : "女" }} {{row.gender==1?"男":"女"}}
</template> </template>
<template #if_xianshi="{ row }"> <template #if_xianshi="{ row }">
<t-tag theme="primary" v-if="row.if_xianshi==0">待审核</t-tag> <t-tag theme="primary" v-if="row.if_xianshi==0">待审核</t-tag>
<t-tag theme="success" v-if="row.if_xianshi==1">正式会员</t-tag> <t-tag theme="success" v-if="row.if_xianshi==1">正式会员</t-tag>
<t-tag theme="warning" v-if="row.if_xianshi==3">未缴纳会费</t-tag>
<t-tag theme="danger" v-if="row.if_xianshi==2">申请已被拒绝</t-tag> <t-tag theme="danger" v-if="row.if_xianshi==2">申请已被拒绝</t-tag>
</template> </template>
<template #select="{ row }"> <template #select="{ row }">
<t-space size="24px"> <t-space size="24px">
<t-button theme="default" v-if="row.if_xianshi==1||row.if_xianshi==2" @click="openUrl(row.member_id)"> <t-button theme="default" v-if="row.if_xianshi==1||row.if_xianshi==2" @click="openUrl(row.member_id)">详细信息</t-button>
详细信息 <t-button theme="default" v-if="row.if_xianshi==0||row.if_xianshi==3" @click="openUrl(row.member_id)">审核</t-button>
</t-button>
<t-button theme="default" v-if="row.if_xianshi==0||row.if_xianshi==3" @click="openUrl(row.member_id)">审核
</t-button>
<t-button @click="()=>$router.push('/user/user_edit?id='+row.member_id)">编辑</t-button> <t-button @click="()=>$router.push('/user/user_edit?id='+row.member_id)">编辑</t-button>
<t-popconfirm v-if="row.if_xianshi==1" content="确认要改为待审核状态吗?" @confirm="hidden(row)">
<t-button theme="warning">隐藏</t-button>
</t-popconfirm>
<t-popconfirm content="确认要删除吗?" @confirm="del(row)"> <t-popconfirm content="确认要删除吗?" @confirm="del(row)">
<t-button theme="danger">删除</t-button> <t-button theme="warning">删除</t-button>
</t-popconfirm> </t-popconfirm>
</t-space> </t-space>
</template> </template>
@ -102,7 +102,6 @@
<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>
@ -112,101 +111,48 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import store from "@/store"; import store from "@/store";
import {toInteger} from "lodash";
import {CloudDownloadIcon} from 'tdesign-icons-vue';
import router from "@/router";
export default { export default {
components: {
CloudDownloadIcon,
},
data() { data() {
return { return {
association: {}, association:{},
list: [], list:[],
tabIndex: 1, tabIndex:1,
selectedRowKeys: [], columns:[
columns: [ { colKey: 'member_id', title: '会员ID'},
{ { colKey: 'photo_image', title: '形象照'},
colKey: 'row-select', { colKey: 'nikename', title: '会员姓名'},
type: 'multiple', { colKey: 'position_name', title: '职位'},
width: 50, { colKey: 'region_name', title: '区域'},
}, { colKey: 'phone', title: '手机号'},
{colKey: 'member_id', title: '会员ID'}, { colKey: 'nation', title: '民族'},
{colKey: 'photo_image', title: '形象照'}, { colKey: 'if_xianshi', title: '状态'},
{colKey: 'nikename', title: '会员姓名'}, { colKey: 'select', title: '操作',width: 200},
{colKey: 'position_name', title: '职位'},
{colKey: 'region_name', title: '区域'},
{colKey: 'phone', title: '手机号'},
{colKey: 'nation', title: '民族'},
{colKey: 'if_xianshi', title: '状态'},
{colKey: 'select', title: '操作', width: 200},
], ],
total: 0, total:0,
page: 1, page:1,
size: 10, size:10,
formData: { formData:{
position_id: '', position_id:'',
region_id: '', region_id:'',
nikename: '', nikename: '',
phone: '', phone: ''
number_of_sessions: 0,
}, },
positionList: [], positionList:[],
region_list: [], region_list:[],
} }
}, },
mounted() { mounted() {
if(typeof (this.$store.state.user.association)=='object'){
if (typeof (this.$store.state.user.association) == 'object') { this.association=this.$store.state.user.association;
this.association = this.$store.state.user.association; }else{
} else { this.association=JSON.parse(this.$store.state.user.association);
this.association = JSON.parse(this.$store.state.user.association);
} }
const page = sessionStorage.getItem('sUserPage');
if (page) {
this.page = toInteger(page);
}
var tab=this.$route.name.slice(-1);
this.tabIndex = toInteger(tab);
// console.log(this.tabIndex);
// console.log(tab);
// const Tab = sessionStorage.getItem('sUserTab');
// if (Tab) {
// this.tabIndex = toInteger(Tab);
// }
this.getList(); this.getList();
this.getPositionList(); this.getPositionList();
this.getRegion(); this.getRegion();
}, },
methods: { methods: {
rehandleSelectChange(value, {selectedRowData}) {
this.selectedRowKeys = value;
console.log(value, selectedRowData);
},
dow() {
var ids = '';
if (this.selectedRowKeys.length > 0) {
ids = JSON.stringify(this.selectedRowKeys);
}
var token = store.state.user.token;
window.location.href = "https://hnyea.0rui.cn/api/excel_controller/memberexport?token=" + token + "&ids=" + ids+"&if_xianshi="+this.tabIndex;
},
hidden(row){
console.log(row);
this.$request
.post("/member/examinelist",{member_id:row.member_id,if_xianshi:0})
.then((res) => {
console.log(res);
this.page = 1;
this.total = 0;
this.list = [];
this.getList();
})
.catch((e) => {
console.log(e);
});
},
getRegion() { getRegion() {
this.$request this.$request
.post("/region") .post("/region")
@ -231,59 +177,54 @@ export default {
console.log(e); console.log(e);
}); });
}, },
tabIndexChange(d) { tabIndexChange(d){
console.log(d); console.log(d);
sessionStorage.setItem('sUserPage', 1); this.page=1;
sessionStorage.setItem('sUserTab', d); this.total=0;
this.page = 1; this.list=[];
this.total = 0;
this.list = [];
this.getList(); this.getList();
}, },
del(row) { del(row){
this.$request this.$request
.post("/member/del", {member_id: row.member_id}) .post("/member/del",{member_id:row.member_id})
.then((res) => { .then( (res) => {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code==1){
this.$message.success(res.msg); this.$message.success(res.msg);
} else { }else{
this.$message.error(res.msg); this.$message.error(res.msg);
} }
this.getList(); this.getList();
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
}); });
}, },
onCurrentChange(d) { onCurrentChange(d){
this.page = d; this.page=d;
sessionStorage.setItem('sUserPage', d);
sessionStorage.setItem('sUserTab', this.tabIndex);
this.getList(); this.getList();
}, },
openUrl(member_id) { openUrl(member_id){
this.$router.push('/user/user_info?id=' + member_id); this.$router.push('/user/user_info?id='+member_id);
}, },
getList() { getList() {
this.formData.page = this.page; this.formData.page=this.page;
this.formData.size = this.size; this.formData.size=this.size;
this.formData.if_xianshi = this.tabIndex; this.formData.if_xianshi=this.tabIndex;
this.$request this.$request
.post("/member", this.formData) .post("/member",this.formData)
.then((res) => { .then( (res) => {
console.log(res); console.log(res);
this.list = res.data.ret; this.list=res.data.ret;
this.total = res.data.count; this.total=res.data.count;
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
}); });
}, },
onSubmit() { onSubmit(){
this.page = 1; this.page=1;
this.list = []; this.list=[];
sessionStorage.setItem('sUserPage', 1);
this.getList(); this.getList();
}, },
} }

View File

@ -1,400 +1,153 @@
<template> <template>
<div class="detail-base"> <div class="detail-base">
<t-card title="会员详情" :bordered="false" class="info-block" style="padding: 30px"> <t-card title="" :bordered="false" class="info-block" style="padding: 30px">
<t-steps :current="0" readonly v-if="info.if_xianshi!=1"> <t-steps :current="0" readonly v-if="info.if_xianshi!=1">
<t-step-item title="信息审核" content="提交的信息审核"></t-step-item> <t-step-item title="信息审核" content="提交的信息审核"></t-step-item>
<t-step-item v-if="info.if_xianshi!=2" title="会费缴纳" content="等待会费缴纳"></t-step-item> <t-step-item v-if="info.if_xianshi!=2" title="会费缴纳" content="等待会费缴纳"></t-step-item>
<t-step-item v-if="info.if_xianshi==2" status="error" title="已被拒绝" <t-step-item v-if="info.if_xianshi==2" status="error" title="已被拒绝" :content="info.result.content"></t-step-item>
:content="info.result.content"></t-step-item>
<t-step-item title="成功入会" content="已成功入会"></t-step-item> <t-step-item title="成功入会" content="已成功入会"></t-step-item>
</t-steps> </t-steps>
<div> <t-descriptions :column="3" bordered layout="horizontal" item-layout="horizontal" style="margin-top: 40px">
<div> <t-descriptions-item label="形象照">
<div style="color: #2E2E2E;font-size: 28px;font-weight: bold">1.入会资料</div> <div slot="content">
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div> <t-image-viewer v-model="visible" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.photo_image]">
<div style="padding: 30px 0px"> <template #trigger="{ open }">
<table class="my_table"> <div class="tdesign-demo-image-viewer__ui-image" @click="open">
<tr> <img alt="" :src="$store.state.user.apiUrl+info.photo_image" style="width: 100px;height: 100px;" class="tdesign-demo-image-viewer__ui-image--img" />
<td>推荐方式</td> </div>
<td>
<span v-if="info.reporting_method==1">组织推荐</span>
<span v-if="info.reporting_method==2">会员推荐</span>
<span v-if="info.reporting_method==3">个人自荐</span>
</td>
<template v-if="info.reporting_method==1">
<td>推荐地市</td>
<td>{{ info.recommended_cities }}</td>
</template>
<template v-if="info.reporting_method==3">
<td>来源渠道</td>
<td>{{ info.source_channel }}</td>
</template>
<template v-if="info.reporting_method==2">
<td>推荐人姓名</td>
<td>{{ info.recommendation_id }}</td>
<td>推荐人单位及职务</td>
<td>{{ info.recommendation_content }}</td>
</template>
<td>意向协会职务</td>
<td>{{ info.intentional_association_position }}</td>
</tr>
</table>
</div>
</div>
<div style="margin-top: 30px">
<div style="color: #2E2E2E;font-size: 28px;font-weight: bold">2.基本信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="padding: 30px 0px">
<table class="my_table">
<tr>
<td rowspan="5">
<t-image-viewer :images="[$store.state.user.apiUrl+info.photo_image]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.photo_image!=''&&info.photo_image!=null" :src="$store.state.user.apiUrl+info.photo_image" style="width: 200px;height: 200px;">
<span v-if="info.photo_image==''||info.photo_image==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
<td>姓名</td>
<td>{{ info.nikename }}</td>
<td>性别</td>
<td>{{ info.gender == 0 ? '女' : '男' }}</td>
<td>协会职务</td>
<td>{{ info.position_name}}</td>
<td>出生年月日</td>
<td>{{ info.birth_time }}</td>
<td>民族</td>
<td>{{ info.nation }}</td>
</tr>
<tr>
<td>政治面貌</td>
<td>{{ info.political }}</td>
<td>身份证号码</td>
<td>{{ info.card_number }}</td>
<td>工作单位</td>
<td>{{ info.work_unit }}</td>
<td>单位职务</td>
<td>{{ info.unit_position }}</td>
<td>通讯地址</td>
<td>{{ info.mail_address }}</td>
</tr>
<tr>
<td>籍贯</td>
<td>{{ info.jiguan }}</td>
<td>毕业院校</td>
<td>{{ info.institution }}</td>
<td>学历</td>
<td>{{ info.education }}</td>
<td>学位</td>
<td>{{ info.academic_degree }}</td>
<td>邮编</td>
<td>{{ info.zip_code }}</td>
</tr>
<tr>
<td>手机号</td>
<td>{{ info.phone }}</td>
<td>邮箱</td>
<td>{{ info.mailbox }}</td>
<td>微信</td>
<td>{{ info.wx_number }}</td>
<td>固定电话</td>
<td>{{ info.fixed_telephone }}</td>
<td>所在区域</td>
<td>{{ info.region_name }}</td>
</tr>
<tr align="center">
<td>身份证正面照</td>
<td colspan="4" style="padding-top: 30px">
<t-image-viewer :images="[$store.state.user.apiUrl+info.cardz_image]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.cardz_image!=''&&info.cardz_image!=null" :src="$store.state.user.apiUrl+info.cardz_image" style="height: 150px;">
<span v-if="info.cardz_image==''||info.cardz_image==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
<td>身份证背面照</td>
<td colspan="4" style="padding-top: 30px">
<t-image-viewer :images="[$store.state.user.apiUrl+info.cardf_image]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.cardf_image!=''&&info.cardf_image!=null" :src="$store.state.user.apiUrl+info.cardf_image" style="height: 150px;">
<span v-if="info.cardf_image==''||info.cardf_image==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600;">个人简介</div>
</td>
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">主要成就以及获奖情况</div>
</td>
</tr>
<tr >
<td colspan="6">
<div style="text-align: left" v-html="info.introduction"></div>
</td>
<td colspan="6">
<div style="text-align: left" v-html="info.achievement_award"></div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">学习工作经历</div>
</td>
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">社会职务资料</div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<table style="width: 100%; text-align: center; border-collapse: collapse;">
<thead>
<tr>
<th>起止日期</th>
<th>地区单位</th>
<th>担任职务</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in info.work_experience">
<td>{{ item.time }}</td>
<td>{{ item.address }}</td>
<td>{{ item.book }}</td>
</tr>
</tbody>
</table>
</td>
<td colspan="6">
{{ info.main_social_positions }},{{ info.other_social_positions }}
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">紧急助理联系人</div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<table style="width: 100%; text-align: center; border-collapse: collapse;">
<thead>
<tr>
<th>姓名</th>
<th>职务</th>
<th>电话</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in info.other_contacts">
<td>{{ item.name }}</td>
<td>{{ item.post }}</td>
<td>{{ item.phone }}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
</div>
<div style="margin-top: 30px">
<div style="color: #2E2E2E;font-size: 28px;font-weight: bold">3.企业信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="padding: 30px 0px">
<table class="my_table">
<tr>
<td>企业名称</td>
<td>{{ info.nikename }}</td>
<td>统一社会信用代码</td>
<td colspan="2">{{ info.unified_code }}</td>
<td>企业注册地</td>
<td colspan="1">{{ info.enterprise_location }}</td>
<td>企业地址</td>
<td colspan="1">
<a href="https://lbs.qq.com/tool/getpoint/get-point.html" target="_blank">{{ info.longitude }},{{ info.dimension }}</a>
</td>
<td>注册资金万元</td>
<td>{{ info.registered_capital }}</td>
</tr>
<tr>
<td>员工人数</td>
<td>{{ info.employee }}</td>
<td>是否上市</td>
<td>{{ info.if_list == 0 ? '是' : '否' }}</td>
<td>企业性质</td>
<td>{{ info.enterprise_nature }}</td>
<td>所属行业</td>
<td>{{ info.industry_name }}</td>
<td colspan="2">企业网址</td>
<td>{{ info.enterprise_website }}</td>
</tr>
<tr>
<td>上年营业额万元</td>
<td>{{ info.previous_revenue }}</td>
<td>上年纳税额万元</td>
<td>{{ info.previous_tax }}</td>
<td>上年度净利润万元</td>
<td colspan="2">{{ info.previous_profit }}</td>
<td>上年公益性捐赠支出万元</td>
<td colspan="3">{{ info.previous_donation }}</td>
</tr>
<tr>
<td>
营业执照
</td>
<td colspan="5">
<t-image-viewer :images="[$store.state.user.apiUrl+info.business_license_image]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.business_license_image!=''&&info.business_license_image!=null" :src="$store.state.user.apiUrl + info.business_license_image" style="height: 150px; ">
<span v-if="info.business_license_image==''||info.business_license_image==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
<td>
公司LOGO
</td>
<td colspan="4">
<t-image-viewer :images="[$store.state.user.apiUrl+info.company_image]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.company_image!=''&&info.company_image!=null" :src="$store.state.user.apiUrl + info.company_image" style="height: 150px; ">
<span v-if="info.company_image==''||info.company_image==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">公司介绍</div>
</td>
<td colspan="5">
<div style="font-size: 18px;font-weight: 600">主营业务介绍</div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="text-align: left" v-html="info.enterprise_Introduction"></div>
</td>
<td colspan="5">
<div style="text-align: left" v-html="info.introdiction"></div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">企业所获荣誉以及专利</div>
</td>
<td colspan="5">
<div style="font-size: 18px;font-weight: 600">其他企业任职情况</div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="text-align: left" v-html="info.enterprise_honor"></div>
</td>
<td colspan="5">
<div style="text-align: left" v-html="info.qitaqiyerenzhiqingkuang"></div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="font-size: 18px;font-weight: 600">企业履行社会责任情况</div>
</td>
</tr>
<tr align="center">
<td colspan="6">
<div style="text-align: left" v-html="info.enterprise_lvxingzeren"></div>
</td>
</tr>
</table>
</div>
</div>
<div style="margin-top: 30px">
<div style="color: #2E2E2E;font-size: 28px;font-weight: bold">4.建团信息</div>
<div style="height: 2px;background-color: #999999;width: 100%;margin-top: 20px"></div>
<div style="margin-top: 30px">
<table class="my_table">
<tr>
<td>是否建立团组织</td>
<td>{{ info.if_organization == 0 ? '是' : '否' }}</td>
<template v-if="info.if_organization==0">
<td>团组织性质</td>
<td>{{ info.nature }}</td>
<td>建团时间</td>
<td>{{ info.jiantuan_time }}</td>
</template>
</tr>
<template v-if="info.if_organization==0">
<tr>
<td>建团人数</td>
<td>{{ info.jiantuan_number }}</td>
<td>青年人数</td>
<td>{{ info.youth_number }}</td>
<td>上级团组织</td>
<td>{{ info.superior_nature }}</td>
</tr>
<tr align="center">
<td rowspan="2">批复文件</td>
<td rowspan="2" style="padding-top: 30px">
<t-image-viewer :images="[$store.state.user.apiUrl+info.documents_file]" mode="modeless"
:closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.documents_file!=''&&info.documents_file!=null" :src="$store.state.user.apiUrl + info.documents_file" style="height: 150px; ">
<span v-if="info.documents_file==''||info.documents_file==null">未上传</span>
</div>
</template>
</t-image-viewer>
</td>
<td colspan="4">
<div style="font-size: 18px;font-weight: 600">团委负责人信息</div>
</td>
</tr>
<tr align="center">
<td colspan="5">
<table style="width: 100%; text-align: center; border-collapse: collapse;">
<thead>
<tr>
<th>姓名</th>
<th>性别</th>
<th>单位职务</th>
<th>团委职务</th>
<th>手机号</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in info.tuanweifuzerenxinxi">
<td>{{ item.name }}</td>
<td>{{ item.sex }}</td>
<td>{{ item.job }}</td>
<td>{{ item.tun_job }}</td>
<td>{{ item.phone }}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</template> </template>
</table> </t-image-viewer>
</div> </div>
</div> </t-descriptions-item>
</div> <t-descriptions-item label="身份证正面照">
<div slot="content">
<t-image-viewer v-model="visibleZm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardz_image]">
<template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.cardz_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div>
</template>
</t-image-viewer>
</div>
</t-descriptions-item>
<t-descriptions-item label="身份证反面照">
<div slot="content">
<t-image-viewer v-model="visibleFm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardf_image]">
<template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.cardf_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div>
</template>
</t-image-viewer>
</div>
</t-descriptions-item>
<t-descriptions-item label="会员姓名" :content="info.nikename"></t-descriptions-item>
<t-descriptions-item label="身份证号码" :content="info.card_number"></t-descriptions-item>
<t-descriptions-item label="手机号" :content="info.phone"></t-descriptions-item>
<t-descriptions-item label="出生日期" :content="info.birth_time"></t-descriptions-item>
<t-descriptions-item label="职位" :content="info.position_name"></t-descriptions-item>
<t-descriptions-item label="行业" :content="info.industry_id==-1?'其他行业':info.industry_name"></t-descriptions-item>
<t-descriptions-item label="区域" :content="info.region_name"></t-descriptions-item>
<t-descriptions-item label="微信号" :content="info.wx_number"></t-descriptions-item>
<t-descriptions-item label="性别">
<div slot="content">
{{info.gender==1?"男":"女"}}
</div>
</t-descriptions-item>
<t-descriptions-item label="籍贯" :content="info.jiguan"></t-descriptions-item>
<t-descriptions-item label="民族" :content="info.nation"></t-descriptions-item>
<t-descriptions-item label="政治面貌" :content="info.political"></t-descriptions-item>
<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 :span="3" label="自我介绍">
<div slot="content" style="width: 600px;">
{{info.introduction}}
</div>
</t-descriptions-item>
<!-- <t-descriptions-item label="工作单位" :content="info.work_unit"></t-descriptions-item>-->
<t-descriptions-item label="单位职务" :content="info.unit_position"></t-descriptions-item>
<t-descriptions-item label="邮箱地址" :content="info.mailbox"></t-descriptions-item>
<t-descriptions-item label="固定电话" :content="info.fixed_telephone"></t-descriptions-item>
<t-descriptions-item label="其他社会职务" :content="info.other_social_positions"></t-descriptions-item>
<t-descriptions-item label="其他联系人" :content="info.other_contacts"></t-descriptions-item>
<t-descriptions-item label="主要成就以及获奖情况" :content="info.achievement_award"></t-descriptions-item>
<t-descriptions-item label="营业执照">
<div slot="content">
<t-image-viewer v-model="visibleZz" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.business_license_image]">
<template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.business_license_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div>
</template>
</t-image-viewer>
</div>
</t-descriptions-item>
<t-descriptions-item label="公司Logo">
<div slot="content">
<t-image-viewer v-model="visiblelogo" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.company_image]">
<template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.company_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div>
</template>
</t-image-viewer>
</div>
</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="是否上市">
<div slot="content">
{{info.if_list==1?"否":"是"}}
</div>
</t-descriptions-item>
<t-descriptions-item label="企业地址" :content="info.enterprise_location"></t-descriptions-item>
<t-descriptions-item label="上年度营业额" :content="!info.previous_revenue?'':info.previous_revenue+'万'"></t-descriptions-item>
<t-descriptions-item label="上年度纳税额" :content="!info.previous_tax?'':info.previous_tax+'万'"></t-descriptions-item>
<t-descriptions-item label="上年度净利润" :content="!info.previous_profit?'':info.previous_profit+'万'"></t-descriptions-item>
<t-descriptions-item label="上年度公益性捐赠支出" :content="!info.previous_donation?'':info.previous_donation+'万'"></t-descriptions-item>
<t-descriptions-item label="企业介绍" >
<div slot="content" style="width: 300px;">
{{info.enterprise_Introduction}}
</div>
</t-descriptions-item>
<t-descriptions-item label="业务介绍" :content="info.introdiction"></t-descriptions-item>
<t-descriptions-item label="企业所获荣誉以及专利" :content="info.enterorise_honor"></t-descriptions-item>
<t-descriptions-item label="其他企业任职情况" :content="info.qitaqiyerenzhiqingkuang"></t-descriptions-item>
<t-descriptions-item label="是否建立团组织">
<div slot="content">
{{info.if_organization==1?"否":"是"}}
</div>
</t-descriptions-item>
<template v-if="info.if_organization==0">
<t-descriptions-item label="团组织性质" :content="info.nature"></t-descriptions-item>
<t-descriptions-item label="建团时间" :content="info.jiantuan_time"></t-descriptions-item>
<t-descriptions-item label="建团人数" :content="info.jiantuan_number"></t-descriptions-item>
<t-descriptions-item label="青年人数" :content="info.youth_number"></t-descriptions-item>
<t-descriptions-item label="上级团组织" :content="info.superior_nature"></t-descriptions-item>
<t-descriptions-item label="批复文件">
<div slot="content">
<t-image-viewer v-model="visiblePf" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.documents_file]">
<template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.documents_file" class="tdesign-demo-image-viewer__ui-image--img" />
</div>
</template>
</t-image-viewer>
</div>
</t-descriptions-item>
<t-descriptions-item label="团委负责人信息" :content="info.tuanweifuzerenxinxi"></t-descriptions-item>
<t-descriptions-item label="建团时间" :content="info.jiantuan_time"></t-descriptions-item>
</template>
</t-descriptions>
<div v-if="info.if_xianshi==0" style="text-align: center;margin-top: 50px"> <div v-if="info.if_xianshi==0" style="text-align: center;margin-top: 50px">
<t-popconfirm theme="danger" @confirm="tgSelect(2)"> <t-popconfirm theme="danger" @confirm="tgSelect(2)">
<template slot="content"> <template slot="content">
<p class="title">拒绝理由</p> <p class="title">拒绝理由</p>
<p class="describe" style="margin-top: 10px"> <p class="describe" style="margin-top: 10px">
@ -419,55 +172,42 @@
export default { export default {
data() { data() {
return { return {
visible: false, visible:false,
visibleTg: false, visibleTg:false,
visibleZz: false, visibleZz:false,
visibleZm: false, visibleZm:false,
visibleFm: false, visibleFm:false,
visiblePf: false, visiblePf:false,
visiblelogo: false, visiblelogo:false,
info: {}, info:{},
member_id: 0, member_id:0,
reason: '', reason:'',
} }
}, },
mounted() { mounted() {
this.member_id=this.$route.query.id;
this.member_id = this.$route.query.id;
this.getInfo(); this.getInfo();
}, },
methods: { methods: {
getInfo() { getInfo() {
this.$request this.$request
.post("/member/find", {member_id: this.member_id}) .post("/member/find",{member_id:this.member_id})
.then((res) => { .then( (res) => {
var key = res.data; console.log(res);
console.log(key); this.info=res.data;
key.work_experience =key.work_experience!=''?JSON.parse(key.work_experience):'';
key.other_contacts = key.other_contacts!=''?JSON.parse(key.other_contacts):'';
key.tuanweifuzerenxinxi = key.tuanweifuzerenxinxi!=''?JSON.parse(key.tuanweifuzerenxinxi):'';
this.info = key;
console.log(key);
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
}); });
}, },
tgSelect(type) { tgSelect(type){
this.$request this.$request
.post("/member/examine", { .post("/member/examine",{member_id:this.member_id,if_xianshi:type,content:this.reason})
if_member: type == 1 ? 1 : 2, .then( (res) => {
member_id: this.member_id,
if_xianshi: type,
content: this.reason
})
.then((res) => {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code==1){
this.$message.success(res.msg); this.$message.success(res.msg);
} else { }else{
this.$message.error(res.msg); this.$message.error(res.msg);
} }
this.getInfo(); this.getInfo();
@ -480,19 +220,7 @@ export default {
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.info-block { .info-block{
margin-bottom: 20px; margin-bottom: 20px;
} }
.my_table {
border-collapse: collapse; /* 合并边框 */
width: 100%;
}
.my_table td {
border: 1px solid black; /* 设置单元格边框 */
text-align: center;
min-width: 100px;
padding: 13px;
}
</style> </style>

View File

@ -1,10 +1,10 @@
<template> <template>
<t-card title="发票申请列表" :bordered="false"> <t-card :bordered="false">
<!-- <t-tabs v-model="tabIndex" @change="tabIndexChange">--> <t-tabs v-model="tabIndex" @change="tabIndexChange">
<!-- <t-tab-panel :value="3" label="待审核" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="3" label="待审核" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="1" label="已通过" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="1" label="已通过" :destroyOnHide="false"></t-tab-panel>
<!-- <t-tab-panel :value="2" label="已拒绝" :destroyOnHide="false"></t-tab-panel>--> <t-tab-panel :value="2" label="已拒绝" :destroyOnHide="false"></t-tab-panel>
<!-- </t-tabs>--> </t-tabs>
<div class="form-step-container"> <div class="form-step-container">
<t-table <t-table
rowKey="index" rowKey="index"
@ -44,34 +44,18 @@
<t-dialog header="申请详情" :visible="infoMode" :onClose="onCloseMy" :closeOnOverlayClick="false" :cancelBtn="null" :confirmBtn="null" width="800px"> <t-dialog header="申请详情" :visible="infoMode" :onClose="onCloseMy" :closeOnOverlayClick="false" :cancelBtn="null" :confirmBtn="null" width="800px">
<t-space direction="vertical"> <t-space direction="vertical">
<t-descriptions :label-style="{ width: '200px', textAlign: 'left' }" bordered :column="2"> <t-descriptions :label-style="{ width: '200px', textAlign: 'left' }" bordered :column="2">
<t-descriptions-item label="申请人">{{ info.name }}</t-descriptions-item> <t-descriptions-item label="申请人">{{ info.header.name }}</t-descriptions-item>
<t-descriptions-item label="公司名称">{{ info.unit }}</t-descriptions-item> <t-descriptions-item label="公司名称">{{ info.header.unit }}</t-descriptions-item>
<t-descriptions-item label="纳税人识别号">{{ info.taxpayer_identification_number }} <t-descriptions-item label="纳税人识别号">{{ info.header.taxpayer_identification_number }}
</t-descriptions-item> </t-descriptions-item>
<t-descriptions-item label="单位地址">{{ info.unit_address }}</t-descriptions-item> <t-descriptions-item label="单位地址">{{ info.header.unit_address }}</t-descriptions-item>
<t-descriptions-item label="单位电话">{{ info.telephone }}</t-descriptions-item> <t-descriptions-item label="单位电话">{{ info.header.telephone }}</t-descriptions-item>
<t-descriptions-item label="银行基本户账号">{{ info.bank_basic_account_number }}</t-descriptions-item> <t-descriptions-item label="银行基本户账号">{{ info.header.bank_basic_account_number }}</t-descriptions-item>
<t-descriptions-item label="开户行">{{ info.bank }}</t-descriptions-item> <t-descriptions-item label="开户行">{{ info.header.bank }}</t-descriptions-item>
<t-descriptions-item label="发票类别">{{ info.invoice_type==1?'普票':'专票' }}</t-descriptions-item>
<t-descriptions-item label="发票金额">{{ info.money }} </t-descriptions-item> <t-descriptions-item label="发票金额">{{ info.money }} </t-descriptions-item>
<t-descriptions-item label="支付凭证">
<t-image-viewer :images="[$store.state.user.apiUrl+info.voucher]" :closeOnEscKeydown="false">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="info.voucher!=''&&info.voucher!=null" :src="$store.state.user.apiUrl+info.voucher" style="width: 200px;">
</div>
</template>
</t-image-viewer>
</t-descriptions-item>
<t-descriptions-item label="发票图片"> <t-descriptions-item label="发票图片">
<t-image-viewer :images="[$store.state.user.apiUrl+invoice_image]" :closeOnEscKeydown="false"> <img v-if="invoice_image!=''&&invoice_image!=null" :src="$store.state.user.apiUrl+invoice_image" style="width: 200px;">
<template #trigger="{ open }">
<div style="cursor: pointer" @click="open">
<img v-if="invoice_image!=''&&invoice_image!=null" :src="$store.state.user.apiUrl+invoice_image" style="width: 200px;">
</div>
</template>
</t-image-viewer>
<t-upload <t-upload
:action="$store.state.user.apiUrl+'/api/common/upload'" :action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="invoice_image_show" v-model="invoice_image_show"
@ -104,7 +88,6 @@
</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() {
@ -114,7 +97,9 @@ export default {
total: 0, total: 0,
size: 10, size: 10,
list: [], list: [],
info: {}, info: {
header: {}
},
this_id:0, this_id:0,
member_id:0, member_id:0,
reason:'', reason:'',
@ -138,8 +123,7 @@ export default {
} else { } else {
this.association = JSON.parse(store.state.user.association); this.association = JSON.parse(store.state.user.association);
} }
var tab=this.$route.name.slice(-1); console.log(this.association);
this.tabIndex = toInteger(tab);
this.getList(); this.getList();
}, },
methods: { methods: {
@ -148,8 +132,6 @@ export default {
}, },
tabIndexChange(d) { tabIndexChange(d) {
console.log(d); console.log(d);
this.tabIndex = d;
this.getList();
}, },
onSubmit(this_if_ssue){ onSubmit(this_if_ssue){
if(this_if_ssue==1){ if(this_if_ssue==1){

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="行业列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增</t-button> <t-button @click="add">新增</t-button>
<t-table <t-table

View File

@ -1,5 +1,5 @@
<template> <template>
<t-card title="职位列表" :bordered="false"> <t-card :bordered="false">
<div class="form-step-container"> <div class="form-step-container">
<t-button @click="add">新增</t-button> <t-button @click="add">新增</t-button>
<t-table <t-table

View File

@ -1,55 +1,28 @@
<template> <template>
<t-card :bordered="false"> <t-card :bordered="false">
<div> <div class="form-step-container">
<t-tree <t-button @click="add">新增</t-button>
ref="tree" <t-table
rowKey="index"
:data="list" :data="list"
hover :columns="columns"
:checkable="false" :stripe="false"
:w="300" :bordered="false"
:transition="true" :hover="true"
:expand-on-click-node="false" size="large"
:line="true" table-layout="auto"
:icon="true" cellEmptyContent="-"
:expandMutex="true"
:expandOnClickNode="true"
> >
<template #label="{ node }"> <template #select="{ row }">
<div style="display: flex;align-items: center;"> <t-space size="24px" v-if="row.id!=0">
<div style="padding:10px;font-size: 16px;">{{ node.label }}</div> <t-button theme="warning" @click="edit(row)">编辑</t-button>
<!-- <div style="margin-left: 50px">--> <t-popconfirm content="确认删除吗?" @confirm="del(row)">
<!-- <t-space>--> <t-button theme="danger" >删除</t-button>
<!-- <t-button v-if="node.data.children" size="small" variant="base" @click="append(node)">添加区县</t-button>--> </t-popconfirm>
<!-- <t-button size="small" variant="base" theme="danger" @click="remove(node)">删除</t-button>--> </t-space>
<!-- </t-space>-->
<!-- </div>-->
</div>
</template> </template>
</t-tree> </t-table>
</div> </div>
<!-- <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="新增区域" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit"> <t-dialog header="新增区域" :visible="addMode" :onClose="onCloseMy" @confirm="onSubmit">
<t-form> <t-form>
<t-form-item label="区域名称" name="region_name"> <t-form-item label="区域名称" name="region_name">
@ -67,54 +40,8 @@ export default {
region_name: '', region_name: '',
addMode: false, addMode: false,
isEdit: false, isEdit: false,
editID: 0, editID:0,
list: [], list: [],
items: [
{
label: '洛阳市',
children: [
{
label: '老城区',
},
{
label: '瀍河区',
},
],
},
{
label: '第一段',
children: [
{
label: '第二段',
},
{
label: '第二段',
},
],
},
{
label: '第一段',
children: [
{
label: '第二段',
},
{
label: '第二段',
},
],
},
{
label: '第一段',
children: [
{
label: '第二段',
},
{
label: '第二段',
},
],
},
],
columns: [ columns: [
{colKey: 'region_name', title: '区域名称'}, {colKey: 'region_name', title: '区域名称'},
{colKey: 'select', title: '操作', width: 200}, {colKey: 'select', title: '操作', width: 200},
@ -122,22 +49,19 @@ export default {
} }
}, },
mounted() { mounted() {
// this.member_id=this.$route.query.id; //this.member_id=this.$route.query.id;
this.getList(); this.getList();
}, },
methods: { methods: {
append(node) { del(d){
console.log(node);
},
del(d) {
console.log(d); console.log(d);
this.$request this.$request
.post('/region/del', {id: d.id}) .post('/region/del',{id:d.id})
.then((res) => { .then((res) => {
if (res.code == 1) { if(res.code==1){
this.$message.success(res.msg); this.$message.success(res.msg);
this.getList(); this.getList();
} else { }else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
console.log(res); console.log(res);
@ -146,20 +70,20 @@ export default {
console.log(e); console.log(e);
}); });
}, },
add() { add(){
this.region_name = ''; this.region_name= '';
this.addMode = true; this.addMode=true;
this.isEdit = false; this.isEdit=false;
}, },
edit(d) { edit(d){
this.editID = d.id; this.editID=d.id;
this.region_name = d.region_name; this.region_name=d.region_name;
this.addMode = true; this.addMode=true;
this.isEdit = true; this.isEdit=true;
}, },
getList() { getList() {
this.$request this.$request
.post("/region",{pid:0}) .post("/region")
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.list = res.data; this.list = res.data;
@ -173,18 +97,18 @@ export default {
this.$message.error('区域名称不能为空'); this.$message.error('区域名称不能为空');
return; return;
} }
let url = '/region/add'; var url='/region/add';
if (this.isEdit) { if(this.isEdit){
url = '/region/update'; url='/region/update';
} }
this.$request this.$request
.post(url, {region_name: this.region_name, id: this.editID}) .post(url,{region_name:this.region_name,id:this.editID})
.then((res) => { .then((res) => {
if (res.code == 1) { if(res.code==1){
this.$message.success(res.msg); this.$message.success(res.msg);
this.addMode = false; this.addMode=false;
this.getList(); this.getList();
} else { }else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
console.log(res); console.log(res);

View File

@ -7,7 +7,7 @@ const whiteListRouters = store.getters['permission/whiteListRouters'];
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
NProgress.start(); NProgress.start();
document.title = '河南省青年企业家协会-'+to.meta.title; document.title = '智慧云商协-'+to.meta.title;
const token = localStorage.getItem('associationToken'); const token = localStorage.getItem('associationToken');
if(store.state.user.association!=''){ if(store.state.user.association!=''){
if(typeof (store.state.user.association)=='object'){ if(typeof (store.state.user.association)=='object'){

View File

@ -20,7 +20,7 @@ const defaultRouterList = [
{ {
path: '/register', path: '/register',
name: 'register', name: 'register',
meta: {title: '入会资料填写'}, meta: {title: '会员注册'},
component: () => import('@/pages/register/index.vue'), component: () => import('@/pages/register/index.vue'),
}, },
{ {

View File

@ -1,3 +1,4 @@
import { DashboardIcon } from 'tdesign-icons-vue';
import Layout from '@/layouts/index.vue'; import Layout from '@/layouts/index.vue';
export default [ export default [
@ -7,16 +8,15 @@ export default [
redirect: '/dashboard/base', redirect: '/dashboard/base',
name: 'dashboard', name: 'dashboard',
meta: { meta: {
title: '待办事项', title: '首页',
icon: 'chat-bubble-history', icon: DashboardIcon,
single:true,
}, },
children: [ children: [
{ {
path: 'base', path: 'base',
name: 'DashboardBase', name: 'DashboardBase',
component: () => import('@/pages/dashboard/base/index.vue'), component: () => import('@/pages/dashboard/base/index.vue'),
meta: { title: '待办事项' }, meta: { title: '数据大屏' },
} }
], ],
}, },

View File

@ -1,3 +1,5 @@
import {ViewModuleIcon, UsergroupIcon, ViewListIcon, ChartBubbleIcon, HomeIcon, HelpIcon,UserAvatarIcon} from 'tdesign-icons-vue';
import Layout from '@/layouts/index.vue'; import Layout from '@/layouts/index.vue';
export default [ export default [
@ -6,46 +8,32 @@ export default [
name: 'user', name: 'user',
component: Layout, component: Layout,
redirect: '/user/user_index', redirect: '/user/user_index',
meta: {title: '会员管理', icon: 'user'}, meta: {title: '会员管理', icon: UsergroupIcon},
children: [ children: [
{ {
path: 'user_add', path: 'user_index',
name: 'userAdd', name: 'userIndex',
component: () => import('@/pages/user/user_add.vue'), component: () => import('@/pages/user/user_index.vue'),
meta: {title: '新增会员'}, meta: {title: '会员列表'},
}, },
{ {
path: 'user_index_1', path: 'plan',
name: 'userIndex1', name: 'userPlan',
component: () => import('@/pages/user/user_index.vue'), component: () => import('@/pages/user/user_plan.vue'),
meta: {title: '正式会员'}, meta: {title: '职位管理'},
}, },
{ {
path: 'user_index_0', path: 'line',
name: 'userIndex0', name: 'userLine',
component: () => import('@/pages/user/user_index.vue'), component: () => import('@/pages/user/user_line.vue'),
meta: {title: '待审核'}, meta: {title: '行业管理'},
}, },
{ {
path: 'user_index_3', path: 'region',
name: 'userIndex3', name: 'userRegion',
component: () => import('@/pages/user/user_index.vue'), component: () => import('@/pages/user/user_region.vue'),
meta: {title: '待缴纳会费'}, meta: {title: '区域管理'},
}, },
{
path: 'user_index_2',
name: 'userIndex2',
component: () => import('@/pages/user/user_index.vue'),
meta: {title: '已拒绝'},
},
// {
// path: 'region',
// name: 'userRegion',
// component: () => import('@/pages/user/user_region.vue'),
// meta: {title: '区域管理'},
// },
{ {
path: 'user_info', path: 'user_info',
name: 'userInfo', name: 'userInfo',
@ -58,112 +46,39 @@ 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_edit_shen',
// name: 'userEditShen',
// component: () => import('@/pages/user/user_edit_shen.vue'),
// meta: {title: '编辑信息审核'},
// },
],
},
{
path: '/user_invoice',
name: 'userInvoice',
component: Layout,
redirect: '/user/user_invoice',
meta: {title: '发票管理', icon: 'pantone'},
children: [
{ {
path: 'user_invoice3', path: 'user_add',
name: 'userInvoice3', name: 'userAdd',
component: () => import('@/pages/user/user_add.vue'),
meta: {title: '新增会员', hidden: true},
},
{
path: 'user_invoice',
name: 'userInvoice',
component: () => import('@/pages/user/user_invoice.vue'), component: () => import('@/pages/user/user_invoice.vue'),
meta: {title: '待开具'}, meta: {title: '会员发票管理'},
}, },
{ {
path: 'user_invoice1', path: 'user_edit_shen',
name: 'userInvoice1', name: 'userEditShen',
component: () => import('@/pages/user/user_invoice.vue'), component: () => import('@/pages/user/user_edit_shen.vue'),
meta: {title: '已开具'}, meta: {title: '编辑信息审核'},
},
{
path: 'user_invoice2',
name: 'userInvoice2',
component: () => import('@/pages/user/user_invoice.vue'),
meta: {title: '已拒绝'},
}, },
], ],
}, },
{ {
path: '/plan', path: '/activity',
name: 'userPlan', name: 'activity',
component: Layout, component: Layout,
redirect: '/user/user_plan', redirect: '/activity/index',
meta: {title: '职位管理', icon: 'tree-round-dot'}, meta: {title: '活动管理', icon: ChartBubbleIcon},
children: [ children: [
{ {
path: 'plan', path: 'activity_index',
name: 'userPlan', name: 'activityIndex',
component: () => import('@/pages/user/user_plan.vue'),
meta: {title: '职位管理'},
},
],
},
{
path: '/line',
name: 'userLine',
component: Layout,
redirect: '/user/user_line',
meta: {title: '行业管理', icon: 'education'},
children: [
{
path: 'line',
name: 'userLine',
component: () => import('@/pages/user/user_line.vue'),
meta: {title: '行业管理'},
},
],
},
{
path: '/activity1',
name: 'activity1',
component: Layout,
redirect: '/activity1/index',
meta: {title: '协会活动', icon: 'flag-4'},
children: [
{
path: 'activity_add1',
name: 'activityAdd1',
component: () => import('@/pages/activity/activity_add.vue'),
meta: {title: '新增活动'},
},
{
path: 'activity_edit',
name: 'activityEdit',
component: () => import('@/pages/activity/activity_edit.vue'),
meta: {title: '活动编辑',hidden:true},
},
{
path: 'activity_index1',
name: 'activityIndex1',
component: () => import('@/pages/activity/activity_index.vue'), component: () => import('@/pages/activity/activity_index.vue'),
meta: {title: '活动列表'}, meta: {title: '活动列表'},
}, },
// {
// path: 'activity_top',
// name: 'activityTop',
// component: () => import('@/pages/activity/activity_top.vue'),
// meta: {title: '活动首页置顶'},
// }
],
},
{
path: '/activity_top',
name: 'activity_top',
component: Layout,
redirect: '/activity/activity_top',
meta: {title: '活动置顶', icon: 'align-top'},
children: [
{ {
path: 'activity_top', path: 'activity_top',
name: 'activityTop', name: 'activityTop',
@ -172,139 +87,18 @@ export default [
} }
], ],
}, },
{
path: '/activity2',
name: 'activity2',
component: Layout,
redirect: '/activity/activity_index',
meta: {title: '调查问卷', icon: 'markup'},
children: [
{
path: 'activity_add2',
name: 'activityAdd2',
component: () => import('@/pages/activity/activity_add.vue'),
meta: {title: '新增问卷'},
},
{
path: 'activity_index2',
name: 'activityIndex2',
component: () => import('@/pages/activity/activity_index.vue'),
meta: {title: '问卷列表'},
},
// {
// path: 'activity_top',
// name: 'activityTop',
// component: () => import('@/pages/activity/activity_top.vue'),
// meta: {title: '活动首页置顶'},
// }
],
},
{
path: '/activity3',
name: 'activity3',
component: Layout,
redirect: '/activity/activity_index',
meta: {title: '公益捐赠', icon: 'undertake-hold-up'},
children: [
{
path: 'activity_add3',
name: 'activityAdd3',
component: () => import('@/pages/activity/activity_add.vue'),
meta: {title: '新增公益捐赠'},
},
{
path: 'activity_index3',
name: 'activityIndex3',
component: () => import('@/pages/activity/activity_index.vue'),
meta: {title: '公益捐赠列表'},
},
],
},
{
path: '/activity4',
name: 'activity4',
component: Layout,
redirect: '/activity/activity_index',
meta: {title: '学习培训', icon: 'git-repository'},
children: [
{
path: 'activity_add4',
name: 'activityAdd4',
component: () => import('@/pages/activity/activity_add.vue'),
meta: {title: '新增学习培训'},
},
{
path: 'activity_index4',
name: 'activityIndex4',
component: () => import('@/pages/activity/activity_index.vue'),
meta: {title: '学习培训列表'},
},
],
},
{ {
path: '/tweets', path: '/tweets',
name: 'tweets', name: 'tweets',
component: Layout, component: Layout,
meta: {title: '青企圈', icon: 'chat-heart'}, redirect: '/tweets/index',
meta: {title: '青企圈', icon: UserAvatarIcon},
children: [ children: [
{ {
path: 'tweets_index', path: 'index',
name: 'tweetsIndex', name: 'tweetsIndex',
component: () => import('@/pages/tweets/index.vue'),
meta: {title: '内容列表'}, meta: {title: '内容列表'},
component: () => import('@/layouts/blank.vue'),
children: [
{
path: 'tweets_index2',
name: 'tweetsIndex2',
component: () => import('@/pages/tweets/index.vue'),
meta: {title: '通过列表'},
}, {
path: 'tweets_index1',
name: 'tweetsIndex1',
component: () => import('@/pages/tweets/index.vue'),
meta: {title: '待审核列表'},
}, {
path: 'tweets_index3',
name: 'tweetsIndex3',
component: () => import('@/pages/tweets/index.vue'),
meta: {title: '已拒绝列表'},
}
// , {
// path: 'pl_index',
// name: 'tweetsPlIndex',
// component: () => import('@/pages/tweets/pl_index.vue'),
// meta: {title: '评论列表'},
// },
],
}, {
path: 'pl_index',
name: 'tweetsPlIndex',
component: () => import('@/layouts/blank.vue'),
meta: {title: '评论列表'},
children: [
{
path: 'pl_index2',
name: 'tweetsPlIndex2',
component: () => import('@/pages/tweets/pl_index.vue'),
meta: {title: '通过列表'},
}, {
path: 'pl_index1',
name: 'tweetsPlIndex1',
component: () => import('@/pages/tweets/pl_index.vue'),
meta: {title: '待审核列表'},
}, {
path: 'pl_index3',
name: 'tweetsPlIndex3',
component: () => import('@/pages/tweets/pl_index.vue'),
meta: {title: '已拒绝列表'},
}
// , {
// path: 'pl_index',
// name: 'tweetsPlIndex',
// component: () => import('@/pages/tweets/pl_index.vue'),
// meta: {title: '评论列表'},
// },
],
}, },
], ],
}, },
@ -313,7 +107,7 @@ export default [
name: 'news', name: 'news',
component: Layout, component: Layout,
redirect: '/news/news_index', redirect: '/news/news_index',
meta: {title: '新闻管理', icon: 'system-log'}, meta: {title: '新闻文章', icon: ViewListIcon},
children: [ children: [
// { // {
// path: 'wechat_index', // path: 'wechat_index',
@ -321,23 +115,11 @@ export default [
// component: () => import('@/pages/news/wechat_index.vue'), // component: () => import('@/pages/news/wechat_index.vue'),
// meta: {title: '公众号内容管理'}, // meta: {title: '公众号内容管理'},
// }, // },
{
path: 'news_edit',
name: 'newsEdit',
component: () => import('@/pages/news/news_edit.vue'),
meta: {title: '编辑新闻',hidden:true},
},
{
path: 'news_index_add',
name: 'newsIndexAdd',
component: () => import('@/pages/news/news_add.vue'),
meta: {title: '添加新闻'},
},
{ {
path: 'news_index', path: 'news_index',
name: 'newsIndex', name: 'newsIndex',
component: () => import('@/pages/news/news_index.vue'), component: () => import('@/pages/news/news_index.vue'),
meta: {title: '新闻内容列表'}, meta: {title: '新闻内容管理'},
}, },
{ {
path: 'news_type', path: 'news_type',
@ -346,31 +128,12 @@ export default [
meta: {title: '新闻类目管理'}, meta: {title: '新闻类目管理'},
} }
], ],
}, { }, {
path: '/points',
name: 'points',
component: Layout,
meta: {title: '积分管理', icon: 'calculation-1'},
children: [
{
path: 'points_rule',
name: 'pointsRule',
component: () => import('@/pages/points/points_rule.vue'),
meta: {title: '积分细则'},
},
{
path: 'points_details',
name: 'pointsDetails',
component: () => import('@/pages/points/points_details.vue'),
meta: {title: '用户积分'},
},
],
},{
path: '/association', path: '/association',
name: 'association', name: 'association',
component: Layout, component: Layout,
redirect: '/association/index', redirect: '/association/index',
meta: {title: '协会管理', icon: 'city-3'}, meta: {title: '协会管理', icon: HomeIcon},
children: [ children: [
{ {
path: 'person ', path: 'person ',
@ -396,76 +159,12 @@ export default [
component: () => import('@/pages/association/index.vue'), component: () => import('@/pages/association/index.vue'),
meta: {title: '关于我们'}, meta: {title: '关于我们'},
}, },
// {
// path: 'system',
// name: 'systemIndex',
// component: () => import('@/pages/association/system.vue'),
// meta: {title: '系统设置'},
// }
],
},
// {
// path: '/pc',
// name: 'pc',
// component: Layout,
// meta: {title: '官网管理', icon: 'tv-2'},
// children: [
// {
// path: 'pc_news_add',
// name: 'pcNewsAdd',
// component: () => import('@/pages/pc/pc_news_add.vue'),
// meta: {title: '添加新闻'},
// },
// {
// path: 'pc_news_edit',
// name: 'pcNewsEdit',
// component: () => import('@/pages/pc/pc_news_edit.vue'),
// meta: {title: '编辑新闻',hidden:true},
// },
// {
// path: 'pc_news',
// name: 'pcNews',
// component: () => import('@/pages/pc/pc_news.vue'),
// meta: {title: '新闻内容'},
// },
// {
// path: 'pc_news_type',
// name: 'pcNewsType',
// component: () => import('@/pages/pc/pc_news_type.vue'),
// meta: {title: '新闻类目'},
// },
// {
// path: 'pc_message',
// name: 'pcSwiper',
// component: () => import('@/pages/pc/pc_message.vue'),
// meta: {title: '留言管理'},
// },
// ],
// },
{
path: '/log',
name: 'log',
component: Layout,
meta: {title: '日志管理', icon: 'git-repository'},
children: [
{ {
path: 'wechat_login', path: 'system',
name: 'wechatLogin', name: 'systemIndex',
component: () => import('@/pages/log/wechat_login.vue'), component: () => import('@/pages/association/system.vue'),
meta: {title: '访问日志'}, meta: {title: '系统设置'},
}, }
{
path: 'visit',
name: 'visitList',
component: () => import('@/pages/log/visit.vue'),
meta: {title: '登陆日志'},
},
{
path: 'operate',
name: 'operateList',
component: () => import('@/pages/log/operate.vue'),
meta: {title: '操作日志'},
},
], ],
} }

View File

@ -72,7 +72,7 @@ const actions = {
} else { } else {
return { return {
name: 'td_dev', name: 'td_dev',
roles: ['userAdd','userIndex0','userInfo','userEdit','userIndex1','DashboardBase','activityAdd1','activityEdit','activityIndex1','activityIndex4','activityAdd4','activityAdd3','activityIndex3','activityAdd2','activityIndex2','activityTop', 'login','newsEdit','newsIndexAdd','newsIndex','newsType'], roles: ['DashboardBase','newsIndex', 'login', 'activityIndex', 'userEditShen', 'userIndex', 'userInfo', 'userEdit'],
}; };
} }
// if (key.group == 1) { // if (key.group == 1) {

View File

@ -4,7 +4,7 @@ import store from '../store'
//const API_HOST ="https://hnyea.0rui.cn/api/"; //const API_HOST ="https://hnyea.0rui.cn/api/";
const API_HOST ="/api/"; const API_HOST ="/api/";
const CODE = { const CODE = {
LOGIN_TIMEOUT: 1000000, LOGIN_TIMEOUT: 100000,
REQUEST_SUCCESS: 0, REQUEST_SUCCESS: 0,
REQUEST_FOBID: 1001, REQUEST_FOBID: 1001,
}; };
@ -33,7 +33,7 @@ instance.interceptors.request.use((config) => {
// 添加token请求头 // 添加token请求头
config.headers.token = token; config.headers.token = token;
} }
config.data = { ...config.data, association_id: 1}; config.data = { ...config.data, association_id: association.association_id};
} }
return config; return config;
}); });
@ -41,7 +41,6 @@ instance.interceptors.request.use((config) => {
instance.interceptors.response.use( instance.interceptors.response.use(
(response) => { (response) => {
const { data } = response; const { data } = response;
console.log(data);
return data; return data;
}, },
(err) => { (err) => {