|
@@ -28,7 +28,7 @@
|
|
|
<div style="width:100%;">
|
|
|
<span style="text-overflow: ellipsis;"> {{ data.title }} </span>
|
|
|
|
|
|
- <!-- 调整排序 -->
|
|
|
+ <!-- 调整排序 -->
|
|
|
<el-link :underline="false">
|
|
|
<i
|
|
|
class="el-icon-sort"
|
|
@@ -69,50 +69,55 @@
|
|
|
|
|
|
|
|
|
<template slot="menuRight">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- plain
|
|
|
- @click="quteEle"
|
|
|
- >引用元素表单库
|
|
|
- </el-button>
|
|
|
-
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
-
|
|
|
- @click="handleDelete"
|
|
|
- >删除表单
|
|
|
- </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="quteEle"
|
|
|
+ >引用元素表单库
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+
|
|
|
+ @click="handleDelete"
|
|
|
+ >删除表单
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menuLeft" slot-scope="{size}">
|
|
|
+ <div style="display:flex">
|
|
|
+ <el-input placeholder="请输入你想搜索的表单名称" v-model="input3" :size="size" clearable
|
|
|
+ @clear="clearinput"></el-input>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="small" @click="searchChange">搜索</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <i class="el-icon-search" slot="append" @click="searchChange" style=" cursor:pointer;font-size: 16px;"></i> -->
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{type,size,row}" slot="menu">
|
|
|
+ <el-button :size="size" :type="type" @click="Associationlist(row)">关联清表</el-button>
|
|
|
+ <el-button :size="size" :type="type" :disabled="row.excelIds == -1" @click="rightClick(row)">编辑元素
|
|
|
+ </el-button>
|
|
|
+ <el-button :size="size" :type="type" :disabled="row.excelIds == -1"
|
|
|
+ @click="adjustExcel(row.id,row.excelIds)">调整表单
|
|
|
+ </el-button>
|
|
|
+ <el-button :size="size" :type="type" @click="handleEditFormula(row)">编辑公式</el-button>
|
|
|
+ <el-button :size="size" :type="type" @click="allocatWbs(row)">分配WBS</el-button>
|
|
|
+
|
|
|
</template>
|
|
|
- <template slot="menuLeft" slot-scope="{size}">
|
|
|
- <div style="display:flex">
|
|
|
- <el-input placeholder="请输入你想搜索的表单名称" v-model="input3" :size="size" clearable @clear="clearinput" > </el-input>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="small" @click="searchChange">搜索</el-button>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- <i class="el-icon-search" slot="append" @click="searchChange" style=" cursor:pointer;font-size: 16px;"></i> -->
|
|
|
- </template>
|
|
|
- <template slot-scope="{type,size,row}" slot="menu">
|
|
|
- <el-button :size="size" :type="type" @click="Associationlist(row)">关联清表</el-button>
|
|
|
- <el-button :size="size" :type="type" :disabled="row.excelIds == -1" @click="rightClick(row)">编辑元素</el-button>
|
|
|
- <el-button :size="size" :type="type" :disabled="row.excelIds == -1" @click="adjustExcel(row.id,row.excelIds)">调整表单</el-button>
|
|
|
- <el-button :size="size" :type="type" @click="handleEditFormula(row)">编辑公式</el-button>
|
|
|
- <el-button :size="size" :type="type" @click="allocatWbs(row)">分配WBS</el-button>
|
|
|
-
|
|
|
- </template>
|
|
|
</avue-crud>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Qute ref="Qute" :projectid="projectid" :wbsid="wbsid" :onLoad1="onLoad1" :refreshTree="refreshTree"> </Qute>
|
|
|
- <Relation ref="Relation" :GLExcelFrom="GLExcelFrom" :wbsid="wbsid" :onLoad1="onLoad1" :refreshTree="refreshTree"></Relation>
|
|
|
- <!-- 分配Wbs -->
|
|
|
- <allocateDialog ref="allocateRef"></allocateDialog>
|
|
|
+ <Qute ref="Qute" :projectid="projectid" :wbsid="wbsid" :onLoad1="onLoad1" :refreshTree="refreshTree"></Qute>
|
|
|
+ <Relation ref="Relation" :GLExcelFrom="GLExcelFrom" :wbsid="wbsid" :onLoad1="onLoad1"
|
|
|
+ :refreshTree="refreshTree"></Relation>
|
|
|
+ <!-- 分配Wbs -->
|
|
|
+ <allocateDialog ref="allocateRef"></allocateDialog>
|
|
|
+ <!-- 编辑元素 -->
|
|
|
<!-- 编辑元素 -->
|
|
|
- <!-- 编辑元素 -->
|
|
|
<el-dialog
|
|
|
title=" "
|
|
|
:visible.sync="editElementVisible"
|
|
@@ -128,7 +133,7 @@
|
|
|
:pid="editElementQuery.pid"
|
|
|
:wbsid="editElementQuery.wbsid"
|
|
|
:nodeid="editElementQuery.nodeid"
|
|
|
- :initTableId="editElementQuery.initTableId"
|
|
|
+ :initTableId="editElementQuery.initTableId"
|
|
|
@hideDialog="editElementVisible = false"
|
|
|
@adjustExcel="adjustExcel"
|
|
|
v-if="editElementVisible"
|
|
@@ -136,7 +141,7 @@
|
|
|
:globaltype='1'
|
|
|
></EditElement>
|
|
|
</el-dialog>
|
|
|
- <!-- 调整表单模板 -->
|
|
|
+ <!-- 调整表单模板 -->
|
|
|
<div v-if="excelHtml" class="excelHtml">
|
|
|
<dynamicExcel
|
|
|
@remove="removeExcel"
|
|
@@ -145,7 +150,7 @@
|
|
|
:excelId="GLExcelFrom.excelId"
|
|
|
/>
|
|
|
</div>
|
|
|
-<!-- 元素公式 -->
|
|
|
+ <!-- 元素公式 -->
|
|
|
<el-dialog
|
|
|
title="元素公式3"
|
|
|
:visible.sync="editEleFormulaVisible"
|
|
@@ -162,10 +167,11 @@
|
|
|
@clear="searchFormulaName"
|
|
|
></el-input>
|
|
|
<el-button type="info" class="mg-l-10" @click="searchFormulaName"
|
|
|
- >搜索</el-button
|
|
|
+ >搜索
|
|
|
+ </el-button
|
|
|
>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
+ <el-table
|
|
|
:data="editEleListFilter"
|
|
|
border
|
|
|
style="width: 100%"
|
|
@@ -178,7 +184,8 @@
|
|
|
<el-link
|
|
|
:type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
|
|
|
@click="toFormulaEdit(scope.row,1)"
|
|
|
- >全局公式</el-link
|
|
|
+ >全局公式
|
|
|
+ </el-link
|
|
|
>
|
|
|
<!-- <el-link
|
|
|
class="mg-l-10"
|
|
@@ -195,7 +202,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
- <!-- 公式 -->
|
|
|
+ <!-- 公式 -->
|
|
|
<el-dialog
|
|
|
title="元素公式33"
|
|
|
:visible.sync="formulaCompVisible"
|
|
@@ -205,8 +212,8 @@
|
|
|
@close="closeformulaComp"
|
|
|
>
|
|
|
<FormulaEdit
|
|
|
- :fromcurNode="curEleTable"
|
|
|
- :initTableId='curTreeData.id'
|
|
|
+ :fromcurNode="curEleTable"
|
|
|
+ :initTableId='curTreeData.id'
|
|
|
:wbsid="id"
|
|
|
:nodeid="curTreeData.id"
|
|
|
:eleid="formulaCurRow.id"
|
|
@@ -217,7 +224,7 @@
|
|
|
v-if="formulaCompVisible"
|
|
|
></FormulaEdit>
|
|
|
</el-dialog>
|
|
|
- <!-- 排序弹框 -->
|
|
|
+ <!-- 排序弹框 -->
|
|
|
<el-dialog
|
|
|
title="调整排序"
|
|
|
:visible.sync="sortTag"
|
|
@@ -225,24 +232,24 @@
|
|
|
|
|
|
append-to-body
|
|
|
>
|
|
|
- <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
|
|
|
+ <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
|
|
|
>
|
|
|
<el-button type="primary" @click="editSort()">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- 分配wbs -->
|
|
|
- <allocateDialog ref="allocateRef" :projectId="projectid" :wbsId="wbsid" :wbsType="wbsType" :id="formId"></allocateDialog>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ <!-- 分配wbs -->
|
|
|
+ <allocateDialog ref="allocateRef" :projectId="projectid" :wbsId="wbsid" :wbsType="wbsType"
|
|
|
+ :id="formId"></allocateDialog>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {tabTypeLazyTree,delAprojectTab} from "@/api/manager/wbsprivate";
|
|
|
+import {tabTypeLazyTree, delAprojectTab} from "@/api/manager/wbsprivate";
|
|
|
import {selectPrivateFormElements} from "@/api/manager/wbstree";
|
|
|
import {getTableElments} from "@/api/manager/wbstree";
|
|
|
import {wbsInfotabSort} from "@/api/manager/wbsinfo";
|
|
@@ -256,11 +263,10 @@ import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
import allocateDialog from "./allocateDialog.vue";//分配WBS
|
|
|
|
|
|
|
|
|
-
|
|
|
export default {
|
|
|
- components: { dynamicExcel, EditElement, Qute,Relation,FormulaEdit,ManualSorting,allocateDialog},
|
|
|
- computed:{
|
|
|
- ids () {
|
|
|
+ components: {dynamicExcel, EditElement, Qute, Relation, FormulaEdit, ManualSorting, allocateDialog},
|
|
|
+ computed: {
|
|
|
+ ids() {
|
|
|
let ids = [];
|
|
|
this.selectionList.forEach(ele => {
|
|
|
ids.push(ele.primaryKeyId);
|
|
@@ -270,15 +276,15 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- input3:'',
|
|
|
- page:{
|
|
|
- current:1,
|
|
|
- size:10,
|
|
|
- total:0
|
|
|
+ input3: '',
|
|
|
+ page: {
|
|
|
+ current: 1,
|
|
|
+ size: 10,
|
|
|
+ total: 0
|
|
|
},
|
|
|
- search:{},
|
|
|
- loading:false,
|
|
|
- tabloading:false,
|
|
|
+ search: {},
|
|
|
+ loading: false,
|
|
|
+ tabloading: false,
|
|
|
dialogVisible: false,
|
|
|
obj: {},
|
|
|
data: [],
|
|
@@ -288,7 +294,7 @@ export default {
|
|
|
return !data.hasChildren;
|
|
|
},
|
|
|
},
|
|
|
- allTreeShow:false,//是否显示整棵树
|
|
|
+ allTreeShow: false,//是否显示整棵树
|
|
|
loadData: [],
|
|
|
loadData1: [
|
|
|
{
|
|
@@ -316,8 +322,8 @@ export default {
|
|
|
delBtn: false,
|
|
|
addBtn: false,
|
|
|
menu: true,
|
|
|
- menuWidth:300,
|
|
|
- searchShowBtn:true,
|
|
|
+ menuWidth: 300,
|
|
|
+ searchShowBtn: true,
|
|
|
|
|
|
dialogClickModal: false,
|
|
|
column: [
|
|
@@ -381,17 +387,17 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- defaultExpandKey:[],//默认展开的节点
|
|
|
- defaultCheckedKey:'',
|
|
|
- selectionList:[],
|
|
|
+ defaultExpandKey: [],//默认展开的节点
|
|
|
+ defaultCheckedKey: '',
|
|
|
+ selectionList: [],
|
|
|
GLExcelFrom: {
|
|
|
- id: "",
|
|
|
- name: "",
|
|
|
- search: "", //搜素框舒服的值
|
|
|
- ids: "",
|
|
|
- excelId: "",
|
|
|
- initTableName: "",
|
|
|
- initTableId:'',
|
|
|
+ id: "",
|
|
|
+ name: "",
|
|
|
+ search: "", //搜素框舒服的值
|
|
|
+ ids: "",
|
|
|
+ excelId: "",
|
|
|
+ initTableName: "",
|
|
|
+ initTableId: '',
|
|
|
},
|
|
|
//编辑元素弹窗
|
|
|
editElementVisible: false, //编辑元素弹框
|
|
@@ -404,7 +410,7 @@ export default {
|
|
|
wbsid: "",
|
|
|
nodeid: "",
|
|
|
}, //
|
|
|
- excelHtml:false,//调整表单
|
|
|
+ excelHtml: false,//调整表单
|
|
|
|
|
|
//#region 调整表单
|
|
|
adjustmentExcel: "",
|
|
@@ -414,42 +420,42 @@ export default {
|
|
|
editEleListFilter: [],
|
|
|
editEleListAll: [],
|
|
|
formulaCurRow: {}, //当前元素
|
|
|
- formulaCompVisible:false,
|
|
|
- //#region公式
|
|
|
+ formulaCompVisible: false,
|
|
|
+ //#region公式
|
|
|
id: "",
|
|
|
curTreeData: {},
|
|
|
- projectid:'',
|
|
|
- treeId:"",
|
|
|
- curNode:{},
|
|
|
+ projectid: '',
|
|
|
+ treeId: "",
|
|
|
+ curNode: {},
|
|
|
sortTag: false,
|
|
|
sortTag2: false,
|
|
|
- sort:[],
|
|
|
- allocatedialogVisible:false,//分配WBS弹窗
|
|
|
- formId:''//分配WBS的表单Id
|
|
|
+ sort: [],
|
|
|
+ allocatedialogVisible: false,//分配WBS弹窗
|
|
|
+ formId: ''//分配WBS的表单Id
|
|
|
|
|
|
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.projectid = this.$route.query.pid;
|
|
|
- this.wbsid=this.$route.query.wbsid;
|
|
|
- this.wbsType=this.$route.query.wbsType;
|
|
|
+ this.projectid = this.$route.query.pid;
|
|
|
+ this.wbsid = this.$route.query.wbsid;
|
|
|
+ this.wbsType = this.$route.query.wbsType;
|
|
|
},
|
|
|
methods: {
|
|
|
- //关闭公式弹窗
|
|
|
- closeformulaComp(){
|
|
|
+ //关闭公式弹窗
|
|
|
+ closeformulaComp() {
|
|
|
console.log('关闭');
|
|
|
- getTableElments(this.curEleTable.initTableId).then((res) => {
|
|
|
+ getTableElments(this.curEleTable.initTableId).then((res) => {
|
|
|
|
|
|
this.editEleListFilter = res.data.data;
|
|
|
this.editEleListAll = [].concat(this.editEleListFilter);
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- async sortpai(data,node) {
|
|
|
- this.curNode=node;
|
|
|
- this.curTreeData=data;
|
|
|
- await this.findWbsTreePrivateSameLevel(node,data)
|
|
|
+ async sortpai(data, node) {
|
|
|
+ this.curNode = node;
|
|
|
+ this.curTreeData = data;
|
|
|
+ await this.findWbsTreePrivateSameLevel(node, data)
|
|
|
this.sortTag = true;
|
|
|
this.sortTag2 = true;
|
|
|
},
|
|
@@ -464,184 +470,191 @@ export default {
|
|
|
},
|
|
|
async wbsInfotabSort() {
|
|
|
//元素库、独立库节点排序
|
|
|
- console.log(this.sort,'this.sort');
|
|
|
- var newArr=this.sort.map((v)=>{return v.id})
|
|
|
- newArr=newArr.join(',')
|
|
|
- const { data: res } = await wbsInfotabSort(newArr);
|
|
|
+ console.log(this.sort, 'this.sort');
|
|
|
+ var newArr = this.sort.map((v) => {
|
|
|
+ return v.id
|
|
|
+ })
|
|
|
+ newArr = newArr.join(',')
|
|
|
+ const {data: res} = await wbsInfotabSort(newArr);
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('操作成功')
|
|
|
this.sortTag = false;
|
|
|
this.sortTag2 = false;
|
|
|
- this. refreshTree();
|
|
|
+ this.refreshTree();
|
|
|
}
|
|
|
},
|
|
|
- async findWbsTreePrivateSameLevel(node,data) {
|
|
|
- const { data: res } =await tabTypeLazyTree({parentId:node.data.parentId,projectId:this.projectid,current:1,size:1000})
|
|
|
+ async findWbsTreePrivateSameLevel(node, data) {
|
|
|
+ const {data: res} = await tabTypeLazyTree({
|
|
|
+ parentId: node.data.parentId,
|
|
|
+ projectId: this.projectid,
|
|
|
+ current: 1,
|
|
|
+ size: 1000
|
|
|
+ })
|
|
|
if (res.code == 200) {
|
|
|
- console.log(res.data,'res1111111');
|
|
|
- let tabArr=res.data.records
|
|
|
- tabArr.forEach((item)=>{
|
|
|
- item.tableName=item.title
|
|
|
+ console.log(res.data, 'res1111111');
|
|
|
+ let tabArr = res.data.records
|
|
|
+ tabArr.forEach((item) => {
|
|
|
+ item.tableName = item.title
|
|
|
})
|
|
|
- console.log(tabArr,'tabArr');
|
|
|
- this.sort =tabArr
|
|
|
+ console.log(tabArr, 'tabArr');
|
|
|
+ this.sort = tabArr
|
|
|
}
|
|
|
},
|
|
|
- //#region 接口
|
|
|
- async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
|
|
|
+ //#region 接口
|
|
|
+ async tabTypeLazyTree(parentId, projectId, current, size, titleName) {//清表树
|
|
|
console.log(parentId, projectId);
|
|
|
- this.loading=true;
|
|
|
- const { data: res } = await tabTypeLazyTree({ parentId, projectId,current,size,titleName })
|
|
|
- this.loading=false;
|
|
|
+ this.loading = true;
|
|
|
+ const {data: res} = await tabTypeLazyTree({parentId, projectId, current, size, titleName})
|
|
|
+ this.loading = false;
|
|
|
if (res.code === 200) {
|
|
|
return res.data;
|
|
|
}
|
|
|
},
|
|
|
loadNode(node, resolve) {
|
|
|
const parentId = (node.level === 0) ? 12345678910 : node.data.id;
|
|
|
- this.tabTypeLazyTree(parentId,this.projectid,this.page.current,1000).then(res=>{
|
|
|
- resolve(res.records.map(item=>{
|
|
|
- return{
|
|
|
- ...item,
|
|
|
+ this.tabTypeLazyTree(parentId, this.projectid, this.page.current, 1000).then(res => {
|
|
|
+ resolve(res.records.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
leaf: !item.hasChildren
|
|
|
- }
|
|
|
+ }
|
|
|
}))
|
|
|
})
|
|
|
},
|
|
|
- searchChange(){
|
|
|
- if(this.treeId){
|
|
|
- this.page.current=1;
|
|
|
- this.page.currentPage=1
|
|
|
- this.page.size=10;
|
|
|
- this.onLoad2()
|
|
|
- }else{
|
|
|
- if(this.input3){
|
|
|
- this.tabloading=true;
|
|
|
- this.page.current=1;
|
|
|
- this.page.currentPage=1
|
|
|
- this.page.size=10;
|
|
|
- this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
|
|
|
- console.log(res.records);
|
|
|
- this.loadData=res.records;
|
|
|
- this.page.total=res.total;
|
|
|
- this.tabloading=false;
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$message.warning('请输入你想搜索的表单名称')
|
|
|
- }
|
|
|
-
|
|
|
+ searchChange() {
|
|
|
+ if (this.treeId) {
|
|
|
+ this.page.current = 1;
|
|
|
+ this.page.currentPage = 1
|
|
|
+ this.page.size = 10;
|
|
|
+ this.onLoad2()
|
|
|
+ } else {
|
|
|
+ if (this.input3) {
|
|
|
+ this.tabloading = true;
|
|
|
+ this.page.current = 1;
|
|
|
+ this.page.currentPage = 1
|
|
|
+ this.page.size = 10;
|
|
|
+ this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current, this.page.size, this.input3).then((res) => {
|
|
|
+ console.log(res.records);
|
|
|
+ this.loadData = res.records;
|
|
|
+ this.page.total = res.total;
|
|
|
+ this.tabloading = false;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.warning('请输入你想搜索的表单名称')
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- currentChange (currentPage) {
|
|
|
- this.page.current = currentPage;
|
|
|
-
|
|
|
- // this.searchChange();
|
|
|
+ currentChange(currentPage) {
|
|
|
+ this.page.current = currentPage;
|
|
|
+
|
|
|
+ // this.searchChange();
|
|
|
|
|
|
},
|
|
|
- sizeChange (pageSize) {
|
|
|
- this.page.size = pageSize;
|
|
|
+ sizeChange(pageSize) {
|
|
|
+ this.page.size = pageSize;
|
|
|
},
|
|
|
- refreshChange () {
|
|
|
+ refreshChange() {
|
|
|
this.searchChange();
|
|
|
|
|
|
},
|
|
|
- clearinput(){
|
|
|
+ clearinput() {
|
|
|
this.searchChange()
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
- onLoad2(){
|
|
|
+ onLoad2() {
|
|
|
|
|
|
- if(this.curTreeData.hasChildren){
|
|
|
- this.tabloading=true;
|
|
|
- this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
|
|
|
- console.log(res.records);
|
|
|
- this.loadData=res.records;
|
|
|
- this.page.total=res.total;
|
|
|
- this.tabloading=false;
|
|
|
- })
|
|
|
- }
|
|
|
- if(this.curTreeData.hasChildren===false&&this.curNode.level==2){
|
|
|
- this.tabloading=true;
|
|
|
- let arr=[]
|
|
|
- arr.push(this.curTreeData)
|
|
|
- this.loadData=arr
|
|
|
- this.page.total=1
|
|
|
- setTimeout(() => {
|
|
|
- this.tabloading=false
|
|
|
-
|
|
|
- }, 1000);
|
|
|
- }else{
|
|
|
- this.tabloading=true;
|
|
|
- this.loadData=[]
|
|
|
- this.page.total=0;
|
|
|
- setTimeout(() => {
|
|
|
- this.tabloading=false
|
|
|
-
|
|
|
- }, 1000);
|
|
|
- }
|
|
|
+ if (this.curTreeData.hasChildren) {
|
|
|
+ this.tabloading = true;
|
|
|
+ this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current, this.page.size, this.input3).then((res) => {
|
|
|
+ console.log(res.records);
|
|
|
+ this.loadData = res.records;
|
|
|
+ this.page.total = res.total;
|
|
|
+ this.tabloading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.curTreeData.hasChildren === false && this.curNode.level == 2) {
|
|
|
+ this.tabloading = true;
|
|
|
+ let arr = []
|
|
|
+ arr.push(this.curTreeData)
|
|
|
+ this.loadData = arr
|
|
|
+ this.page.total = 1
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tabloading = false
|
|
|
+
|
|
|
+ }, 1000);
|
|
|
+ } else {
|
|
|
+ this.tabloading = true;
|
|
|
+ this.loadData = []
|
|
|
+ this.page.total = 0;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tabloading = false
|
|
|
+
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
- onLoad1(){
|
|
|
- if(this.curNode.level===1){
|
|
|
- this.tabloading=true;
|
|
|
- this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
|
|
|
- this.loadData=res.records
|
|
|
- this.page.total=res.total
|
|
|
- this.tabloading=false
|
|
|
+ onLoad1() {
|
|
|
+ if (this.curNode.level === 1) {
|
|
|
+ this.tabloading = true;
|
|
|
+ this.tabTypeLazyTree(this.curTreeData.id, this.projectid, this.page.current, this.page.size, this.input3).then((res) => {
|
|
|
+ this.loadData = res.records
|
|
|
+ this.page.total = res.total
|
|
|
+ this.tabloading = false
|
|
|
})
|
|
|
- }else{
|
|
|
-
|
|
|
- this.tabTypeLazyTree(this.curTreeData.parentId, this.projectid, this.page.current,1000,this.input3).then((res)=>{
|
|
|
- let faArr=res.records;
|
|
|
- this.loadData=faArr.filter((item)=>{
|
|
|
- if(item.id===this.treeId){
|
|
|
- return item
|
|
|
- }
|
|
|
- })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ this.tabTypeLazyTree(this.curTreeData.parentId, this.projectid, this.page.current, 1000, this.input3).then((res) => {
|
|
|
+ let faArr = res.records;
|
|
|
+ this.loadData = faArr.filter((item) => {
|
|
|
+ if (item.id === this.treeId) {
|
|
|
+ return item
|
|
|
+ }
|
|
|
})
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- onLoad(page){
|
|
|
- if(this.input3||this.treeId){
|
|
|
- this.tabloading=true;
|
|
|
- this.tabTypeLazyTree(this.treeId,this.projectid, page.currentPage,page.pageSize,this.input3).then((res)=>{
|
|
|
- this.loadData=res.records
|
|
|
- this.page.total=res.total
|
|
|
- this.tabloading=false
|
|
|
+ onLoad(page) {
|
|
|
+ if (this.input3 || this.treeId) {
|
|
|
+ this.tabloading = true;
|
|
|
+ this.tabTypeLazyTree(this.treeId, this.projectid, page.currentPage, page.pageSize, this.input3).then((res) => {
|
|
|
+ this.loadData = res.records
|
|
|
+ this.page.total = res.total
|
|
|
+ this.tabloading = false
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
},
|
|
|
|
|
|
|
|
|
- nodeClick (data,node) {//外层树结构
|
|
|
- console.log(data,node,'treedata');
|
|
|
- this.curNode=node
|
|
|
- this.treeId=data.id
|
|
|
- this.curTreeData=data;
|
|
|
- this.page.current=1;
|
|
|
- this.page.currentPage=1
|
|
|
- console.log(this.page,'this.page111111');
|
|
|
- if(data.hasChildren){
|
|
|
- this.onLoad(this.page)
|
|
|
- }
|
|
|
- if(data.hasChildren===false&&node.level==2){
|
|
|
- this.tabloading=true;
|
|
|
- let arr=[]
|
|
|
- arr.push(data)
|
|
|
- this.loadData=arr
|
|
|
- this.page.total=1
|
|
|
- setTimeout(() => {
|
|
|
- this.tabloading=false
|
|
|
-
|
|
|
- }, 1000);
|
|
|
- }else{
|
|
|
- this.loadData=[]
|
|
|
- this.page.total=0
|
|
|
- }
|
|
|
+ nodeClick(data, node) {//外层树结构
|
|
|
+ console.log(data, node, 'treedata');
|
|
|
+ this.curNode = node
|
|
|
+ this.treeId = data.id
|
|
|
+ this.curTreeData = data;
|
|
|
+ this.page.current = 1;
|
|
|
+ this.page.currentPage = 1
|
|
|
+ console.log(this.page, 'this.page111111');
|
|
|
+ if (data.hasChildren) {
|
|
|
+ this.onLoad(this.page)
|
|
|
+ }
|
|
|
+ if (data.hasChildren === false && node.level == 2) {
|
|
|
+ this.tabloading = true;
|
|
|
+ let arr = []
|
|
|
+ arr.push(data)
|
|
|
+ this.loadData = arr
|
|
|
+ this.page.total = 1
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tabloading = false
|
|
|
+
|
|
|
+ }, 1000);
|
|
|
+ } else {
|
|
|
+ this.loadData = []
|
|
|
+ this.page.total = 0
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
|
|
@@ -650,15 +663,16 @@ export default {
|
|
|
.then((_) => {
|
|
|
done();
|
|
|
})
|
|
|
- .catch((_) => {});
|
|
|
+ .catch((_) => {
|
|
|
+ });
|
|
|
},
|
|
|
//引用元素表单库
|
|
|
- quteEle(){
|
|
|
+ quteEle() {
|
|
|
this.$refs.Qute.show();
|
|
|
|
|
|
},
|
|
|
|
|
|
- handleDelete () {
|
|
|
+ handleDelete() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
@@ -669,11 +683,11 @@ export default {
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- return delAprojectTab(this.ids,this.projectid);
|
|
|
+ return delAprojectTab(this.ids, this.projectid);
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.onLoad1()
|
|
|
- this.refreshTree()
|
|
|
+ this.onLoad1()
|
|
|
+ this.refreshTree()
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
@@ -681,64 +695,64 @@ export default {
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
|
- selectionChange (list) {
|
|
|
- this.selectionList = list;
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list;
|
|
|
},
|
|
|
- selectionClear () {
|
|
|
+ selectionClear() {
|
|
|
this.selectionList = [];
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
},
|
|
|
//关联清表
|
|
|
- Associationlist(row) {
|
|
|
- console.log('关联清表',row);
|
|
|
- this.$refs.Relation.show()
|
|
|
+ Associationlist(row) {
|
|
|
+ console.log('关联清表', row);
|
|
|
+ this.$refs.Relation.show()
|
|
|
// this.GLExcelFrom.name = row.title;
|
|
|
|
|
|
this.GLExcelFrom.id = row.primaryKeyId;
|
|
|
- this.GLExcelFrom.excelId =row.excelIds;
|
|
|
+ this.GLExcelFrom.excelId = row.excelIds;
|
|
|
this.GLExcelFrom.ids = row.id;
|
|
|
- this.GLExcelFrom.initTableName =row.initTableName;
|
|
|
- this.GLExcelFrom.initTableId =row.initTableId;
|
|
|
- this.GLExcelFrom.nodeid =this.curTreeData.id
|
|
|
+ this.GLExcelFrom.initTableName = row.initTableName;
|
|
|
+ this.GLExcelFrom.initTableId = row.initTableId;
|
|
|
+ this.GLExcelFrom.nodeid = this.curTreeData.id
|
|
|
|
|
|
|
|
|
},
|
|
|
- //#region 编辑元素
|
|
|
+ //#region 编辑元素
|
|
|
async rightClick(row) {
|
|
|
- console.log(row,'编辑元素');
|
|
|
+ console.log(row, '编辑元素');
|
|
|
await this.getExcelHtml2(row.primaryKeyId);
|
|
|
// console.log('编辑元素');
|
|
|
this.editElementQuery.pkeyId = row.primaryKeyId;
|
|
|
this.editElementQuery.excelId = row.excelIds;
|
|
|
this.editElementQuery.id = row.id;
|
|
|
- this.editElementQuery.initTableName =row. initTableName;
|
|
|
+ this.editElementQuery.initTableName = row.initTableName;
|
|
|
this.editElementQuery.pid = this.$route.query.pid;
|
|
|
this.editElementQuery.wbsid = this.$route.query.wbsid;
|
|
|
this.editElementQuery.initTableId = row.initTableId;
|
|
|
this.editElementQuery.nodeid = this.curTreeData.id;
|
|
|
- this.curEleTable=row;
|
|
|
+ this.curEleTable = row;
|
|
|
this.editElementVisible = true;
|
|
|
},
|
|
|
async getExcelHtml2(pkeyId) {
|
|
|
- const { data: res } = await getExcelHtml({ pkeyId });
|
|
|
+ const {data: res} = await getExcelHtml({pkeyId});
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
localStorage.setItem("editElement", res.data);
|
|
|
}
|
|
|
},
|
|
|
- //#region 调整表单
|
|
|
- adjustExcel(pkeyId,excelIds) {
|
|
|
- console.log(pkeyId,'pkeyId');
|
|
|
- this.excelHtml=false;
|
|
|
+ //#region 调整表单
|
|
|
+ adjustExcel(pkeyId, excelIds) {
|
|
|
+ console.log(pkeyId, 'pkeyId');
|
|
|
+ this.excelHtml = false;
|
|
|
// //调整表单
|
|
|
this.GLExcelFrom.id = pkeyId;
|
|
|
- this.GLExcelFrom.excelId=excelIds
|
|
|
+ this.GLExcelFrom.excelId = excelIds
|
|
|
this.getExcelHtml(pkeyId);
|
|
|
},
|
|
|
handleEditFormula(row) {
|
|
|
this.curEleTable = row;
|
|
|
- getTableElments(this.curEleTable.initTableId).then((res) => {
|
|
|
- // selectFormElements(this.curEleTable.id).then((res) => {
|
|
|
+ getTableElments(this.curEleTable.initTableId).then((res) => {
|
|
|
+ // selectFormElements(this.curEleTable.id).then((res) => {
|
|
|
this.editEleListFilter = res.data.data;
|
|
|
this.editEleListAll = [].concat(this.editEleListFilter);
|
|
|
});
|
|
@@ -750,8 +764,8 @@ export default {
|
|
|
return ele.eName.indexOf(this.formulaInput) > -1;
|
|
|
});
|
|
|
},
|
|
|
- async getExcelHtml(pkeyId) {
|
|
|
- const { data: res } = await getExcelHtml({ pkeyId });
|
|
|
+ async getExcelHtml(pkeyId) {
|
|
|
+ const {data: res} = await getExcelHtml({pkeyId});
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
localStorage.setItem("excelHtml", res.data);
|
|
@@ -762,47 +776,47 @@ export default {
|
|
|
removeExcel() {
|
|
|
this.excelHtml = false;
|
|
|
},
|
|
|
- //跳转到公式配置页面
|
|
|
- toFormulaEdit(row,type) {
|
|
|
+ //跳转到公式配置页面
|
|
|
+ toFormulaEdit(row, type) {
|
|
|
this.formulaCurRow = row;
|
|
|
this.formulaCompVisible = true;
|
|
|
this.formulaCurRow.globaltype = type;
|
|
|
- this.formulaCurRow.elementType = true;
|
|
|
+ this.formulaCurRow.elementType = true;
|
|
|
},
|
|
|
//刷新左边树形数据
|
|
|
- refreshTree(){
|
|
|
- //刷新左边树形数据
|
|
|
- if(this.curNode.level===1){
|
|
|
- const parentId =12345678910
|
|
|
- tabTypeLazyTree({parentId,projectId:this.projectid,current:1,size:1000}).then(res => {
|
|
|
- this.data=res.data.data.records;
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.defaultExpandKey.push(this.curNode.data.id);
|
|
|
- this.$refs.trees.setCurrentKey(this.curNode.data.id);
|
|
|
-
|
|
|
- })
|
|
|
+ refreshTree() {
|
|
|
+ //刷新左边树形数据
|
|
|
+ if (this.curNode.level === 1) {
|
|
|
+ const parentId = 12345678910
|
|
|
+ tabTypeLazyTree({parentId, projectId: this.projectid, current: 1, size: 1000}).then(res => {
|
|
|
+ this.data = res.data.data.records;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.defaultExpandKey.push(this.curNode.data.id);
|
|
|
+ this.$refs.trees.setCurrentKey(this.curNode.data.id);
|
|
|
|
|
|
- });
|
|
|
- }else{
|
|
|
+ })
|
|
|
+
|
|
|
+ });
|
|
|
+ } else {
|
|
|
this.updateTreeNewNode()
|
|
|
}
|
|
|
},
|
|
|
- updateTreeNewNode() {
|
|
|
+ updateTreeNewNode() {
|
|
|
tabTypeLazyTree(
|
|
|
- {parentId:this.curTreeData.parentId,projectId:this.projectid,current:1,size:1000}
|
|
|
+ {parentId: this.curTreeData.parentId, projectId: this.projectid, current: 1, size: 1000}
|
|
|
).then((res) => {
|
|
|
this.$refs.trees.updateKeyChildren(
|
|
|
- this.curTreeData.parentId,
|
|
|
- res.data.data.records
|
|
|
+ this.curTreeData.parentId,
|
|
|
+ res.data.data.records
|
|
|
);
|
|
|
this.$refs.trees.setCurrentKey(this.curNode.data.id);
|
|
|
});
|
|
|
},
|
|
|
//分配WBS
|
|
|
- allocatWbs(row){
|
|
|
- this.$refs.allocateRef.show()
|
|
|
- this.formId=row.id
|
|
|
-
|
|
|
+ allocatWbs(row) {
|
|
|
+ this.$refs.allocateRef.show()
|
|
|
+ this.formId = row.id
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -813,7 +827,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
//调整表单样式
|
|
|
.excelHtml {
|
|
|
position: absolute;
|
|
@@ -826,14 +840,14 @@ export default {
|
|
|
.marleft10 {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
-/deep/.el-tree-node__expand-icon {
|
|
|
+::v-deep .el-tree-node__expand-icon {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.colorblue {
|
|
|
color: rgb(0, 82, 217);
|
|
|
}
|
|
|
|
|
|
-.treecontent /deep/.el-scrollbar {
|
|
|
+.treecontent ::v-deep .el-scrollbar {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
@@ -844,7 +858,7 @@ export default {
|
|
|
.rightHeader {
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
- align-items: top;
|
|
|
+ align-items: flex-start;
|
|
|
font-size: 14px;
|
|
|
background-color: #fff;
|
|
|
|
|
@@ -918,26 +932,26 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
padding-bottom: 10px;
|
|
|
}
|
|
|
-/deep/.avue-crud__left{
|
|
|
+::v-deep .avue-crud__left {
|
|
|
width: 65%;
|
|
|
}
|
|
|
-/deep/.el-input-group__append{
|
|
|
- background-color: #ecf5ff;
|
|
|
- color: #409EFF;
|
|
|
+::v-deep .el-input-group__append {
|
|
|
+ background-color: #ecf5ff;
|
|
|
+ color: #409EFF;
|
|
|
}
|
|
|
-/deep/.el-input-group__append:hover{
|
|
|
- background-color: #409EFF;
|
|
|
- color: white;
|
|
|
+::v-deep .el-input-group__append:hover {
|
|
|
+ background-color: #409EFF;
|
|
|
+ color: white;
|
|
|
}
|
|
|
-/deep/.el-input-group__prepend:hover{
|
|
|
- background-color: #409EFF;
|
|
|
+::v-deep .el-input-group__prepend:hover {
|
|
|
+ background-color: #409EFF;
|
|
|
color: white;
|
|
|
}
|
|
|
-/deep/.el-input-group__append:active{
|
|
|
- background-color: #9dc5ee;
|
|
|
- color: white;
|
|
|
+::v-deep .el-input-group__append:active {
|
|
|
+ background-color: #9dc5ee;
|
|
|
+ color: white;
|
|
|
}
|
|
|
-/deep/.el-input-group__prepend:active{
|
|
|
+::v-deep .el-input-group__prepend:active {
|
|
|
background-color: #9dc5ee;
|
|
|
color: white;
|
|
|
}
|