|
@@ -61,6 +61,13 @@
|
|
|
class="el-icon-delete marleft10"
|
|
|
@click.stop="deleteExcelM(data,node)"
|
|
|
></i>
|
|
|
+ <!-- 调整排序 -->
|
|
|
+ <i
|
|
|
+ class="el-icon-sort"
|
|
|
+ @click="sortpai(data, node)"
|
|
|
+ v-if="node.level != 1"
|
|
|
+ title="调整排序"
|
|
|
+ ></i>
|
|
|
</span>
|
|
|
</div>
|
|
|
</span>
|
|
@@ -104,6 +111,13 @@
|
|
|
<i
|
|
|
class="el-icon-delete marleft10"
|
|
|
@click.stop="deleteExcelM(data,node)"
|
|
|
+ ></i>
|
|
|
+ <!-- 调整排序 -->
|
|
|
+ <i
|
|
|
+ class="el-icon-sort"
|
|
|
+ @click="sortpai(data, node)"
|
|
|
+ v-if="node.level == 3"
|
|
|
+ title="调整排序"
|
|
|
></i>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -356,13 +370,32 @@
|
|
|
>确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 私有wbs树排序弹框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="调整排序"
|
|
|
+ :visible.sync="sortTag"
|
|
|
+ width="50%"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="(sortTag = false), (sortTag2 = false)"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="editSort()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { detailExcel, excelType, tabLazytree, getWbsTypeList, wbstree, selectByNodeTable, Excelmodify, uploadExcel, deleteExcelshu, deleteExcel ,tabLazytreeAll,
|
|
|
- uploadcoverfileExcel,downExcelFile} from '@/api/exctab/excelmodel'
|
|
|
+ uploadcoverfileExcel,downExcelFile} from '@/api/exctab/excelmodel';
|
|
|
+import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ ManualSorting,
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
excelId:'',
|
|
@@ -453,9 +486,63 @@ export default {
|
|
|
//#endregion
|
|
|
|
|
|
saveExcelLoad:false,
|
|
|
+ sortTag: false,
|
|
|
+ sortTag2: false,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //#region wbs私有树排序
|
|
|
+ async sortpai(data,node) {
|
|
|
+ console.log(data,node);
|
|
|
+ await this.findWbsTreePrivateSameLevel(node,data)
|
|
|
+ this.sortTag = true;
|
|
|
+ this.sortTag2 = true;
|
|
|
+ },
|
|
|
+ editSort() {
|
|
|
+ this.wbsTreePrivateSort();
|
|
|
+ },
|
|
|
+ bianhua() {
|
|
|
+ this.sortTag2 = false;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.sortTag2 = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async wbsTreePrivateSort() {
|
|
|
+ //wbs私有树节点手动排序
|
|
|
+ // const { data: res } = await wbsTreePrivateSort(this.sort);
|
|
|
+ // console.log(res);
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.sortTag = false;
|
|
|
+ // this.sortTag2 = false;
|
|
|
+ // this.getLazytreessss();
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ async findWbsTreePrivateSameLevel(node,data) {
|
|
|
+ const { data: res } = await tabLazytree(
|
|
|
+ {
|
|
|
+ parentId:data.parentId,
|
|
|
+ modeId:this.$route.params.id
|
|
|
+ })
|
|
|
+ if (res.code == 200) {
|
|
|
+ res.data.forEach((item)=>{
|
|
|
+ item.tableName=item.name
|
|
|
+ })
|
|
|
+ this.sort =res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getLazytreessss() {
|
|
|
+ const { data: res } = await tabLazytree(
|
|
|
+ {
|
|
|
+ parentId:0,
|
|
|
+ modeId:this.$route.params.id
|
|
|
+ }
|
|
|
+ );
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.data = res.data;
|
|
|
+ this.allTreeData=res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
//#region 接口
|
|
|
async tabLazytree (parentId, modeId) {//清表树
|
|
|
const { data: res } = await tabLazytree({ parentId, modeId })
|