|
@@ -45,7 +45,7 @@
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
v-model="GLExcelFrom.name"
|
|
v-model="GLExcelFrom.name"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- @change="changetherr()"
|
|
|
|
|
|
+ @change="changetherr"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="(item, key) in GLExcelData"
|
|
v-for="(item, key) in GLExcelData"
|
|
@@ -58,21 +58,26 @@
|
|
<el-scrollbar style="margin-top: 20px; height: 50vh">
|
|
<el-scrollbar style="margin-top: 20px; height: 50vh">
|
|
<el-input
|
|
<el-input
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
- v-model.trim="GLExcelFrom.search"
|
|
|
|
|
|
+ v-model.trim="searchVal"
|
|
placeholder="请输入需要选择的内容"
|
|
placeholder="请输入需要选择的内容"
|
|
></el-input>
|
|
></el-input>
|
|
<el-tree
|
|
<el-tree
|
|
|
|
+ v-if="checkId"
|
|
|
|
+ :key="treeKey"
|
|
|
|
+ lazy
|
|
:filter-node-method="filterNode222"
|
|
:filter-node-method="filterNode222"
|
|
ref="tree"
|
|
ref="tree"
|
|
class="filter-tree"
|
|
class="filter-tree"
|
|
style="margin-top: 10px"
|
|
style="margin-top: 10px"
|
|
:props="GLExcelProps"
|
|
:props="GLExcelProps"
|
|
- :data="exceldata"
|
|
|
|
|
|
+ :load="loadNode"
|
|
node-key="id"
|
|
node-key="id"
|
|
accordion
|
|
accordion
|
|
show-checkbox
|
|
show-checkbox
|
|
@check="checkchange"
|
|
@check="checkchange"
|
|
v-loading="GLExcelLoading"
|
|
v-loading="GLExcelLoading"
|
|
|
|
+ :default-checked-keys="linkexcelId"
|
|
|
|
+
|
|
>
|
|
>
|
|
</el-tree>
|
|
</el-tree>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
@@ -87,13 +92,13 @@
|
|
style="margin-left: 30px"
|
|
style="margin-left: 30px"
|
|
type="primary"
|
|
type="primary"
|
|
v-throttle="2000"
|
|
v-throttle="2000"
|
|
- @click="saveLinkTab()"
|
|
|
|
|
|
+ @click="saveLink()"
|
|
>确 定</el-button
|
|
>确 定</el-button
|
|
>
|
|
>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 配置划分数据 -->
|
|
<!-- 配置划分数据 -->
|
|
- <configDivision :testGLExcel="testGLExcel" :setId="setId" @changemodal="changemodal"></configDivision>
|
|
|
|
|
|
+ <configDivision :testGLExcel="testGLExcel" :setId="setId" @changemodal="changemodal" :trialTreeIds="trialTreeIds"></configDivision>
|
|
</basic-container>
|
|
</basic-container>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -102,11 +107,12 @@
|
|
import {mapGetters} from "vuex";
|
|
import {mapGetters} from "vuex";
|
|
import {
|
|
import {
|
|
getList as getListQing,
|
|
getList as getListQing,
|
|
- tabLazytreeAll,
|
|
|
|
- saveLinkTab,
|
|
|
|
- getExcelHtml,
|
|
|
|
|
|
+
|
|
|
|
+
|
|
} from "@/api/exctab/excelmodel";
|
|
} from "@/api/exctab/excelmodel";
|
|
|
|
+import {relevancy,tablazy} from "@/api/tentative/testcollect";
|
|
import configDivision from "./components/configDivision.vue";
|
|
import configDivision from "./components/configDivision.vue";
|
|
|
|
+
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components:{
|
|
components:{
|
|
@@ -160,6 +166,7 @@ import configDivision from "./components/configDivision.vue";
|
|
initTableName: "",
|
|
initTableName: "",
|
|
initTableId:""
|
|
initTableId:""
|
|
},
|
|
},
|
|
|
|
+ searchVal:'',
|
|
GLExcelData:[],
|
|
GLExcelData:[],
|
|
exceldata:[],
|
|
exceldata:[],
|
|
GLExcelProps: {
|
|
GLExcelProps: {
|
|
@@ -178,6 +185,11 @@ import configDivision from "./components/configDivision.vue";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
testGLExcel:false,
|
|
testGLExcel:false,
|
|
|
|
+ checkId:'',
|
|
|
|
+ treeKey:Math.random,
|
|
|
|
+ setId:'',
|
|
|
|
+ trialTreeIds:'',//已关联的配置划分数据
|
|
|
|
+ linkexcelId:[]//已关联的清表数据
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -200,12 +212,12 @@ import configDivision from "./components/configDivision.vue";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- "GLExcelFrom.search"(val) {
|
|
|
|
- console.log(val);
|
|
|
|
|
|
+ searchVal(val) {
|
|
if (this.exceldata) {
|
|
if (this.exceldata) {
|
|
this.$refs.tree.filter(val);
|
|
this.$refs.tree.filter(val);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
rowSave(row, done, loading) {
|
|
rowSave(row, done, loading) {
|
|
@@ -300,9 +312,12 @@ import configDivision from "./components/configDivision.vue";
|
|
//关联清表
|
|
//关联清表
|
|
Associationlist(row) {
|
|
Associationlist(row) {
|
|
//关联清表点击事件
|
|
//关联清表点击事件
|
|
- console.log(row,'row');
|
|
|
|
- this.GLExcelFrom.id = row.pkeyId;
|
|
|
|
|
|
+ this.linkexcelId=row.excelId.split(',')
|
|
|
|
+ this.GLExcelFrom.id = row.id;
|
|
|
|
+ this.GLExcelFrom=row
|
|
|
|
+ this.searchVal=''
|
|
this.GLExcel =true ;
|
|
this.GLExcel =true ;
|
|
|
|
+ this.treeKey=Math.random()
|
|
this.getList({
|
|
this.getList({
|
|
current: 1,
|
|
current: 1,
|
|
size: 100000,
|
|
size: 100000,
|
|
@@ -316,28 +331,39 @@ import configDivision from "./components/configDivision.vue";
|
|
this.GLExcelFrom.search = "";
|
|
this.GLExcelFrom.search = "";
|
|
this.GLExcelFrom.id = "";
|
|
this.GLExcelFrom.id = "";
|
|
this.exceldata = [];
|
|
this.exceldata = [];
|
|
-
|
|
|
|
|
|
+ this.checkId=''
|
|
this.GLExcel = false;
|
|
this.GLExcel = false;
|
|
},
|
|
},
|
|
- changetherr() {
|
|
|
|
|
|
+ changetherr(val) {
|
|
|
|
+ console.log(val,'val');
|
|
//清表类型选择框change事件
|
|
//清表类型选择框change事件
|
|
if (this.GLExcelFrom.name != "") {
|
|
if (this.GLExcelFrom.name != "") {
|
|
this.GLExcelFrom.search = "";
|
|
this.GLExcelFrom.search = "";
|
|
- this.tabLazytreeAll();
|
|
|
|
|
|
+ this.checkId=val
|
|
|
|
+ this.treeKey=Math.random()
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async tabLazytreeAll() {
|
|
|
|
- //清表树信息
|
|
|
|
- this.GLExcelLoading = true;
|
|
|
|
- const { data: res } = await tabLazytreeAll({
|
|
|
|
- modeId: this.GLExcelFrom.name,
|
|
|
|
- name: this.GLExcelFrom.search,
|
|
|
|
- });
|
|
|
|
- this.GLExcelLoading = false;
|
|
|
|
- console.log(res);
|
|
|
|
- if (res.code === 200 && res.msg === "操作成功") {
|
|
|
|
- this.exceldata = res.data;
|
|
|
|
|
|
+
|
|
|
|
+ loadNode(node, resolve) {
|
|
|
|
+ let pid = 0;
|
|
|
|
+ let modeId=this.checkId;
|
|
|
|
+ if (node.level != 0) {
|
|
|
|
+ pid = node.data.id;
|
|
|
|
+ modeId=node.data.parentId
|
|
}
|
|
}
|
|
|
|
+ tablazy({
|
|
|
|
+ modeId: modeId,
|
|
|
|
+ parentId: pid,
|
|
|
|
+ classId:this.GLExcelFrom.id
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ let arr = [];
|
|
|
|
+ if (Array.isArray(res.data.data)) {
|
|
|
|
+ arr = res.data.data;
|
|
|
|
+ }
|
|
|
|
+ return resolve(arr);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
filterNode222(value,data,node) {
|
|
filterNode222(value,data,node) {
|
|
if(!value){
|
|
if(!value){
|
|
@@ -375,21 +401,14 @@ import configDivision from "./components/configDivision.vue";
|
|
this.$refs.tree.setCheckedKeys([data.id]);
|
|
this.$refs.tree.setCheckedKeys([data.id]);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async saveLinkTab() {
|
|
|
|
|
|
+ async saveLink() {
|
|
//保存按钮
|
|
//保存按钮
|
|
- let checkNodes = this.$refs.tree.getCheckedNodes();
|
|
|
|
- if (checkNodes.length > 0) {
|
|
|
|
- let node = checkNodes[checkNodes.length - 1];
|
|
|
|
- if (node.fileType != 3) {
|
|
|
|
- this.$message({
|
|
|
|
- type: "warning",
|
|
|
|
- message: "请先上传Excel表",
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- const { data: res } = await saveLinkTab({
|
|
|
|
- exceTabId: node.id,
|
|
|
|
- tabId: this.GLExcelFrom.id,
|
|
|
|
|
|
+ let checkIds=this.$refs.tree.getCheckedKeys();
|
|
|
|
+ if (checkIds.length > 0) {
|
|
|
|
+
|
|
|
|
+ const { data: res } = await relevancy({
|
|
|
|
+ classId:this.GLExcelFrom.id,
|
|
|
|
+ excelId:checkIds.join(',')
|
|
});
|
|
});
|
|
console.log(res);
|
|
console.log(res);
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -398,11 +417,12 @@ import configDivision from "./components/configDivision.vue";
|
|
message: "关联清表成功",
|
|
message: "关联清表成功",
|
|
});
|
|
});
|
|
this.GLExcel =false ;
|
|
this.GLExcel =false ;
|
|
|
|
+ this.refreshChange()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
type: "warning",
|
|
type: "warning",
|
|
- message: "请先设置清表",
|
|
|
|
|
|
+ message: "请先选择清表",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -410,9 +430,11 @@ import configDivision from "./components/configDivision.vue";
|
|
configurationClick(row){
|
|
configurationClick(row){
|
|
this.testGLExcel=true
|
|
this.testGLExcel=true
|
|
this.setId=row.id
|
|
this.setId=row.id
|
|
|
|
+ this.trialTreeIds=row.trialTreeIds
|
|
},
|
|
},
|
|
changemodal(){
|
|
changemodal(){
|
|
this.testGLExcel=false
|
|
this.testGLExcel=false
|
|
|
|
+ this.refreshChange()
|
|
},
|
|
},
|
|
//数据映射配置
|
|
//数据映射配置
|
|
associatedClick() {
|
|
associatedClick() {
|