Pārlūkot izejas kodu

修改拖动上传问题和样式问题

zengyicheng 2 gadi atpakaļ
vecāks
revīzija
8c4d0f2067

+ 61 - 61
src/components/pages/race/addRace/projectActpro.vue

@@ -57,65 +57,63 @@
                         class="add_chapters_box"
                         style="display: flex; flex-direction: column"
                       >
-                        <transition-group tag="div">
-                          <div
-                            class="chapter_upload"
-                            v-for="(item, index) in sa.data"
-                            :key="item.id"
-                            draggable="true"
-                            @dragstart="handleDragStart($event, item)"
-                            @dragover.prevent="handleDragOver($event, item)"
-                            @dragenter="handleDragEnter($event, item)"
-                            @dragend="handleDragEnd($event, item, saIndex)"
-                          >
-                            <div class="chapter_upload_t"></div>
-                            <div class="chapter_upload_o">
-                              <div class="chapter_upload_l">
+                        <div
+                          class="chapter_upload"
+                          v-for="(item, index) in sa.data"
+                          :key="index"
+                          draggable="true"
+                          @dragstart="handleDragStart($event, index)"
+                          @dragover.prevent="handleDragOver($event, index)"
+                          @dragenter="handleDragEnter($event, index)"
+                          @dragend="handleDragEnd($event, index, saIndex)"
+                        >
+                          <div class="chapter_upload_t"></div>
+                          <div class="chapter_upload_o">
+                            <div class="chapter_upload_l">
+                              <div
+                                v-if="item.type == 2"
+                                class="chapter_upload_l_i1"
+                              ></div>
+                              <div
+                                v-if="item.type == 1 || item.type == 3"
+                                class="chapter_upload_l_i5"
+                              ></div>
+                            </div>
+                            <div class="chapter_upload_ic">
+                              <div class="chapter_upload_ic_l"></div>
+                              <div
+                                class="chapter_upload_ic_r"
+                                @click.stop="
+                                  deleteChapterData($event, saIndex, index)
+                                "
+                              >
+                                <div></div>
+                              </div>
+                            </div>
+                            <div class="chapter_upload_n">
+                              <input
+                                class="first"
+                                v-if="item.type == 1 || item.type == 3"
+                                :placeholder="item.name"
+                              />
+                              <input
+                                class="first"
+                                v-if="item.type == 2"
+                                :placeholder="item.name"
+                              />
+                              <div class="chapter_upload_ud">
                                 <div
-                                  v-if="item.type == 2"
-                                  class="chapter_upload_l_i1"
+                                  class="chapter_upload_up"
+                                  @click="upCd($event, saIndex, index)"
                                 ></div>
                                 <div
-                                  v-if="item.type == 1 || item.type == 3"
-                                  class="chapter_upload_l_i5"
+                                  class="chapter_upload_down"
+                                  @click="downCd($event, saIndex, index)"
                                 ></div>
                               </div>
-                              <div class="chapter_upload_ic">
-                                <div class="chapter_upload_ic_l"></div>
-                                <div
-                                  class="chapter_upload_ic_r"
-                                  @click.stop="
-                                    deleteChapterData($event, saIndex, index)
-                                  "
-                                >
-                                  <div></div>
-                                </div>
-                              </div>
-                              <div class="chapter_upload_n">
-                                <input
-                                  class="first"
-                                  v-if="item.type == 1 || item.type == 3"
-                                  :placeholder="item.name"
-                                />
-                                <input
-                                  class="first"
-                                  v-if="item.type == 2"
-                                  :placeholder="item.name"
-                                />
-                                <div class="chapter_upload_ud">
-                                  <div
-                                    class="chapter_upload_up"
-                                    @click="upCd($event, saIndex, index)"
-                                  ></div>
-                                  <div
-                                    class="chapter_upload_down"
-                                    @click="downCd($event, saIndex, index)"
-                                  ></div>
-                                </div>
-                              </div>
                             </div>
                           </div>
-                        </transition-group>
+                        </div>
                       </div>
                     </div>
                     <div class="add_info_box">
@@ -147,7 +145,7 @@
                             src="../../../../assets/loading.gif"
                           />上传中,请稍后
                         </div>
