From 5e98f0f9150b9b095547bbe613b15c2ae4beb50d Mon Sep 17 00:00:00 2001 From: junhong Date: Thu, 15 May 2025 09:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=BA=A6=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../progress-tracking/api.js | 6 +- .../progress-tracking/index.vue | 67 +++++--- .../progress-tracking/indexcopy.vue | 159 ++++++++++++++++++ .../progress-tracking/options.js | 66 ++++---- vite.config.js | 4 +- 5 files changed, 236 insertions(+), 66 deletions(-) create mode 100644 src/views/constructionScheduling/progress-tracking/indexcopy.vue diff --git a/src/views/constructionScheduling/progress-tracking/api.js b/src/views/constructionScheduling/progress-tracking/api.js index 4ba26c75..a1684a1c 100644 --- a/src/views/constructionScheduling/progress-tracking/api.js +++ b/src/views/constructionScheduling/progress-tracking/api.js @@ -2,7 +2,8 @@ import axios from '@/utils/request' // 查询分页数据: export const iprogressList = (arg) => { return axios.request({ - url: '/iprogress/list', + url: '/iprogressNew/list', + // url: '/iprogress/list', method: 'get', params: arg, dataType: 'json', @@ -23,7 +24,8 @@ export const iprogressGetById = (arg) => { // 添加数据: export const iprogressAdd = (arg) => { return axios.request({ - url: '/iprogress/add', + // url: '/iprogress/add', + url:'/iprogressNew/add', method: 'post', data: arg, dataType: 'json', diff --git a/src/views/constructionScheduling/progress-tracking/index.vue b/src/views/constructionScheduling/progress-tracking/index.vue index 782bc039..f859eace 100644 --- a/src/views/constructionScheduling/progress-tracking/index.vue +++ b/src/views/constructionScheduling/progress-tracking/index.vue @@ -39,13 +39,19 @@ const state = reactive({ }, hideselection: true, pageInfo: { total: 0, base: { limit: 8, current: 1 } }, - baseQuery: { processDate: formattedTime }, + baseQuery: { date: formattedTime }, + processDate: "", beforeSubmit: function (params) { - let child = proxy.getNameById(state.planList, params.planId, 'id') - if (!params.parentId) params.parentId = 0 - params.planName = child.planName + // let child = proxy.getNameById(state.planList, params.planId, 'id') + // if (!params.parentId) params.parentId = 0 + // params.planName = child.planName return params }, + tableDataFormatter: function (params, res) { + state.processDate = table.value.filterRef.getFilterParams().date + return res.data.list + }, + hideControl:true, planList: [], handleAdd: function (params) { getPlanList().then(() => { @@ -53,7 +59,7 @@ const state = reactive({ }) }, beforeEdit: function (params) { - if (params.parentId == 0) params.parentId = ' ' + // if (params.parentId == 0) params.parentId = ' ' return new Promise((resolve) => { getPlanList().then(() => { resolve(params) @@ -91,20 +97,20 @@ function getPlanList(params) { }); } }) - await iprogressList({ pageNo: 1, pageSize: 9999 }).then((res) => { - if (res.code == 200) { - state.baseModelOptions = proxy.$util.setOptions({ - attrName: 'data',//树形 - data: state.baseModelOptions, //待赋值数据源 - key: "parentId", //配置项的key - res: res, //返回结果 - path: res.data.list, - relation: { key: 'value', name: 'label', resKey: 'id', resName: 'planName' }, - everClear: true, - hasChildren: true, - }); - } - }) + // await iprogressList({ pageNo: 1, pageSize: 9999 }).then((res) => { + // if (res.code == 200) { + // state.baseModelOptions = proxy.$util.setOptions({ + // attrName: 'data',//树形 + // data: state.baseModelOptions, //待赋值数据源 + // key: "parentId", //配置项的key + // res: res, //返回结果 + // path: res.data.list, + // relation: { key: 'value', name: 'label', resKey: 'id', resName: 'planName' }, + // everClear: true, + // hasChildren: true, + // }); + // } + // }) resolve(params) }) } @@ -122,7 +128,16 @@ function handAdd(item) {