|
@@ -9,34 +9,7 @@
|
|
|
>
|
|
|
<div class="boxnei" style="display: flex;flex-direction: column;">
|
|
|
<div style="overflow: auto;flex:1">
|
|
|
- <el-tree
|
|
|
- style="display: inline-block;min-width: 100%;"
|
|
|
- ref="trees"
|
|
|
- :loading="loading"
|
|
|
- :load="treeLoad"
|
|
|
- lazy
|
|
|
- :data="data"
|
|
|
- :props="defaultProps"
|
|
|
- @node-click="nodeClick"
|
|
|
- node-key="id"
|
|
|
- :expand-on-click-node="false"
|
|
|
- v-show="!allTreeShow"
|
|
|
- >
|
|
|
- <span
|
|
|
- class="custom-tree-node"
|
|
|
- slot-scope="{ data ,node }"
|
|
|
- @mouseover.stop="mouseOver(data)"
|
|
|
- @mouseleave.stop="mouseLeave(data)"
|
|
|
- style="box-sizing: border-box;padding-right:70px!important;;"
|
|
|
- >
|
|
|
- <div style="width:100%;">
|
|
|
- <span style="text-overflow: ellipsis;"> {{ data.name }} </span>
|
|
|
- <!-- <span> {{ node}} </span> -->
|
|
|
- <!-- 添加 -->
|
|
|
-
|
|
|
- </div>
|
|
|
- </span>
|
|
|
- </el-tree>
|
|
|
+ <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" ></avue-tree>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
@@ -69,16 +42,13 @@
|
|
|
style="flex:1;"
|
|
|
>
|
|
|
<avue-crud ref="crud"
|
|
|
- :option="elemntOption"
|
|
|
+ :data="loadData"
|
|
|
+ :option="loadOption"
|
|
|
+ v-model="obj"
|
|
|
:page.sync="page"
|
|
|
- :table-loading="elementloading"
|
|
|
- @on-load="getList"
|
|
|
- @row-update="rowUpdate"
|
|
|
-
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @selection-change="selectionChange"
|
|
|
- v-model="elemtform"
|
|
|
- :data="elemtData">
|
|
|
+ @on-load="onLoad"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="resetChange">
|
|
|
|
|
|
<template slot="menuRight">
|
|
|
<el-button
|
|
@@ -471,6 +441,7 @@
|
|
|
<script>
|
|
|
import { detailExcel, excelType, tabLazytree, wbstree, getWbsTypeList,} from '@/api/exctab/excelmodel';
|
|
|
import {updateBatchNodeTableInfo,selectByNodeTable,selectFormElements} from "@/api/manager/wbstree";
|
|
|
+import {tabTypeLazyTreeAll} from "@/api/manager/wbsprivate";
|
|
|
import FormulaEdit from "@/views/formula/edit.vue";
|
|
|
import PublicWbs from './PublicWbs.vue'
|
|
|
import { searchNodeTables, } from "@/api/exctab/excelmodel";
|
|
@@ -485,93 +456,107 @@ export default {
|
|
|
editElementFormTag:false,//编辑元素
|
|
|
formDatass: [],
|
|
|
selectionList:[],
|
|
|
- page: {
|
|
|
- pageSize: 10,
|
|
|
- currentPage: 1,
|
|
|
+ page: {
|
|
|
+ size: 10,
|
|
|
+ current: 1,
|
|
|
total: 2
|
|
|
},
|
|
|
- formelemtfoelemtformrm: {},
|
|
|
- elementloading: false,
|
|
|
- elemtData:[
|
|
|
- {
|
|
|
- tableName:'张三',
|
|
|
- sex:'男',
|
|
|
- id:1
|
|
|
- }, {
|
|
|
- tableName:'李四',
|
|
|
- sex:'女',
|
|
|
- id:2
|
|
|
- }
|
|
|
- ],
|
|
|
- elemntOption: {
|
|
|
- height: 'auto',
|
|
|
- calcHeight: 30,
|
|
|
- tip: false,
|
|
|
- searchShow: false,
|
|
|
- searchMenuSpan: 6,
|
|
|
- border: true,
|
|
|
- index: true,
|
|
|
- viewBtn: false,
|
|
|
- selection: true,
|
|
|
- editBtn:false,
|
|
|
- delBtn:false,
|
|
|
- addBtn:false,
|
|
|
- dialogClickModal: false,
|
|
|
- column: [
|
|
|
+ loadOption: {
|
|
|
+ height: 'auto',
|
|
|
+ calcHeight: 30,
|
|
|
+ tip: false,
|
|
|
+ searchShow:true,
|
|
|
+ searchMenuSpan: 6,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: false,
|
|
|
+ selection: true,
|
|
|
+ editBtn:false,
|
|
|
+ delBtn:false,
|
|
|
+ addBtn:false,
|
|
|
+ menu:true,
|
|
|
+
|
|
|
+ dialogClickModal: false,
|
|
|
+ column: [
|
|
|
{
|
|
|
- label: '表单名称',
|
|
|
- prop: 'tableName',
|
|
|
-
|
|
|
+ label: "元素表名称",
|
|
|
+ prop: "title",
|
|
|
+ search: true,
|
|
|
editDisplay: false,
|
|
|
addDisplay: false,
|
|
|
+ searchPlaceholder:'请输入元素表名称',
|
|
|
+ searchSpan:18,
|
|
|
+ searchLabelWidth:100,
|
|
|
},
|
|
|
{
|
|
|
label: "元素表类型",
|
|
|
- prop: "formatTableType",
|
|
|
+ prop: "tabType",
|
|
|
// search: true,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入名称",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入名称",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label: "元素总量",
|
|
|
prop: "elementTotal",
|
|
|
-
|
|
|
+
|
|
|
editDisplay: false,
|
|
|
addDisplay: false,
|
|
|
- rules: [{
|
|
|
- message: "请输入表数量",
|
|
|
- trigger: "blur",
|
|
|
- }]
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ message: "请输入表数量",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "所书方",
|
|
|
- prop: "formatOwner",
|
|
|
-
|
|
|
+ prop: "tabOwner",
|
|
|
+
|
|
|
editDisplay: false,
|
|
|
addDisplay: false,
|
|
|
- rules: [{
|
|
|
- message: "请输入表数量",
|
|
|
- trigger: "blur",
|
|
|
- }]
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ message: "请输入表数量",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "填报率",
|
|
|
prop: "fillRate",
|
|
|
-
|
|
|
+
|
|
|
editDisplay: false,
|
|
|
addDisplay: false,
|
|
|
- rules: [{
|
|
|
- message: "请输入表数量",
|
|
|
- trigger: "blur",
|
|
|
- }]
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ message: "请输入表数量",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
-
|
|
|
- ]
|
|
|
- },
|
|
|
+ ],
|
|
|
+
|
|
|
+ },
|
|
|
+ formelemtfoelemtformrm: {},
|
|
|
+ elementloading: false,
|
|
|
+ elemtData:[
|
|
|
+ {
|
|
|
+ tableName:'张三',
|
|
|
+ sex:'男',
|
|
|
+ id:1
|
|
|
+ }, {
|
|
|
+ tableName:'李四',
|
|
|
+ sex:'女',
|
|
|
+ id:2
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
curEleTable:{},
|
|
|
eleReg: /(-|>|<|≥|≤|±|【】)?([^≥≤±【】]*)/,
|
|
|
editEleList:[],
|
|
@@ -585,10 +570,10 @@ export default {
|
|
|
threessW: 400,
|
|
|
//#endregion
|
|
|
heightss: '',//
|
|
|
- loading: false,//懒加载
|
|
|
+
|
|
|
data: [],//清表模板
|
|
|
filterText:"",//搜索关键字
|
|
|
- allTreeShow:false,//是否显示整棵树
|
|
|
+
|
|
|
treeloading:false,
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
@@ -631,6 +616,19 @@ export default {
|
|
|
formulaCurRow: {}, //当前元素
|
|
|
id:'',
|
|
|
curTreeData:{},
|
|
|
+ loadData:[],
|
|
|
+ treeOption:{
|
|
|
+ defaultExpandAll:true,
|
|
|
+ filter:false,
|
|
|
+ addBtn:false,
|
|
|
+ props:{
|
|
|
+ labelText:'标题',
|
|
|
+ label:'title',
|
|
|
+ value:'id',
|
|
|
+ children:'children'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ treeData:'',
|
|
|
projectid:""
|
|
|
|
|
|
}
|
|
@@ -658,36 +656,56 @@ export default {
|
|
|
this.selectionList = [];
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
},
|
|
|
- getList () {
|
|
|
- // this.elementloading = true;
|
|
|
- const data = Object.assign({
|
|
|
- pageNum: this.page.currentPage,
|
|
|
- pageSize: this.page.pageSize,
|
|
|
- }, this.params)
|
|
|
- this.data = [];
|
|
|
- // getList(data).then(res => {
|
|
|
- // const data = res.data.data
|
|
|
- // this.loading = false;
|
|
|
- // this.page.total = data.total;
|
|
|
- // const result = data.list;
|
|
|
- // this.data = result;
|
|
|
- // })
|
|
|
+ async tabTypeLazyTreeAll ( parentId,current,size,titleName) {//清表树
|
|
|
+ console.log(parentId);
|
|
|
+ const { data: res } = await tabTypeLazyTreeAll({parentId,current,size,titleName} )
|
|
|
+ console.log(res,'tabTypeLazyTreeAll');
|
|
|
+ if (res.code === 200) {
|
|
|
+ return res.data
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
+ nodeClick(data){
|
|
|
+ console.log(data,'treedata');
|
|
|
+ this.treeId=data.id
|
|
|
+ this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
|
|
|
+ this.loadData=res.records
|
|
|
+ this.page.total=res.total
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
refreshChange () {
|
|
|
this.getList();
|
|
|
this.$message.success('刷新成功')
|
|
|
},
|
|
|
- onLoad (page, params = {}) {
|
|
|
- this.loading = true;
|
|
|
- // getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
- // const data = res.data.data;
|
|
|
- // this.page.total = data.total;
|
|
|
- // this.data = data.records;
|
|
|
- // this.loading = false;
|
|
|
- // this.selectionClear();
|
|
|
- // });
|
|
|
+ onLoad(page){
|
|
|
+ console.log(page,'page');
|
|
|
+ if(this.treeId){
|
|
|
+ this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize).then((res)=>{
|
|
|
+ this.loadData=res.records
|
|
|
+ this.page.total=res.total
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //搜索
|
|
|
+ searchChange(params,done){
|
|
|
+ if(this.treeId){
|
|
|
+ this.tabTypeLazyTreeAll(this.treeId, this.page.current,this.page.size,params.title).then((res)=>{
|
|
|
+ this.loadData=res.records
|
|
|
+ this.page.total=res.total
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ resetChange(item){
|
|
|
+ console.log(item);
|
|
|
+ this.tabTypeLazyTreeAll(this.treeId, this.page.current,this.page.size).then((res)=>{
|
|
|
+ this.loadData=res.records
|
|
|
+ this.page.total=res.total
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
handleDelete () {
|
|
|
if (this.selectionList.length === 0) {
|
|
@@ -887,47 +905,8 @@ export default {
|
|
|
// },
|
|
|
|
|
|
|
|
|
- //#region 外层左侧事件
|
|
|
- mouseLeave (data) {
|
|
|
- if (data.moreShow) {
|
|
|
- this.$set(data, 'moreShow', false)
|
|
|
- }
|
|
|
- },
|
|
|
- mouseOver (data) {
|
|
|
- if (!data.moreShow) {
|
|
|
- this.$set(data, 'moreShow', true)
|
|
|
- }
|
|
|
- },
|
|
|
- async treeLoad (node, resolve) {
|
|
|
- let id = node.data.id
|
|
|
- if (node.level == 0) {
|
|
|
- id = 0
|
|
|
- }
|
|
|
- let das = await this.tabLazytree(id, this.$route.params.id)
|
|
|
- return resolve(das)
|
|
|
- },
|
|
|
- nodeClick (data) {//外层树结构
|
|
|
- console.log(data,'treedata');
|
|
|
- this.from.import=""
|
|
|
- if (data.hasChildren == false) {
|
|
|
- this.from.checkd = true
|
|
|
- } else if (data.fileType == 3) {
|
|
|
- this.from.checkd = true
|
|
|
- } else {
|
|
|
- this.from.checkd = false
|
|
|
- }
|
|
|
- if (this.from.checkd) {
|
|
|
- this.detailExcel(data.id)
|
|
|
- } else {
|
|
|
- this.from = {
|
|
|
- checkd: false,//判断是否可以进行上传、重新上传excel
|
|
|
- id: '',//清表树ID
|
|
|
- extension: '', //文件名称
|
|
|
- fileUrl: '',//文件路径
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -952,7 +931,10 @@ export default {
|
|
|
|
|
|
},
|
|
|
created () {
|
|
|
- this.excelType()//清表类型
|
|
|
+ let id=12345678910
|
|
|
+ this.tabTypeLazyTreeAll(id).then((res)=>{
|
|
|
+ this.treeData=res.records;
|
|
|
+ })
|
|
|
},
|
|
|
mounted () {
|
|
|
// this.heightss = this.$refs.rulesss.clientHeight
|