-                        <div>
+                        <div style="margin-bottom: 10px">
                           <div>
                             {{ sa.data.isFinishSize }}M /
                             {{ sa.data.isAllSize ? sa.data.isAllSize : 0 }}M
@@ -235,16 +233,17 @@ export default {
       this.dragging = item;
     },
     handleDragEnd(e, item, i) {
-      if (this.ending.id === this.dragging.id) {
+      if (this.ending === this.dragging) {
         return;
       }
       let newItems = [...this.raceAct.stageBox[i].data];
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(this.ending);
-      newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src]));
-      console.log(newItems);
 
-      this.raceAct.stageBox[i].data = newItems;
+      const src = newItems[this.dragging];
+      const dst = newItems[this.ending];
+      this.raceAct.stageBox[i].data[this.dragging] = dst;
+      this.raceAct.stageBox[i].data[this.ending] = src;
+
+      this.$forceUpdate();
       this.$nextTick(() => {
         this.dragging = null;
         this.ending = null;
@@ -419,7 +418,8 @@ export default {
           })
           .send(function (err, data) {
             _this.raceAct.stageBox[sindex].data.progress = 100;
-            _this.raceAct.stageBox[sindex].data.isFinishSize = _this.raceAct.stageBox[sindex].data.isAllSize;
+            _this.raceAct.stageBox[sindex].data.isFinishSize =
+              _this.raceAct.stageBox[sindex].data.isAllSize;
             _this.$forceUpdate();
             setTimeout(() => {
               _this.raceAct.stageBox[sindex].data.proVisible = false;
@@ -845,7 +845,7 @@ export default {
 }
 
 .progressBox .lbox {
-  height: 60px;
+  height: 50px;
   font-size: 19px;
   display: flex;
   align-items: center;

+ 57 - 58
src/components/pages/race/addRace/projectEffect.vue

@@ -45,63 +45,61 @@
                         class="add_chapters_box"
                         style="display: flex; flex-direction: column"
                       >
-                        <transition-group tag="div">
-                          <div
-                            class="chapter_upload"
-                            v-for="(item, index) in raceEff.data"
-                            :key="item.id"
-                            draggable="true"
-                            @dragstart="handleDragStart($event, item)"
-                            @dragover.prevent="handleDragOver($event, item)"
-                            @dragenter="handleDragEnter($event, item)"
-                            @dragend="handleDragEnd($event, item)"
-                          >
-                            <div class="chapter_upload_t"></div>
-                            <div class="chapter_upload_o">
-                              <div class="chapter_upload_l">
+                        <div
+                          class="chapter_upload"
+                          v-for="(item, index) in raceEff.data"
+                          :key="index"
+                          draggable="true"
+                          @dragstart="handleDragStart($event, index)"
+                          @dragover.prevent="handleDragOver($event, index)"
+                          @dragenter="handleDragEnter($event, index)"
+                          @dragend="handleDragEnd($event, index)"
+                        >
+                          <div class="chapter_upload_t"></div>
+                          <div class="chapter_upload_o">
+                            <div class="chapter_upload_l">
+                              <div
+                                v-if="item.type == 2"
+                                class="chapter_upload_l_i1"
+                              ></div>
+                              <div
+                                v-if="item.type == 1 || item.type == 3"
+                                class="chapter_upload_l_i5"
+                              ></div>
+                            </div>
+                            <div class="chapter_upload_ic">
+                              <div class="chapter_upload_ic_l"></div>
+                              <div
+                                class="chapter_upload_ic_r"
+                                @click.stop="deleteChapterData($event, index)"
+                              >
+                                <div></div>
+                              </div>
+                            </div>
+                            <div class="chapter_upload_n">
+                              <input
+                                class="first"
+                                v-if="item.type == 1 || item.type == 3"
+                                :placeholder="item.name"
+                              />
+                              <input
+                                class="first"
+                                v-if="item.type == 2"
+                                :placeholder="item.name"
+                              />
+                              <div class="chapter_upload_ud">
                                 <div
-                                  v-if="item.type == 2"
-                                  class="chapter_upload_l_i1"
+                                  class="chapter_upload_up"
+                                  @click="upCd($event, index)"
                                 ></div>
                                 <div
-                                  v-if="item.type == 1 || item.type == 3"
-                                  class="chapter_upload_l_i5"
+                                  class="chapter_upload_down"
+                                  @click="downCd($event, index)"
                                 ></div>
                               </div>
-                              <div class="chapter_upload_ic">
-                                <div class="chapter_upload_ic_l"></div>
-                                <div
-                                  class="chapter_upload_ic_r"
-                                  @click.stop="deleteChapterData($event, index)"
-                                >
-                                  <div></div>
-                                </div>
-                              </div>
-                              <div class="chapter_upload_n">
-                                <input
-                                  class="first"
-                                  v-if="item.type == 1 || item.type == 3"
-                                  :placeholder="item.name"
-                                />
-                                <input
-                                  class="first"
-                                  v-if="item.type == 2"
-                                  :placeholder="item.name"
-                                />
-                                <div class="chapter_upload_ud">
-                                  <div
-                                    class="chapter_upload_up"
-                                    @click="upCd($event, index)"
-                                  ></div>
-                                  <div
-                                    class="chapter_upload_down"
-                                    @click="downCd($event, index)"
-                                  ></div>
-                                </div>
-                              </div>
                             </div>
                           </div>
-                        </transition-group>
+                        </div>
                       </div>
                     </div>
                     <div class="add_info_box">
@@ -133,7 +131,7 @@
                             src="../../../../assets/loading.gif"
                           />上传中,请稍后
                         </div>
-                        <div>
+                        <div style="margin-bottom: 10px">
                           <div>
                             {{ raceEff.data.isFinishSize }}M /
                             {{
@@ -211,16 +209,17 @@ export default {
       this.dragging = item;
     },
     handleDragEnd(e, item) {
-      if (this.ending.id === this.dragging.id) {
+      if (this.ending === this.dragging) {
         return;
       }
       let newItems = [...this.raceEff.data];
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(this.ending);
-      newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src]));
-      console.log(newItems);
+      const src = newItems[this.dragging];
+      const dst = newItems[this.ending];
+      this.raceEff.data[this.dragging] = dst;
+      this.raceEff.data[this.ending] = src;
+
+      this.$forceUpdate();
 
-      this.raceEff.data = newItems;
       this.$nextTick(() => {
         this.dragging = null;
         this.ending = null;
@@ -857,7 +856,7 @@ export default {
 }
 
 .progressBox .lbox {
-  height: 60px;
+  height: 50px;
   font-size: 19px;
   display: flex;
   align-items: center;

+ 56 - 58
src/components/pages/race/addRace/projectExceva.vue

@@ -45,63 +45,61 @@
                         class="add_chapters_box"
                         style="display: flex; flex-direction: column"
                       >
-                        <transition-group tag="div">
-                          <div
-                            class="chapter_upload"
-                            v-for="(item, index) in raceExc.data"
-                            :key="item.id"
-                            draggable="true"
-                            @dragstart="handleDragStart($event, item)"
-                            @dragover.prevent="handleDragOver($event, item)"
-                            @dragenter="handleDragEnter($event, item)"
-                            @dragend="handleDragEnd($event, item)"
-                          >
-                            <div class="chapter_upload_t"></div>
-                            <div class="chapter_upload_o">
-                              <div class="chapter_upload_l">
+                        <div
+                          class="chapter_upload"
+                          v-for="(item, index) in raceExc.data"
+                          :key="index"
+                          draggable="true"
+                          @dragstart="handleDragStart($event, index)"
+                          @dragover.prevent="handleDragOver($event, index)"
+                          @dragenter="handleDragEnter($event, index)"
+                          @dragend="handleDragEnd($event, index)"
+                        >
+                          <div class="chapter_upload_t"></div>
+                          <div class="chapter_upload_o">
+                            <div class="chapter_upload_l">
+                              <div
+                                v-if="item.type == 2"
+                                class="chapter_upload_l_i1"
+                              ></div>
+                              <div
+                                v-if="item.type == 1 || item.type == 3"
+                                class="chapter_upload_l_i5"
+                              ></div>
+                            </div>
+                            <div class="chapter_upload_ic">
+                              <div class="chapter_upload_ic_l"></div>
+                              <div
+                                class="chapter_upload_ic_r"
+                                @click.stop="deleteChapterData($event, index)"
+                              >
+                                <div></div>
+                              </div>
+                            </div>
+                            <div class="chapter_upload_n">
+                              <input
+                                class="first"
+                                v-if="item.type == 1 || item.type == 3"
+                                :placeholder="item.name"
+                              />
+                              <input
+                                class="first"
+                                v-if="item.type == 2"
+                                :placeholder="item.name"
+                              />
+                              <div class="chapter_upload_ud">
                                 <div
-                                  v-if="item.type == 2"
-                                  class="chapter_upload_l_i1"
+                                  class="chapter_upload_up"
+                                  @click="upCd($event, index)"
                                 ></div>
                                 <div
-                                  v-if="item.type == 1 || item.type == 3"
-                                  class="chapter_upload_l_i5"
+                                  class="chapter_upload_down"
+                                  @click="downCd($event, index)"
                                 ></div>
                               </div>
-                              <div class="chapter_upload_ic">
-                                <div class="chapter_upload_ic_l"></div>
-                                <div
-                                  class="chapter_upload_ic_r"
-                                  @click.stop="deleteChapterData($event, index)"
-                                >
-                                  <div></div>
-                                </div>
-                              </div>
-                              <div class="chapter_upload_n">
-                                <input
-                                  class="first"
-                                  v-if="item.type == 1 || item.type == 3"
-                                  :placeholder="item.name"
-                                />
-                                <input
-                                  class="first"
-                                  v-if="item.type == 2"
-                                  :placeholder="item.name"
-                                />
-                                <div class="chapter_upload_ud">
-                                  <div
-                                    class="chapter_upload_up"
-                                    @click="upCd($event, index)"
-                                  ></div>
-                                  <div
-                                    class="chapter_upload_down"
-                                    @click="downCd($event, index)"
-                                  ></div>
-                                </div>
-                              </div>
                             </div>
                           </div>
-                        </transition-group>
+                        </div>
                       </div>
                     </div>
                     <div class="add_info_box">
@@ -133,7 +131,7 @@
                             src="../../../../assets/loading.gif"
                           />上传中,请稍后
                         </div>
-                        <div>
+                        <div style="margin-bottom: 10px">
                           <div>
                             {{ raceExc.data.isFinishSize }}M /
                             {{
@@ -211,16 +209,16 @@ export default {
       this.dragging = item;
     },
     handleDragEnd(e, item) {
-      if (this.ending.id === this.dragging.id) {
+      if (this.ending === this.dragging) {
         return;
       }
       let newItems = [...this.raceExc.data];
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(this.ending);
-      newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src]));
-      console.log(newItems);
+      const src = newItems[this.dragging];
+      const dst = newItems[this.ending];
+      this.raceExc.data[this.dragging] = dst;
+      this.raceExc.data[this.ending] = src;
 
-      this.raceExc.data = newItems;
+      this.$forceUpdate();
       this.$nextTick(() => {
         this.dragging = null;
         this.ending = null;
@@ -857,7 +855,7 @@ export default {
 }
 
 .progressBox .lbox {
-  height: 60px;
+  height: 50px;
   font-size: 19px;
   display: flex;
   align-items: center;

+ 15 - 16
src/components/pages/race/addRace/raceDetail.vue

@@ -469,16 +469,15 @@
                         class="add_chapters_box"
                         style="display: flex; flex-direction: column"
                       >
-                        <transition-group tag="div">
                           <div
                             class="chapter_upload"
                             v-for="(item, index) in raceDetail.data"
-                            :key="item.id"
+                            :key="index"
                             draggable="true"
-                            @dragstart="handleDragStart($event, item)"
-                            @dragover.prevent="handleDragOver($event, item)"
-                            @dragenter="handleDragEnter($event, item)"
-                            @dragend="handleDragEnd($event, item)"
+                            @dragstart="handleDragStart($event, index)"
+                            @dragover.prevent="handleDragOver($event, index)"
+                            @dragenter="handleDragEnter($event, index)"
+                            @dragend="handleDragEnd($event, index)"
                           >
                             <div class="chapter_upload_t"></div>
                             <div class="chapter_upload_o">
@@ -527,7 +526,6 @@
                               </div>
                             </div>
                           </div>
-                        </transition-group>
                       </div>
                     </div>
                     <div class="add_info_box">
@@ -564,7 +562,7 @@
                             src="../../../../assets/loading.gif"
                           />上传中,请稍后
                         </div>
-                        <div>
+                        <div style="margin-bottom: 10px">
                           <div>
                             {{ raceDetail.data.isFinishSize }}M /
                             {{
@@ -857,16 +855,16 @@ export default {
       this.dragging = item;
     },
     handleDragEnd(e, item) {
-      if (this.ending.id === this.dragging.id) {
+      if (this.ending === this.dragging) {
         return;
       }
       let newItems = [...this.raceDetail.data];
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(this.ending);
-      newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src]));
-      console.log(newItems);
+      const src = newItems[this.dragging];
+      const dst = newItems[this.ending];
+      this.raceDetail.data[this.dragging] = dst;
+      this.raceDetail.data[this.ending] = src;
 
-      this.raceDetail.data = newItems;
+      this.$forceUpdate();
       this.$nextTick(() => {
         this.dragging = null;
         this.ending = null;
@@ -1155,7 +1153,8 @@ export default {
           .send(function (err, data) {
             // loading.close();
             _this.raceDetail.data.progress = 100;
-            _this.raceDetail.data.isFinishSize = _this.raceDetail.data.isAllSize;
+            _this.raceDetail.data.isFinishSize =
+              _this.raceDetail.data.isAllSize;
             _this.$forceUpdate();
             setTimeout(() => {
               _this.raceDetail.data.proVisible = false;
@@ -2234,7 +2233,7 @@ export default {
 }
 
 .progressBox .lbox {
-  height: 60px;
+  height: 50px;
   font-size: 19px;
   display: flex;
   align-items: center;

+ 161 - 169
src/components/pages/race/addRace/raceOverview.vue

@@ -132,65 +132,61 @@
                       class="add_chapters_box"
                       style="display: flex; flex-direction: column"
                     >
-                      <transition-group tag="div">
-                        <div
-                          class="chapter_upload"
-                          v-for="(item, index) in raceOver.driQuestion.data"
-                          :key="item.id"
-                          draggable="true"
-                          @dragstart="handleDragStart($event, item)"
-                          @dragover.prevent="handleDragOver($event, item)"
-                          @dragenter="handleDragEnter($event, item)"
-                          @dragend="handleDragEnd($event, item, 0)"
-                        >
-                          <div class="chapter_upload_t"></div>
-                          <div class="chapter_upload_o">
-                            <div class="chapter_upload_l">
+                      <div
+                        class="chapter_upload"
+                        v-for="(item, index) in raceOver.driQuestion.data"
+                        :key="index"
+                        draggable="true"
+                        @dragstart="handleDragStart($event, index)"
+                        @dragover.prevent="handleDragOver($event, index)"
+                        @dragenter="handleDragEnter($event, index)"
+                        @dragend="handleDragEnd($event, index, 0)"
+                      >
+                        <div class="chapter_upload_t"></div>
+                        <div class="chapter_upload_o">
+                          <div class="chapter_upload_l">
+                            <div
+                              v-if="item.type == 2"
+                              class="chapter_upload_l_i1"
+                            ></div>
+                            <div
+                              v-if="item.type == 1 || item.type == 3"
+                              class="chapter_upload_l_i5"
+                            ></div>
+                          </div>
+                          <div class="chapter_upload_ic">
+                            <div class="chapter_upload_ic_l"></div>
+                            <div
+                              class="chapter_upload_ic_r"
+                              @click.stop="deleteChapterData($event, index, 0)"
+                            >
+                              <div></div>
+                            </div>
+                          </div>
+                          <div class="chapter_upload_n">
+                            <input
+                              class="first"
+                              v-if="item.type == 1 || item.type == 3"
+                              :placeholder="item.name"
+                            />
+                            <input
+                              class="first"
+                              v-if="item.type == 2"
+                              :placeholder="item.name"
+                            />
+                            <div class="chapter_upload_ud">
                               <div
-                                v-if="item.type == 2"
-                                class="chapter_upload_l_i1"
+                                class="chapter_upload_up"
+                                @click="upCd($event, index, 0)"
                               ></div>
                               <div
-                                v-if="item.type == 1 || item.type == 3"
-                                class="chapter_upload_l_i5"
+                                class="chapter_upload_down"
+                                @click="downCd($event, index, 0)"
                               ></div>
                             </div>
-                            <div class="chapter_upload_ic">
-                              <div class="chapter_upload_ic_l"></div>
-                              <div
-                                class="chapter_upload_ic_r"
-                                @click.stop="
-                                  deleteChapterData($event, index, 0)
-                                "
-                              >
-                                <div></div>
-                              </div>
-                            </div>
-                            <div class="chapter_upload_n">
-                              <input
-                                class="first"
-                                v-if="item.type == 1 || item.type == 3"
-                                :placeholder="item.name"
-                              />
-                              <input
-                                class="first"
-                                v-if="item.type == 2"
-                                :placeholder="item.name"
-                              />
-                              <div class="chapter_upload_ud">
-                                <div
-                                  class="chapter_upload_up"
-                                  @click="upCd($event, index, 0)"
-                                ></div>
-                                <div
-                                  class="chapter_upload_down"
-                                  @click="downCd($event, index, 0)"
-                                ></div>
-                              </div>
-                            </div>
                           </div>
                         </div>
-                      </transition-group>
+                      </div>
                     </div>
                   </div>
                   <div class="add_info_box">
@@ -222,7 +218,7 @@
                           src="../../../../assets/loading.gif"
                         />上传中,请稍后
                       </div>
-                      <div>
+                      <div style="margin-bottom: 10px">
                         <div>
                           {{ raceOver.driQuestion.data.isFinishSize }}M /
                           {{
@@ -306,65 +302,61 @@
                       class="add_chapters_box"
                       style="display: flex; flex-direction: column"
                     >
-                      <transition-group tag="div">
-                        <div
-                          class="chapter_upload"
-                          v-for="(item1, index1) in raceOver.tarDesign.data"
-                          :key="item1.id"
-                          draggable="true"
-                          @dragstart="handleDragStart($event, item1)"
-                          @dragover.prevent="handleDragOver($event, item1)"
-                          @dragenter="handleDragEnter($event, item1)"
-                          @dragend="handleDragEnd($event, item1, 1)"
-                        >
-                          <div class="chapter_upload_t"></div>
-                          <div class="chapter_upload_o">
-                            <div class="chapter_upload_l">
+                      <div
+                        class="chapter_upload"
+                        v-for="(item1, index1) in raceOver.tarDesign.data"
+                        :key="index1"
+                        draggable="true"
+                        @dragstart="handleDragStart($event, index1)"
+                        @dragover.prevent="handleDragOver($event, index1)"
+                        @dragenter="handleDragEnter($event, index1)"
+                        @dragend="handleDragEnd($event, index1, 1)"
+                      >
+                        <div class="chapter_upload_t"></div>
+                        <div class="chapter_upload_o">
+                          <div class="chapter_upload_l">
+                            <div
+                              v-if="item1.type == 2"
+                              class="chapter_upload_l_i1"
+                            ></div>
+                            <div
+                              v-if="item1.type == 1 || item1.type == 3"
+                              class="chapter_upload_l_i5"
+                            ></div>
+                          </div>
+                          <div class="chapter_upload_ic">
+                            <div class="chapter_upload_ic_l"></div>
+                            <div
+                              class="chapter_upload_ic_r"
+                              @click.stop="deleteChapterData($event, index1, 1)"
+                            >
+                              <div></div>
+                            </div>
+                          </div>
+                          <div class="chapter_upload_n">
+                            <input
+                              class="first"
+                              v-if="item1.type == 1 || item1.type == 3"
+                              :placeholder="item1.name"
+                            />
+                            <input
+                              class="first"
+                              v-if="item1.type == 2"
+                              :placeholder="item1.name"
+                            />
+                            <div class="chapter_upload_ud">
                               <div
-                                v-if="item1.type == 2"
-                                class="chapter_upload_l_i1"
+                                class="chapter_upload_up"
+                                @click="upCd($event, index1, 1)"
                               ></div>
                               <div
-                                v-if="item1.type == 1 || item1.type == 3"
-                                class="chapter_upload_l_i5"
+                                class="chapter_upload_down"
+                                @click="downCd($event, index1, 1)"
                               ></div>
                             </div>
-                            <div class="chapter_upload_ic">
-                              <div class="chapter_upload_ic_l"></div>
-                              <div
-                                class="chapter_upload_ic_r"
-                                @click.stop="
-                                  deleteChapterData($event, index1, 1)
-                                "
-                              >
-                                <div></div>
-                              </div>
-                            </div>
-                            <div class="chapter_upload_n">
-                              <input
-                                class="first"
-                                v-if="item1.type == 1 || item1.type == 3"
-                                :placeholder="item1.name"
-                              />
-                              <input
-                                class="first"
-                                v-if="item1.type == 2"
-                                :placeholder="item1.name"
-                              />
-                              <div class="chapter_upload_ud">
-                                <div
-                                  class="chapter_upload_up"
-                                  @click="upCd($event, index1, 1)"
-                                ></div>
-                                <div
-                                  class="chapter_upload_down"
-                                  @click="downCd($event, index1, 1)"
-                                ></div>
-                              </div>
-                            </div>
                           </div>
                         </div>
-                      </transition-group>
+                      </div>
                     </div>
                   </div>
                   <div class="add_info_box">
@@ -396,7 +388,7 @@
                           src="../../../../assets/loading.gif"
                         />上传中,请稍后
                       </div>
-                      <div>
+                      <div style="margin-bottom: 10px">
                         <div>
                           {{ raceOver.tarDesign.data.isFinishSize }}M /
                           {{
@@ -479,65 +471,61 @@
                       class="add_chapters_box"
                       style="display: flex; flex-direction: column"
                     >
-                      <transition-group tag="div">
-                        <div
-                          class="chapter_upload"
-                          v-for="(item2, index2) in raceOver.actiDesign.data"
-                          :key="item2.id"
-                          draggable="true"
-                          @dragstart="handleDragStart($event, item2)"
-                          @dragover.prevent="handleDragOver($event, item2)"
-                          @dragenter="handleDragEnter($event, item2)"
-                          @dragend="handleDragEnd($event, item2, 2)"
-                        >
-                          <div class="chapter_upload_t"></div>
-                          <div class="chapter_upload_o">
-                            <div class="chapter_upload_l">
+                      <div
+                        class="chapter_upload"
+                        v-for="(item2, index2) in raceOver.actiDesign.data"
+                        :key="index2"
+                        draggable="true"
+                        @dragstart="handleDragStart($event, index2)"
+                        @dragover.prevent="handleDragOver($event, index2)"
+                        @dragenter="handleDragEnter($event, index2)"
+                        @dragend="handleDragEnd($event, index2, 2)"
+                      >
+                        <div class="chapter_upload_t"></div>
+                        <div class="chapter_upload_o">
+                          <div class="chapter_upload_l">
+                            <div
+                              v-if="item2.type == 2"
+                              class="chapter_upload_l_i1"
+                            ></div>
+                            <div
+                              v-if="item2.type == 1 || item2.type == 3"
+                              class="chapter_upload_l_i5"
+                            ></div>
+                          </div>
+                          <div class="chapter_upload_ic">
+                            <div class="chapter_upload_ic_l"></div>
+                            <div
+                              class="chapter_upload_ic_r"
+                              @click.stop="deleteChapterData($event, index2, 2)"
+                            >
+                              <div></div>
+                            </div>
+                          </div>
+                          <div class="chapter_upload_n">
+                            <input
+                              class="first"
+                              v-if="item2.type == 1 || item2.type == 3"
+                              :placeholder="item2.name"
+                            />
+                            <input
+                              class="first"
+                              v-if="item2.type == 2"
+                              :placeholder="item2.name"
+                            />
+                            <div class="chapter_upload_ud">
                               <div
-                                v-if="item2.type == 2"
-                                class="chapter_upload_l_i1"
+                                class="chapter_upload_up"
+                                @click="upCd($event, index2, 2)"
                               ></div>
                               <div
-                                v-if="item2.type == 1 || item2.type == 3"
-                                class="chapter_upload_l_i5"
+                                class="chapter_upload_down"
+                                @click="downCd($event, index2, 2)"
                               ></div>
                             </div>
-                            <div class="chapter_upload_ic">
-                              <div class="chapter_upload_ic_l"></div>
-                              <div
-                                class="chapter_upload_ic_r"
-                                @click.stop="
-                                  deleteChapterData($event, index2, 2)
-                                "
-                              >
-                                <div></div>
-                              </div>
-                            </div>
-                            <div class="chapter_upload_n">
-                              <input
-                                class="first"
-                                v-if="item2.type == 1 || item2.type == 3"
-                                :placeholder="item2.name"
-                              />
-                              <input
-                                class="first"
-                                v-if="item2.type == 2"
-                                :placeholder="item2.name"
-                              />
-                              <div class="chapter_upload_ud">
-                                <div
-                                  class="chapter_upload_up"
-                                  @click="upCd($event, index2, 2)"
-                                ></div>
-                                <div
-                                  class="chapter_upload_down"
-                                  @click="downCd($event, index2, 2)"
-                                ></div>
-                              </div>
-                            </div>
                           </div>
                         </div>
-                      </transition-group>
+                      </div>
                     </div>
                   </div>
                   <div class="add_info_box">
@@ -569,7 +557,7 @@
                           src="../../../../assets/loading.gif"
                         />上传中,请稍后
                       </div>
-                      <div>
+                      <div style="margin-bottom: 10px">
                         <div>
                           {{ raceOver.actiDesign.data.isFinishSize }}M /
                           {{
@@ -708,7 +696,7 @@ export default {
       this.dragging = item;
     },
     handleDragEnd(e, item, t) {
-      if (this.ending.id === this.dragging.id) {
+      if (this.ending === this.dragging) {
         return;
       }
       let newItems;
@@ -719,19 +707,22 @@ export default {
       } else {
         newItems = [...this.raceOver.actiDesign.data];
       }
-      const src = newItems.indexOf(this.dragging);
-      const dst = newItems.indexOf(this.ending);
-      newItems.splice(src, 1, ...newItems.splice(dst, 1, newItems[src]));
-      console.log(newItems);
+      const src = newItems[this.dragging];
+      const dst = newItems[this.ending];
 
       if (t == 0) {
-        this.raceOver.driQuestion.data = newItems;
+        this.raceOver.driQuestion.data[this.dragging] = dst;
+        this.raceOver.driQuestion.data[this.ending] = src;
       } else if (t == 1) {
-        this.raceOver.tarDesign.data = newItems;
+        this.raceOver.tarDesign.data[this.dragging] = dst;
+        this.raceOver.tarDesign.data[this.ending] = src;
       } else {
-        this.raceOver.actiDesign.data = newItems;
+        this.raceOver.actiDesign.data[this.dragging] = dst;
+        this.raceOver.actiDesign.data[this.ending] = src;
       }
 
+      this.$forceUpdate();
+
       this.$nextTick(() => {
         this.dragging = null;
         this.ending = null;
@@ -965,7 +956,8 @@ export default {
             } else {
               _this.raceOver.actiDesign.data.progress = 100;
             }
-            _this.raceOver.actiDesign.data.isFinishSize = _this.raceOver.actiDesign.data.isAllSize;
+            _this.raceOver.actiDesign.data.isFinishSize =
+              _this.raceOver.actiDesign.data.isAllSize;
             _this.$forceUpdate();
             setTimeout(() => {
               if (jsonType == 0) {
@@ -1663,7 +1655,7 @@ export default {
 }
 
 .progressBox .lbox {
-  height: 60px;
+  height: 50px;
   font-size: 19px;
   display: flex;
   align-items: center;

+ 12 - 1
src/components/pages/race/eventCenter/anliDetail.vue

@@ -139,7 +139,18 @@
         <div
           class="leftNav"
           :class="{ isleftNav: isNavTop >= 300 }"
-          v-if="isShow == 1"
+          v-if="
+          isShow == 1 &&
+          anliBox[0].overview.driQuestion.brief != '' &&
+          anliBox[0].overview.tarDesign.brief != '' &&
+          anliBox[0].overview.actiDesign.brief != '' &&
+          anliBox[0].process.stageBox[0].staTitle != '' &&
+          anliBox[0].process.stageBox[0].actBox[0].actName != '' &&
+          anliBox[0].process.stageBox[0].brief != '' &&
+          anliBox[0].process.stageBox[0].data.length > 0 &&
+          anliBox[0].proexc.brief != '' &&
+          anliBox[0].results.brief != ''
+        "
         >
           <div class="topNav">导航栏</div>
           <div class="navLeftBox">