@@ -216,9 +230,12 @@ import {
} from '@/api/back/index.js'
import { getSltAgreementInfo } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: 'CostApplyList',
dicts: [],
+ components: { Treeselect },
data() {
return {
// 遮罩层
@@ -257,8 +274,8 @@ export default {
pageSize: 10,
sltStatus: '',
isCommit:'',
- unitId: '',
- projectId: '',
+ unitId: null,
+ projectId: null,
agreementId: '',
agreementCode: '',
},
@@ -270,22 +287,40 @@ export default {
this.GetProData()
},
methods: {
+ /** 转换菜单数据结构 */
+ normalizer(node) {
+ if (node.children && !node.children.length) {
+ delete node.children;
+ }
+ return {
+ id: node.id,
+ label: node.name,
+ children: node.children,
+ };
+ },
// 获取 来往单位 列表数据
async GetUnitData() {
const params = {
- projectId: this.queryParams.projectId /* */,
+ // projectId: this.queryParams.projectId /* */,
}
const res = await getUnitList(params)
this.unitList = res.data;
+
this.getAgreementInfo()
},
unitChange(val){
- if(val&&val.length>0){
- this.queryParams.unitId=this.unitIds[this.unitIds.length - 1]
- }else if(val&&val.length==0){
- this.queryParams.unitId=""
- }
- this.GetProData()
+ // if(val&&val.length>0){
+ // this.queryParams.unitId=this.unitIds[this.unitIds.length - 1]
+ // }else if(val&&val.length==0){
+ // this.queryParams.unitId=""
+ // }
+ // this.GetProData()
+ setTimeout(()=>{
+ this.queryParams.projectId=null
+ this.queryParams.agreementId = null
+ this.queryParams.agreementCode = null
+ this.GetProData()
+ },500)
},
// 获取 工程名称 列表数据
async GetProData() {
@@ -294,15 +329,19 @@ export default {
}
const res = await getProjectList(params)
this.proList = res.data;
+
this.getAgreementInfo()
},
proChange(val){
- if(val&&val.length>0){
- this.queryParams.projectId=this.projectIds[this.projectIds.length - 1]
- }else if(val&&val.length==0){
- this.queryParams.projectId=""
- }
- this.GetUnitData()
+ // if(val&&val.length>0){
+ // this.queryParams.projectId=this.projectIds[this.projectIds.length - 1]
+ // }else if(val&&val.length==0){
+ // this.queryParams.projectId=""
+ // }
+ // this.GetUnitData()
+ setTimeout(()=>{
+ this.GetUnitData()
+ },500)
},
// 获取 协议id
async getAgreementInfo() {
@@ -348,8 +387,8 @@ export default {
pageSize: 10,
sltStatus: '',
isCommit:'',
- unitId: '',
- projectId: '',
+ unitId: null,
+ projectId: null,
agreementId: '',
agreementCode: '',
}
diff --git a/src/views/material/cost/component/examHome.vue b/src/views/material/cost/component/examHome.vue
index 22e5a86e..6a32f0e9 100644
--- a/src/views/material/cost/component/examHome.vue
+++ b/src/views/material/cost/component/examHome.vue
@@ -2,7 +2,14 @@
-
+
-
+
@@ -186,9 +200,12 @@ import {
} from '@/api/back/index.js'
import { getSltExam } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: 'CostApplyList',
dicts: [],
+ components: { Treeselect },
data() {
return {
// 遮罩层
@@ -229,10 +246,10 @@ export default {
keyWord: undefined,
sltStatus: '',
isCommit: '',
- unitId: '',
- projectId: '',
- agreementId: '',
- agreementCode: '',
+ unitId: null,
+ projectId: null,
+ agreementId: null,
+ agreementCode: null,
},
openPrint:false
}
@@ -243,22 +260,40 @@ export default {
this.GetProData()
},
methods: {
+ /** 转换菜单数据结构 */
+ normalizer(node) {
+ if (node.children && !node.children.length) {
+ delete node.children;
+ }
+ return {
+ id: node.id,
+ label: node.name,
+ children: node.children,
+ };
+ },
// 获取 来往单位 列表数据
async GetUnitData() {
const params = {
- projectId: this.queryParams.projectId /* */,
+ // projectId: this.queryParams.projectId /* */,
}
const res = await getUnitList(params)
this.unitList = res.data;
+
this.getAgreementInfo()
},
unitChange(val){
- if(val&&val.length>0){
- this.queryParams.unitId=this.unitIds[this.unitIds.length - 1]
- }else if(val&&val.length==0){
- this.queryParams.unitId=""
- }
- this.GetProData()
+ // if(val&&val.length>0){
+ // this.queryParams.unitId=this.unitIds[this.unitIds.length - 1]
+ // }else if(val&&val.length==0){
+ // this.queryParams.unitId=""
+ // }
+ // this.GetProData()
+ setTimeout(()=>{
+ this.queryParams.projectId=null
+ this.queryParams.agreementId = null
+ this.queryParams.agreementCode = null
+ this.GetProData()
+ },500)
},
// 获取 工程名称 列表数据
async GetProData() {
@@ -267,15 +302,19 @@ export default {
}
const res = await getProjectList(params)
this.proList = res.data;
+
this.getAgreementInfo()
},
proChange(val){
- if(val&&val.length>0){
- this.queryParams.projectId=this.projectIds[this.projectIds.length - 1]
- }else if(val&&val.length==0){
- this.queryParams.projectId=""
- }
- this.GetUnitData()
+ // if(val&&val.length>0){
+ // this.queryParams.projectId=this.projectIds[this.projectIds.length - 1]
+ // }else if(val&&val.length==0){
+ // this.queryParams.projectId=""
+ // }
+ // this.GetUnitData()
+ setTimeout(()=>{
+ this.GetUnitData()
+ },500)
},
// 获取 协议id
async getAgreementInfo() {
@@ -316,6 +355,16 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
+ this.queryParams={
+ pageNum: 1,
+ pageSize: 10,
+ sltStatus: '',
+ isCommit:'',
+ unitId: null,
+ projectId: null,
+ agreementId: '',
+ agreementCode: '',
+ }
this.resetForm('queryForm')
this.handleQuery()
},