This commit is contained in:
王创世 2024-05-21 18:16:06 +08:00
parent 38131ff398
commit 058f5874d9
6 changed files with 45 additions and 15 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -205,16 +205,30 @@
/> />
</div> </div>
</t-form-item> </t-form-item>
<t-form-item label="视频" v-if="addForm.activity_type==4">
<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"
></t-upload>
</t-form-item>
<t-form-item label="活动主图"> <t-form-item label="活动主图">
<t-upload <t-upload
ref="uploadRef2"
:action="$store.state.user.apiUrl+'/api/common/upload'" :action="$store.state.user.apiUrl+'/api/common/upload'"
v-model="addForm.activity_image_show" v-model="addForm.activity_image_show"
theme="image" theme="image"
tips="请选择单张图片文件上传" tips="请选择单张图片文件上传"
accept="image/*" accept="image/*"
:allowUploadDuplicateFile="true"
:format-response="formatResponse" :format-response="formatResponse"
></t-upload> ></t-upload>
</t-form-item> </t-form-item>
<t-form-item label="活动开始时间" name="activity_start_time"> <t-form-item label="活动开始时间" name="activity_start_time">
<t-date-picker :clearable="true" :style="{ width: '480px' }" placeholder="活动开始时间" <t-date-picker :clearable="true" :style="{ width: '480px' }" placeholder="活动开始时间"
:enableTimePicker="true" :allow-input="false" :enableTimePicker="true" :allow-input="false"
@ -334,6 +348,8 @@ export default {
activity_location: '', activity_location: '',
activity_type: null, activity_type: null,
}, },
activity_video:'',
activity_video_show:[],
addMode: false, addMode: false,
isEdit: false, isEdit: false,
editID: 0, editID: 0,
@ -642,6 +658,11 @@ export default {
this.infoId = d.id; this.infoId = d.id;
this.openInfoDo(); this.openInfoDo();
}, },
formatResponseVideo(res){
console.log(res);
this.activity_video = res.data.url;
return {url: res.data.fullurl};
},
formatResponse(res) { formatResponse(res) {
console.log(res); console.log(res);
this.addForm.activity_image = res.data.url; this.addForm.activity_image = res.data.url;
@ -684,8 +705,13 @@ export default {
}; };
}, },
edit(d) { edit(d) {
console.log(d);
this.addForm.id = d.id; 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.activity_name = d.activity_name; this.addForm.activity_name = d.activity_name;
this.addForm.activity_desc = d.activity_desc; this.addForm.activity_desc = d.activity_desc;
this.addForm.activity_image_show = [{url: store.state.user.apiUrl + d.activity_image}]; this.addForm.activity_image_show = [{url: store.state.user.apiUrl + d.activity_image}];
@ -758,6 +784,7 @@ export default {
if (this.isEdit) { if (this.isEdit) {
url = '/activity/update'; url = '/activity/update';
} }
this.addForm.video=this.activity_video;
this.$request this.$request
.post(url, this.addForm) .post(url, this.addForm)
.then((res) => { .then((res) => {

View File

@ -65,9 +65,9 @@
<t-form-item label="学位" name="academic_degree"> <t-form-item label="学位" name="academic_degree">
<t-input v-model="formData.academic_degree" placeholder="请输入学位"></t-input> <t-input v-model="formData.academic_degree" placeholder="请输入学位"></t-input>
</t-form-item> </t-form-item>
<t-form-item label="工作单位" name="academic_degree"> <!-- <t-form-item label="工作单位" name="academic_degree">-->
<t-input v-model="formData.work_unit" placeholder="请输入工作单位"></t-input> <!-- <t-input v-model="formData.work_unit" placeholder="请输入工作单位"></t-input>-->
</t-form-item> <!-- </t-form-item>-->
<t-form-item label="单位职务" name="unit_position"> <t-form-item label="单位职务" name="unit_position">
<t-input v-model="formData.unit_position" placeholder="请输入单位职务"></t-input> <t-input v-model="formData.unit_position" placeholder="请输入单位职务"></t-input>
</t-form-item> </t-form-item>
@ -276,7 +276,7 @@ export default {
education: '', education: '',
academic_degree: '', academic_degree: '',
card_number: '', card_number: '',
work_unit: '', // work_unit: '',
unit_position: '', unit_position: '',
wx_number: '', wx_number: '',
mailbox: '', mailbox: '',
@ -357,6 +357,7 @@ export default {
console.log(res); console.log(res);
if (res.code == 1) { if (res.code == 1) {
this.industry_list = res.data; this.industry_list = res.data;
this.industry_list.push({id:0,industry_name:'其他行业'});
} }
}) })
.catch((e) => { .catch((e) => {
@ -396,7 +397,7 @@ export default {
this.formData.education = res.data.education; this.formData.education = res.data.education;
this.formData.academic_degree = res.data.academic_degree; this.formData.academic_degree = res.data.academic_degree;
this.formData.card_number = res.data.card_number; this.formData.card_number = res.data.card_number;
this.formData.work_unit = res.data.work_unit; //this.formData.work_unit = res.data.work_unit;
this.formData.unit_position = res.data.unit_position; this.formData.unit_position = res.data.unit_position;
this.formData.wx_number = res.data.wx_number; this.formData.wx_number = res.data.wx_number;
this.formData.mailbox = res.data.mailbox; this.formData.mailbox = res.data.mailbox;

View File

@ -174,6 +174,8 @@ export default {
}); });
}, },
onSubmit(){ onSubmit(){
this.page=1;
this.list=[];
this.getList(); this.getList();
}, },
} }

View File

@ -7,7 +7,7 @@
<t-image-viewer v-model="visible" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.photo_image]"> <t-image-viewer v-model="visible" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.photo_image]">
<template #trigger="{ open }"> <template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open"> <div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.photo_image" class="tdesign-demo-image-viewer__ui-image--img" /> <img alt="" :src="$store.state.user.apiUrl+info.photo_image" style="width: 100px;height: 100px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div> </div>
</template> </template>
</t-image-viewer> </t-image-viewer>
@ -15,7 +15,7 @@
</t-descriptions-item> </t-descriptions-item>
<t-descriptions-item label="会员姓名" :content="info.nikename"></t-descriptions-item> <t-descriptions-item label="会员姓名" :content="info.nikename"></t-descriptions-item>
<t-descriptions-item label="职位" :content="info.position_name"></t-descriptions-item> <t-descriptions-item label="职位" :content="info.position_name"></t-descriptions-item>
<t-descriptions-item label="行业" :content="info.industry_name"></t-descriptions-item> <t-descriptions-item label="行业" :content="info.industry_id==0?'其他行业':info.industry_name"></t-descriptions-item>
<t-descriptions-item label="手机号" :content="info.phone"></t-descriptions-item> <t-descriptions-item label="手机号" :content="info.phone"></t-descriptions-item>
<t-descriptions-item label="性别"> <t-descriptions-item label="性别">
<div slot="content"> <div slot="content">
@ -39,7 +39,7 @@
<t-image-viewer v-model="visibleZm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardz_image]"> <t-image-viewer v-model="visibleZm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardz_image]">
<template #trigger="{ open }"> <template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open"> <div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.cardz_image" class="tdesign-demo-image-viewer__ui-image--img" /> <img alt="" :src="$store.state.user.apiUrl+info.cardz_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div> </div>
</template> </template>
</t-image-viewer> </t-image-viewer>
@ -50,14 +50,14 @@
<t-image-viewer v-model="visibleFm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardf_image]"> <t-image-viewer v-model="visibleFm" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardf_image]">
<template #trigger="{ open }"> <template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open"> <div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.cardf_image" class="tdesign-demo-image-viewer__ui-image--img" /> <img alt="" :src="$store.state.user.apiUrl+info.cardf_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div> </div>
</template> </template>
</t-image-viewer> </t-image-viewer>
</div> </div>
</t-descriptions-item> </t-descriptions-item>
<t-descriptions-item label="身份证号码" :content="info.card_number"></t-descriptions-item> <t-descriptions-item label="身份证号码" :content="info.card_number"></t-descriptions-item>
<t-descriptions-item label="工作单位" :content="info.work_unit"></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.unit_position"></t-descriptions-item>
<t-descriptions-item label="微信号" :content="info.wx_number"></t-descriptions-item> <t-descriptions-item label="微信号" :content="info.wx_number"></t-descriptions-item>
<t-descriptions-item label="邮箱地址" :content="info.mailbox"></t-descriptions-item> <t-descriptions-item label="邮箱地址" :content="info.mailbox"></t-descriptions-item>
@ -74,7 +74,7 @@
<t-image-viewer v-model="visibleZz" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.business_license_image]"> <t-image-viewer v-model="visibleZz" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.business_license_image]">
<template #trigger="{ open }"> <template #trigger="{ open }">
<div class="tdesign-demo-image-viewer__ui-image" @click="open"> <div class="tdesign-demo-image-viewer__ui-image" @click="open">
<img alt="" :src="$store.state.user.apiUrl+info.business_license_image" class="tdesign-demo-image-viewer__ui-image--img" /> <img alt="" :src="$store.state.user.apiUrl+info.business_license_image" style="width: 150px;" class="tdesign-demo-image-viewer__ui-image--img" />
</div> </div>
</template> </template>
</t-image-viewer> </t-image-viewer>

View File

@ -14,10 +14,9 @@
cellEmptyContent="-" cellEmptyContent="-"
> >
<template #select="{ row }"> <template #select="{ row }">
<t-space size="24px"> <t-space size="24px" v-if="row.id!=0">
<t-button theme="warning" @click="edit(row)">编辑</t-button> <t-button theme="warning" @click="edit(row)">编辑</t-button>
<t-popconfirm content="确认删除吗,行业下的会员将归类为:其他行业" @confirm="del(row)">
<t-popconfirm content="确认删除吗" @confirm="del(row)">
<t-button theme="danger" >删除</t-button> <t-button theme="danger" >删除</t-button>
</t-popconfirm> </t-popconfirm>
</t-space> </t-space>
@ -95,6 +94,7 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.list = res.data; this.list = res.data;
this.list.push({id:0,industry_name:'其他行业'});
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);