|
@@ -4,11 +4,33 @@
|
|
|
<div class="boxnei" style="display: flex; flex-direction: column">
|
|
|
<h3>引用元素表</h3>
|
|
|
<div style="overflow: auto; flex: 1">
|
|
|
- <avue-tree
|
|
|
- :option="treeOption"
|
|
|
- :data="treeData"
|
|
|
+ <el-tree
|
|
|
+ style="display: inline-block;min-width: 100%;"
|
|
|
+ ref="trees"
|
|
|
+ :loading="loading"
|
|
|
+
|
|
|
+
|
|
|
+ :data="data"
|
|
|
+ :props="defaultProps"
|
|
|
@node-click="nodeClick"
|
|
|
- ></avue-tree>
|
|
|
+ node-key="id"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ v-show="!allTreeShow"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="custom-tree-node"
|
|
|
+ slot-scope="{ data ,node }"
|
|
|
+
|
|
|
+ style="box-sizing: border-box;padding-right:70px!important;;"
|
|
|
+ >
|
|
|
+ <div style="width:100%;">
|
|
|
+ <span style="text-overflow: ellipsis;"> {{ data.title }} </span>
|
|
|
+ <!-- <span> {{ node}} </span> -->
|
|
|
+ <!-- 添加 -->
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -28,7 +50,12 @@
|
|
|
v-model="obj"
|
|
|
ref="crud"
|
|
|
@selection-change="selectionChange"
|
|
|
- >qingb
|
|
|
+ :page.sync="page"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="resetChange"
|
|
|
+ >
|
|
|
+
|
|
|
+
|
|
|
<template slot="menuRight">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -47,15 +74,13 @@
|
|
|
>删除表单
|
|
|
</el-button>
|
|
|
</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" @click="rightClick(
|
|
|
- row.pkeyId,
|
|
|
- row.excelId,
|
|
|
- row.id,
|
|
|
- row.initTableName
|
|
|
+ row
|
|
|
)">编辑元素</el-button>
|
|
|
- <el-button :size="size" :type="type" @click="adjustExcel(row.pkeyId,row.excelId)">调整表单</el-button>
|
|
|
+ <el-button :size="size" :type="type" @click="adjustExcel(row.id,row.primaryKeyId)">调整表单</el-button>
|
|
|
<el-button :size="size" :type="type" @click="handleEditFormula(row)">编辑公式</el-button>
|
|
|
|
|
|
</template>
|
|
@@ -64,7 +89,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Qute ref="Qute"> </Qute>
|
|
|
+ <Qute ref="Qute" :projectid="projectid"> </Qute>
|
|
|
<Relation ref="Relation" :GLExcelFrom="GLExcelFrom"/>
|
|
|
<!-- 编辑元素 -->
|
|
|
<!-- 编辑元素 -->
|
|
@@ -77,7 +102,6 @@
|
|
|
>
|
|
|
<EditElement
|
|
|
:pkeyId="editElementQuery.pkeyId"
|
|
|
- :excelId="editElementQuery.excelId"
|
|
|
:id="editElementQuery.id"
|
|
|
:initTableName="editElementQuery.initTableName"
|
|
|
:pid="editElementQuery.pid"
|
|
@@ -160,13 +184,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- detailExcel,
|
|
|
- excelType,
|
|
|
- tabLazytree,
|
|
|
- wbstree,
|
|
|
- getWbsTypeList,
|
|
|
-} from "@/api/exctab/excelmodel";
|
|
|
+import {tabTypeLazyTree,tabTypeLazyTreeAll} from "@/api/manager/wbsprivate";
|
|
|
import {
|
|
|
updateBatchNodeTableInfo,
|
|
|
selectByNodeTable,
|
|
@@ -199,20 +217,23 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ page:{
|
|
|
+ current:1,
|
|
|
+ size:10,
|
|
|
+ total:0
|
|
|
+ },
|
|
|
+ search:{},
|
|
|
+ loading:false,
|
|
|
dialogVisible: false,
|
|
|
obj: {},
|
|
|
- treeData: [
|
|
|
- {
|
|
|
- value: 0,
|
|
|
- label: "一级部门",
|
|
|
- children: [
|
|
|
- {
|
|
|
- value: 1,
|
|
|
- label: "一级部门1",
|
|
|
- },
|
|
|
- ],
|
|
|
+ data: [],
|
|
|
+ defaultProps: {
|
|
|
+ children: "children",
|
|
|
+ isLeaf: function (data) {
|
|
|
+ return data.hasChildren;
|
|
|
},
|
|
|
- ],
|
|
|
+ },
|
|
|
+ allTreeShow:false,//是否显示整棵树
|
|
|
treeOption: {
|
|
|
defaultExpandAll: true,
|
|
|
filter: false,
|
|
@@ -250,7 +271,7 @@ export default {
|
|
|
height: "auto",
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
- searchShow: false,
|
|
|
+ searchShow: true,
|
|
|
searchMenuSpan: 6,
|
|
|
border: true,
|
|
|
index: true,
|
|
@@ -261,19 +282,23 @@ export default {
|
|
|
addBtn: false,
|
|
|
menu: true,
|
|
|
menuWidth:300,
|
|
|
+ searchShowBtn: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: [
|
|
|
{
|
|
@@ -299,7 +324,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "所书方",
|
|
|
- prop: "formatOwner",
|
|
|
+ prop: "tabOwner",
|
|
|
|
|
|
editDisplay: false,
|
|
|
addDisplay: false,
|
|
@@ -356,22 +381,65 @@ export default {
|
|
|
//#region公式
|
|
|
id: "",
|
|
|
curTreeData: {},
|
|
|
- projectid:''
|
|
|
+ projectid:'',
|
|
|
+ treeId:""
|
|
|
+
|
|
|
|
|
|
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.loadData = this.loadData1;
|
|
|
+ // this.loadData = this.loadData1;
|
|
|
+ this.projectid = this.$route.query.pid;
|
|
|
+ this.treeLoad1()
|
|
|
},
|
|
|
methods: {
|
|
|
- nodeClick(data) {
|
|
|
- if (data.value == 0) {
|
|
|
- this.loadData = this.loadData1;
|
|
|
- } else if (data.value == 1) {
|
|
|
- this.loadData = this.loadData2;
|
|
|
+
|
|
|
+ async treeLoad1 () {
|
|
|
+ let id = 12345678910
|
|
|
+ let das = await this.tabTypeLazyTree(id, this.projectid,this.page.current,this.page.size)
|
|
|
+ console.log(this.projectid,'projectid');
|
|
|
+ this.data=das.records
|
|
|
+ // return resolve(das.records)
|
|
|
+ },
|
|
|
+ //#region 接口
|
|
|
+ async tabTypeLazyTree (parentId, projectId,current,size,titleName) {//清表树
|
|
|
+ console.log(parentId, projectId);
|
|
|
+ const { data: res } = await tabTypeLazyTree({ parentId, projectId,current,size,titleName })
|
|
|
+ console.log(res);
|
|
|
+ if (res.code === 200) {
|
|
|
+ return res.data
|
|
|
}
|
|
|
- this.$message.success(JSON.stringify(data));
|
|
|
+ },
|
|
|
+ //搜索
|
|
|
+ searchChange(params,done){
|
|
|
+ this.tabTypeLazyTree(this.treeId, this.projectid,this.page.current,this.page.size,params.title).then((res)=>{
|
|
|
+ console.log(res.records);
|
|
|
+ this.loadData=res.records;
|
|
|
+ this.page.total=this.loadData.length
|
|
|
+ done();
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ resetChange(item){
|
|
|
+ console.log(item);
|
|
|
+ this.tabTypeLazyTree(this.treeId, this.projectid,this.page.current,this.page.size).then((res)=>{
|
|
|
+ console.log(res.records);
|
|
|
+ this.loadData=res.records;
|
|
|
+ this.page.total=this.loadData.length
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ nodeClick (data) {//外层树结构
|
|
|
+ console.log(data,'treedata');
|
|
|
+ this.treeId=data.id
|
|
|
+ this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
|
|
|
+ console.log(res.records);
|
|
|
+ this.loadData=res.records;
|
|
|
+ this.page.total=this.loadData.length
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
this.$confirm("确认关闭?")
|
|
@@ -382,7 +450,8 @@ export default {
|
|
|
},
|
|
|
//引用元素表单库
|
|
|
quteEle(){
|
|
|
- this.$refs.Qute.show()
|
|
|
+ this.$refs.Qute.show();
|
|
|
+
|
|
|
},
|
|
|
handleDelete () {
|
|
|
if (this.selectionList.length === 0) {
|
|
@@ -399,7 +468,8 @@ export default {
|
|
|
console.log(this.ids,'this.ids删除');
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
+ this.tabTypeLazyTree(this.treeId, this.projectid,this.page.current,this.page.size)
|
|
|
+
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
@@ -416,26 +486,27 @@ export default {
|
|
|
},
|
|
|
//关联清表
|
|
|
Associationlist(row) {
|
|
|
- console.log('关联清表');
|
|
|
+ console.log('关联清表',row);
|
|
|
this.$refs.Relation.show()
|
|
|
- this.GLExcelFrom.name = row.modeId;
|
|
|
+ // this.GLExcelFrom.name = row.modeId;
|
|
|
|
|
|
- this.GLExcelFrom.id = row.pkeyId;
|
|
|
- this.GLExcelFrom.excelId =row.excelId;
|
|
|
+ this.GLExcelFrom.id = row.primaryKeyId;
|
|
|
+ this.GLExcelFrom.excelId =row.id;
|
|
|
this.GLExcelFrom.ids = row.id;
|
|
|
- this.GLExcelFrom.initTableName =row.initTableName;
|
|
|
- this.GLExcelFrom.excelId=row.excelId
|
|
|
+ this.GLEidxcelFrom.initTableName =row.title;
|
|
|
+ // this.GLExcelFrom.excelId=row.excelId
|
|
|
},
|
|
|
//#region 编辑元素
|
|
|
- async rightClick(pkeyId, excelId, id, initTableName) {
|
|
|
- // await this.getExcelHtml2(pkeyId);
|
|
|
+ async rightClick(row) {
|
|
|
+ console.log(row,'编辑元素');
|
|
|
+ await this.getExcelHtml2(row.id);
|
|
|
// console.log('编辑元素');
|
|
|
- // this.editElementQuery.pkeyId = pkeyId;
|
|
|
+ this.editElementQuery.pkeyId = row.primaryKeyId;
|
|
|
// this.editElementQuery.excelId = excelId;
|
|
|
- // this.editElementQuery.id = id;
|
|
|
- // this.editElementQuery.initTableName = initTableName;
|
|
|
- // this.editElementQuery.pid = this.$route.query.pid;
|
|
|
- // this.editElementQuery.wbsid = this.$route.query.wbsid;
|
|
|
+ this.editElementQuery.id = row.id;
|
|
|
+ this.editElementQuery.initTableName =row. title;
|
|
|
+ this.editElementQuery.pid = this.$route.query.pid;
|
|
|
+ this.editElementQuery.wbsid = this.$route.query.wbsid;
|
|
|
// this.editElementQuery.nodeid = this.curTreeData.id;
|
|
|
|
|
|
this.editElementVisible = true;
|
|
@@ -452,8 +523,8 @@ export default {
|
|
|
this.excelHtml=true
|
|
|
// console.log('调整表单');
|
|
|
// //调整表单
|
|
|
- // this.GLExcelFrom.id = pkeyId;
|
|
|
- // this.getExcelHtml(pkeyId);
|
|
|
+ this.GLExcelFrom.id = pkeyId;
|
|
|
+ this.getExcelHtml(pkeyId);
|
|
|
},
|
|
|
handleEditFormula(row) {
|
|
|
console.log('公式');
|