diff --git a/src/components/Map/index.vue b/src/components/Map/index.vue index 2202018..e6bad42 100644 --- a/src/components/Map/index.vue +++ b/src/components/Map/index.vue @@ -81,15 +81,15 @@ const onClick = (e: any) => { ).then((data) => { if (data.status == 0) { if (form.value) { - form.value.address = - data.result.address_component.province + - data.result.address_component.city + - data.result.address_component.district + - data.result.address_component.street + - data.result.address_component.street_number; + // form.value.address = + // data.result.address_component.province + + // data.result.address_component.city + + // data.result.address_component.district + + // data.result.address_component.street + + // data.result.address_component.street_number; form.value.latitude = data.result.location.lat; form.value.longitude = data.result.location.lng; - // form.value.province = data.result.address_component.province; + form.value.address = data.result.formatted_addresses.recommend; // form.value.city = data.result.address_component.city; // form.value.region = data.result.ad_info.adcode; //行政区划编码 form.value.regionCode = data.result.ad_info.adcode; //行政区划编码 @@ -121,18 +121,18 @@ const performSearch = async (text) => { if (data.status == 0) { center.value.lat = data.result.location.lat; center.value.lng = data.result.location.lng; - form.value.address = - data.result.address_components.province + - data.result.address_components.city + - data.result.address_components.district + - data.result.address_components.street + - data.result.address_components.street_number; + // form.value.address = + // data.result.address_components.province + + // data.result.address_components.city + + // data.result.address_components.district + + // data.result.address_components.street + + // data.result.address_components.street_number; form.value.latitude = data.result.location.lat; form.value.longitude = data.result.location.lng; // form.value.region = data.result.ad_info.adcode; //行政区划编码 // form.value.regionCode = data.result.ad_info.adcode; //行政区划编码 - // form.value.province = data.result.address_components.province; + form.value.address = data.result.formatted_addresses.recommend; // form.value.city = data.result.address_components.city; geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }]; console.log(form.value); diff --git a/src/views/manage/activity/index.vue b/src/views/manage/activity/index.vue index 4ee001d..f89d004 100644 --- a/src/views/manage/activity/index.vue +++ b/src/views/manage/activity/index.vue @@ -53,8 +53,8 @@ - - + + + + + + +
{{ form.activityName }}
+
+ +
{{ form.activityDescription }}
+
+ +
{{ form.activityUserCount }}人
+
+
+ +
{{ form.activityTime }}
+
+ +
{{ form.registrationDeadline }}
+
+
+
+ +
{{ form.publisherAddress }}
+
+ +
{{ form.activityLocation }}
+
+
+ + + 发起人收款 + 免费 + + + + + 挑选 + 不挑选 + + 勾选后,发起人需要逐个审核报名者,确认是否通过报名 + + +
+
+ +
{{ item.activityTime }}
+
+ +
{{ item.planContent }}
+
+
+
+
+
@@ -318,6 +372,10 @@ const dialog = reactive({ visible: false, title: '' }); +const seedialog = reactive({ + visible: false, + title: '活动流程' +}); const wendadialog = reactive({ visible: false }); @@ -435,6 +493,16 @@ const handleAdd = () => { reset(); dialog.visible = true; listdatatime.value = [{ activityTime: '', planContent: '' }]; + Mapvalue.value = { + address: '', + longitude: '', + latitude: '' + }; + Mapvaluetwo.value = { + address:'', + longitude: '', + latitude: '' + }; dialog.title = '添加活动信息'; }; // 发布撤销发布 @@ -453,7 +521,7 @@ const saveupdate = async (row?: ActivityVO, type) => { // await updateActivity(form.value).finally(() => (buttonLoading.value = false)); }; /** 修改按钮操作 */ -const handleUpdate = async (row?: ActivityVO) => { +const handleUpdate = async (row?: ActivityVO, type) => { reset(); const _id = row?.id || ids.value[0]; const res = await getActivity(_id); @@ -473,8 +541,12 @@ const handleUpdate = async (row?: ActivityVO) => { latitude: res.data.activityLatitude }; listdatatime.value = arr.data; - dialog.visible = true; - dialog.title = '修改活动信息'; + if (type == 3) { + seedialog.visible = true; + } else { + dialog.visible = true; + dialog.title = '修改活动信息'; + } }; /** 提交按钮 */ @@ -551,6 +623,7 @@ const registrationCountnumlist = async () => { activityUserstotal.value = res.total; numdialog.visible = true; }; +//查看活动流程 const chakanhandle = async (row?: ActivityVO) => {}; onMounted(() => { getList(); diff --git a/src/views/manage/mkJigsaw/index.vue b/src/views/manage/mkJigsaw/index.vue index 0c5c0b7..887acc8 100644 --- a/src/views/manage/mkJigsaw/index.vue +++ b/src/views/manage/mkJigsaw/index.vue @@ -8,8 +8,8 @@ - - + + @@ -73,12 +73,22 @@ 已发布 - - + + @@ -123,6 +133,8 @@ date-format="YYYY/MM/DD ddd" time-format="A hh:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" + :picker-options="{ disabledDate: dateOptions }" + @change="mkdatetime" /> @@ -151,6 +163,57 @@
+ + + + +
{{ form.name }}
+
+ + + + + + + + + + + + + + + + + + + + + +
{{ form.startDate }}~{{ form.endDate }}
+
+ +
{{form.jigsawConfigCount}}
+
+ +
{{form.awardConfigCount}}
+
+ + + + + +
+
+ +
{{item.probability}}%
+
+
+
+
+
@@ -192,6 +255,12 @@ const mkJigsawFormRef = ref(); const imagegoodsoptions = ref([]); const goodsdata = ref([]); const imagelistdata = ref([]); +const note_publish_list = ref([ + { label: '已发布', value: 2 }, + { label: '审核中', value: 1 }, + { label: '未发布', value: 0 } + // { label: '草稿', value: 1 } +]); const goodleibielist = ref([]); const dialog = reactive({ visible: false, @@ -276,7 +345,7 @@ const data = reactive>({ controlJigsawIndex: [{ required: true, message: '控制得奖拼图不能为空', trigger: 'blur' }], joinCount: [{ required: true, message: '参与人数不能为空', trigger: 'blur' }], awardCount: [{ required: true, message: '实际得奖人数不能为空', trigger: 'blur' }], - status: [{ required: true, message: '发布状态 0-未发布 1-已发布不能为空', trigger: 'change' }] + status: [{ required: true, message: '发布状态不能为空', trigger: 'change' }] } }); @@ -311,6 +380,7 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { + queryParams.value.status = ''; queryFormRef.value?.resetFields(); handleQuery(); }; @@ -358,8 +428,12 @@ const handleUpdate = async (row?: MkJigsawVO, type) => { value2.value = [form.value.startDate, form.value.endDate]; // form.value.endDate = value2.value[1]; } - dialog.visible = true; - dialog.title = '修改拼图任务'; + if (type == 1) { + mksave.visible = true; + } else { + dialog.visible = true; + dialog.title = '修改拼图任务'; + } }; /** 提交按钮 */ @@ -389,11 +463,26 @@ const submitForm = () => { } }); }; - +// 发布撤销发布 +const saveupdate = async (row?: MkJigsawVO, type) => { + const _id = row?.id || ids.value[0]; + const res = await getMkJigsaw(_id); + Object.assign(form.value, res.data); + form.value.status = type == 1 ? 1 : 0; + const test = type == 1 ? '发布' : '撤销发布'; + const _ids = row?.name || ids.value; + await proxy?.$modal.confirm('是否确认' + test + '拼图游戏名称为' + _ids + '的数据项?').finally(() => (loading.value = false)); + await updateMkJigsaw(form.value).finally(() => (buttonLoading.value = false)); + proxy?.$modal.msgSuccess(test + '成功'); + await getList(); + // await updateActivity(form.value).finally(() => (buttonLoading.value = false)); +}; /** 删除按钮操作 */ const handleDelete = async (row?: MkJigsawVO) => { const _ids = row?.id || ids.value; - await proxy?.$modal.confirm('是否确认删除拼图游戏编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); + const _idsname = row?.name || ids.value; + + await proxy?.$modal.confirm('是否确认删除拼图游戏名称为"' + _idsname + '"的数据项?').finally(() => (loading.value = false)); await delMkJigsaw(_ids); proxy?.$modal.msgSuccess('删除成功'); await getList(); @@ -426,7 +515,7 @@ const selectnumlist = () => { }; /*商品列表*/ const getproductall = async () => { - const res = await productall(); + const res = await productall({ status: 1 }); console.log(res); imagegoodsoptions.value = res.data; }; @@ -451,7 +540,12 @@ const imagesui = async (row) => { console.log(row); const res = await mkJigsawDetaillist({ jigsawId: row.id }); console.log(res); - imagelistdata.value = res.data; + imagelistdata.value = res.data.map((item, index) => { + return { + ...item, + probability: index == 0 ? `${item.probability}人` : `${item.probability}%` + }; + }); }; const goodleibie = async () => { const res = await productCategoryall(); @@ -459,14 +553,23 @@ const goodleibie = async () => { }; const goodsleibiesave = (id) => { for (let i = 0; i < goodleibielist.value.length; i++) { - console.log(goodleibielist.value[i].id); + // console.log(goodleibielist.value[i].id); if (goodleibielist.value[i].id === id) { return goodleibielist.value[i].category; } } return null; }; - +// 选择今天及今天以后的日期 +const dateOptions = (time) => { + return time.getTime() < Date.now() - 8.64e6; +}; +const mkdatetime = () => { + if (value2.value.length > 0) { + form.value.startDate = value2.value[0]; + form.value.endDate = value2.value[1]; + } +}; onMounted(() => { getList(); getproductall(); diff --git a/src/views/manage/noteManage/index.vue b/src/views/manage/noteManage/index.vue index a988f86..e61255c 100644 --- a/src/views/manage/noteManage/index.vue +++ b/src/views/manage/noteManage/index.vue @@ -19,7 +19,7 @@ - + @@ -168,8 +168,8 @@
{{ form.title }}
-
{{formatTag(form.tagId) }}
-
{{formatlocation(form.location) }}
+
{{ formatTag(form.tagId) }}
+
{{ formatlocation(form.location) }}
@@ -375,6 +375,7 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { + queryParams.value.status = ''; queryFormRef.value?.resetFields(); handleQuery(); }; @@ -408,7 +409,7 @@ const handleUpdate = async (row?: NotebookVO) => { const fabudata = async (row?: NotebookVO) => { const _id = row?.id || ids.value[0]; - const _idtitle = row?.title ; + const _idtitle = row?.title; const res = await getNotebook(_id); Object.assign(form.value, res.data); form.value.status = row.status == 3 ? 0 : 2; diff --git a/src/views/manage/report/index.vue b/src/views/manage/report/index.vue index 1ac7c0b..f8a2a6a 100644 --- a/src/views/manage/report/index.vue +++ b/src/views/manage/report/index.vue @@ -7,9 +7,6 @@ - - - @@ -63,7 +60,7 @@