bding 1 an în urmă
părinte
comite
5ae8378f51

+ 7 - 3
src/views/rai_manage/activityManage/activityManage.vue

@@ -8,7 +8,7 @@
           <span v-for="(item, index) in listTitle" :key="item.ChartPermissionId" @click="tabsBoxBtn(item, index)" :class="index == tabsPitchon ? 'pitch' : ''">{{ item.PermissionName }}</span>
         </div>
         <div style="display: flex">
-          <el-upload :action="baseApi + '/resource/image/upload'" :show-file-list="false" accept="image/*" :on-success="handleUploadPosterSuccess">
+          <el-upload ref="imgUpload" :action="baseApi + '/resource/image/upload'" :show-file-list="false" accept="image/*" :on-success="handleUploadPosterSuccess">
             <el-button type="primary">识图建会</el-button>
           </el-upload>
           <el-button style="margin-left: 20px" type="primary" @click="$router.push('/addActivity')">添加活动</el-button>
@@ -80,7 +80,7 @@
       </el-col>
     </el-card>
     <atc-particulars :dialogVisible.sync="dialogVisible" :detailData.sync="detailData" />
-    <imgMeeting :isShowImgMeetingDlg.sync="isShowImgMeetingDlg" :imgMeetingData.sync="imgMeetingData" />
+    <imgMeeting :isShowImgMeetingDlg.sync="isShowImgMeetingDlg" :imgMeetingData.sync="imgMeetingData" @childrenImgMeetingHandler="childrenImgMeetingHandler" />
   </div>
 </template>
 
@@ -132,7 +132,7 @@ export default {
       activityLabel: "",
       publishDate: "",
       baseApi: process.env.API_ROOT,
-      isShowImgMeetingDlg: true,
+      isShowImgMeetingDlg: false,
       imgMeetingData: [
         {
           date: "2023-07-24",
@@ -351,6 +351,10 @@ export default {
         ];
       }
     },
+    // 点击取消的回调事件
+    childrenImgMeetingHandler() {
+      this.$refs.imgUpload.clearFiles();
+    },
   },
   /* 页面跳转前记录参数 */
   beforeRouteLeave(to, form, next) {

+ 11 - 4
src/views/rai_manage/activityManage/components/imgMeeting.vue

@@ -17,7 +17,7 @@
           <el-time-picker v-model="item.time" value-format="HH:mm" format="HH:mm A" placeholder="任意时间点" style="width: 160px"> </el-time-picker>
         </div>
         <div class="box-name">
-          <el-input v-model="item.name" placeholder="请输入内容" style="width: 100%"></el-input>
+          <el-input v-model="item.name" placeholder="请输入内容" style="width: 100%" clearable></el-input>
         </div>
         <div class="delete-item-icon" @click="deleteLabelItem(item, index)">
           <img src="~@/assets/img/icons/delete-Item.png" alt="" />
@@ -58,12 +58,19 @@ export default {
   created() {},
   mounted() {},
   methods: {
-    confirmPerson() {},
+    // 确定事件
+    confirmPerson() {
+      let isConfirm = this.imgMeetingData.every((item) => item.date && item.time && item.name);
+      if (!isConfirm) return this.$message.error("每格的内容都必填。");
+      console.log(isConfirm);
+    },
     handleClose() {
-        this.isShowImgMeetingDlg = false;
+      this.isShowImgMeetingDlg = false;
+
+      this.$emit("childrenImgMeetingHandler");
     },
     deleteLabelItem(item, index) {
-        this.$parent.imgMeetingData.splice(index, 1);
+      this.$parent.imgMeetingData.splice(index, 1);
     },
   },
 };