From 04fcd436ed88c22b0b5fa61756b94f4ac4b6c7c8 Mon Sep 17 00:00:00 2001 From: chen <1216142052@qq.com> Date: Thu, 22 Sep 2022 19:17:26 +0800 Subject: [PATCH] =?UTF-8?q?2022-09-22=201.1.2=20=E6=AC=BE=E5=BC=8F?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=B7=B3=E8=BD=AC=E5=85=B6=E4=BB=96=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=88=E5=9E=8B=E5=8F=B7=E3=80=81=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/process/ZyProcessList.vue | 61 ++++++++++++++- .../views/zyclothsstyle/ZyClothsStyleList.vue | 10 ++- .../views/zystylemodel/ZyStyleModelList.vue | 77 +++++++++++++------ .../controller/ZyStyleModelController.java | 4 +- .../controller/ZyStyleModuleController.java | 1 - 5 files changed, 125 insertions(+), 28 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue index fcc01a94..d11f1734 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyProcessList.vue @@ -138,6 +138,8 @@ import ZyProcessModal5 from './modules/ZyProcessModal5' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import ZyProcessDetail from './modules/ZyProcessDetail' + import {getAction} from "@api/manage"; + import {filterObj} from "@/utils/util"; export default { name: 'ZyProcessList', mixins:[JeecgListMixin, mixinDevice], @@ -285,12 +287,17 @@ importExcelUrl: "base/zyProcess/importExcel", }, + //参数 + loadRouteType:false, + styleId:"", dictOptions:{}, superFieldList:[], } }, created() { - this.getSuperFieldList(); + // queryParam.styleId=this.styleId + // this.getSuperFieldList(); + this.loadParameter() ; }, computed: { importExcelUrl: function(){ @@ -300,6 +307,58 @@ methods: { initDictConfig(){ }, + //加载传递参数 + loadParameter() { + if (this.loadRouteType == false) { + this.styleId = this.$route.query.styleId; + console.log(this.styleId) + this.loadRouteType = true; + } + }, + loadData(arg) { + if(!this.url.list){ + this.$message.error("请设置url.list属性!") + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1; + } + this.loadParameter(); + var params = this.getQueryParams();//查询条件 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records||res.result; + if(res.result.total) + { + this.ipagination.total = res.result.total; + }else{ + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + }else{ + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + getQueryParams() { + //获取查询条件 + let sqp = {} + if(this.superQueryParams){ + sqp['superQueryParams']=encodeURI(this.superQueryParams) + sqp['superQueryMatchType'] = this.superQueryMatchType + } + var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); + param.field = this.getQueryField(); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + param.styleId=this.styleId; + return filterObj(param); + }, getSuperFieldList(){ let fieldList=[]; fieldList.push({type:'string',value:'processCode',text:'工序代码',dictCode:''}) diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue index 9c6d535c..aee5e989 100644 --- a/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue +++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue @@ -247,12 +247,20 @@ }, jumpPage4(record) { this.$router.push({ - path: '/zyclothsstyle/ZyClothsStyleList', + path: '/src/views/zystylemodel/ZyStyleModelList', query: { // 路由携带参数 'id': record.id, } }); }, + jumpPage5(record) { + this.$router.push({ + path: '/process/ZyProcessList', + query: { // 路由携带参数 + 'styleId': record.id, + } + }); + }, getSuperFieldList(){ let fieldList=[]; fieldList.push({type:'popup',value:'typeId',text:'类型id', popup:{code:'zy_cloths_type',field:'type_name',orgFields:'type_name',destFields:'id'}}) diff --git a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue index 50a5421e..182018c5 100644 --- a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue +++ b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue @@ -27,7 +27,6 @@ :pagination="pagination" style="margin-top: 8px;" @pageChange="handlePageChange" - @selectRowChange="handleSelectRowChange" >