|  | @@ -124,12 +124,31 @@
 | 
	
		
			
				|  |  |          <el-form-item prop="intro" label="简介">
 | 
	
		
			
				|  |  |            <el-input v-model="sourceInfo.intro" type="textarea" />
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  | -        <el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item style="text-align: right">
 | 
	
		
			
				|  |  |            <el-button @click="sourceInfoFlag = false">取 消</el-button>
 | 
	
		
			
				|  |  |            <el-button :loading="loading" type="primary" @click="submitSourceInfo">确 定</el-button>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |        </el-form>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  | +    <!-- 移动 -->
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  | +      :visible.sync="sourceMoveFlag"
 | 
	
		
			
				|  |  | +      width="500px"
 | 
	
		
			
				|  |  | +      append-to-body
 | 
	
		
			
				|  |  | +      :show-close="true"
 | 
	
		
			
				|  |  | +      title="移动文件"
 | 
	
		
			
				|  |  | +      :close-on-click-modal="false"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  | +      <el-form ref="form" label-width="80px">
 | 
	
		
			
				|  |  | +        <el-form-item prop="name" label="移动到">
 | 
	
		
			
				|  |  | +          <el-cascader v-model="sourceMoveId" :props="{ checkStrictly: true }" :options="node_list"></el-cascader>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item style="text-align: right">
 | 
	
		
			
				|  |  | +          <el-button @click="sourceMoveFlag = false">取 消</el-button>
 | 
	
		
			
				|  |  | +          <el-button :loading="loading" type="primary" @click="submitMoveSource">确 定</el-button></el-form-item
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -142,6 +161,7 @@ import {
 | 
	
		
			
				|  |  |    MangerDeleteResource,
 | 
	
		
			
				|  |  |    MangerUpdateResourceFile,
 | 
	
		
			
				|  |  |    MangerUpdateResourceInfo,
 | 
	
		
			
				|  |  | +  MangerMoveResource,
 | 
	
		
			
				|  |  |  } from '@/api/book';
 | 
	
		
			
				|  |  |  import { GetProjectBaseInfo } from '@/api/project';
 | 
	
		
			
				|  |  |  import PaginationPage from '@/components/PaginationPage.vue';
 | 
	
	
		
			
				|  | @@ -225,6 +245,8 @@ export default {
 | 
	
		
			
				|  |  |          label: '',
 | 
	
		
			
				|  |  |          intro: '',
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      sourceMoveFlag: false,
 | 
	
		
			
				|  |  | +      sourceMoveId: '',
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -276,6 +298,7 @@ export default {
 | 
	
		
			
				|  |  |              label: name,
 | 
	
		
			
				|  |  |              nodes: nodes,
 | 
	
		
			
				|  |  |              children: nodes,
 | 
	
		
			
				|  |  | +            value: '',
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |          ];
 | 
	
		
			
				|  |  |          this.handleData(this.node_list[0], 1);
 | 
	
	
		
			
				|  | @@ -289,6 +312,7 @@ export default {
 | 
	
		
			
				|  |  |            item.pid = data.id;
 | 
	
		
			
				|  |  |            item.nodexIndex = nodeIndex;
 | 
	
		
			
				|  |  |            item.isLeaf = item.is_leaf === 'true';
 | 
	
		
			
				|  |  | +          item.value = item.id;
 | 
	
		
			
				|  |  |            if (item.nodes) {
 | 
	
		
			
				|  |  |              item.children = item.nodes;
 | 
	
		
			
				|  |  |              item.lists = item.nodes;
 | 
	
	
		
			
				|  | @@ -346,7 +370,13 @@ export default {
 | 
	
		
			
				|  |  |      handlePersonal() {},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 移动文件
 | 
	
		
			
				|  |  | -    handleMoveFile() {},
 | 
	
		
			
				|  |  | +    handleMoveFile() {
 | 
	
		
			
				|  |  | +      if (this.select_sources_id) {
 | 
	
		
			
				|  |  | +        this.sourceMoveFlag = true;
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        this.$message.warning('请先选择文件');
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      // 切换类型
 | 
	
		
			
				|  |  |      changeType(index) {
 | 
	
		
			
				|  |  |        this.type_index = index;
 | 
	
	
		
			
				|  | @@ -473,6 +503,26 @@ export default {
 | 
	
		
			
				|  |  |            this.loading = false;
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 确定移动
 | 
	
		
			
				|  |  | +    submitMoveSource() {
 | 
	
		
			
				|  |  | +      this.loading = true;
 | 
	
		
			
				|  |  | +      MangerMoveResource({
 | 
	
		
			
				|  |  | +        id: this.select_sources_id,
 | 
	
		
			
				|  |  | +        project_id: this.book_id,
 | 
	
		
			
				|  |  | +        book_chapter_node_id: this.sourceMoveId[this.sourceMoveId.length - 1],
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +        .then((res) => {
 | 
	
		
			
				|  |  | +          this.loading = false;
 | 
	
		
			
				|  |  | +          this.sourceMoveFlag = false;
 | 
	
		
			
				|  |  | +          if (res.status === 1) {
 | 
	
		
			
				|  |  | +            this.$message.success('移动成功');
 | 
	
		
			
				|  |  | +            this.queryList('');
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch(() => {
 | 
	
		
			
				|  |  | +          this.loading = false;
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 |