From bc4a6ce5d19f9570bd03d16eac5d6f2f84e98da1 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期三, 24 一月 2024 14:36:02 +0800 Subject: [PATCH] 返修标记 --- jcdm-ui/src/views/main/pr/tightenReport/index.vue | 60 ++++++++++++++++++++---------------------------------------- 1 files changed, 20 insertions(+), 40 deletions(-) diff --git a/jcdm-ui/src/views/main/pr/tightenReport/index.vue b/jcdm-ui/src/views/main/pr/tightenReport/index.vue index 36f9cc4..f1f45df 100644 --- a/jcdm-ui/src/views/main/pr/tightenReport/index.vue +++ b/jcdm-ui/src/views/main/pr/tightenReport/index.vue @@ -14,7 +14,6 @@ placeholder="璇疯緭鍏ュ伐浣嶅彿" @keyup.enter.native="handleQuery"/> </el-form-item> - <el-form-item label-width="120" label="閲囬泦鏃堕棿" prop="startDate"> <el-date-picker v-model="dateRange" @@ -23,7 +22,6 @@ start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"> </el-date-picker> - <button @click="fetchData">鏌ヨ</button> </el-form-item> <el-form-item style="float: right"> <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">鏌ヨ</el-button> @@ -42,7 +40,7 @@ <el-table-column label="鍙傛暟鍊�" align="center" prop="paramValue"></el-table-column> <el-table-column label="閲囬泦鏃堕棿" align="center" prop="collectionTime" width="180"> <template slot-scope="scope"> - <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span> + <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> </template> </el-table-column> <el-table-column label="鐘舵��" align="center" prop="state"></el-table-column> @@ -119,24 +117,24 @@ created() { this.getList(); }, - methods:{ + methods: { - async fetchData() { - // 鏋勫缓API璇锋眰鐨刄RL锛屼娇鐢ㄩ�夋嫨鐨勬棩鏈熻寖鍥翠綔涓烘煡璇㈠弬鏁� - const url = `@/api/main/da/paramCollection/paramCollection?startDate=${this.dateRange[0]}&endDate=${this.dateRange[1]}`; + // async fetchData() { + // // 鏋勫缓API璇锋眰鐨刄RL锛屼娇鐢ㄩ�夋嫨鐨勬棩鏈熻寖鍥翠綔涓烘煡璇㈠弬鏁� + // const url = `@/api/main/da/paramCollection/paramCollection?startDate=${this.dateRange[0]}&endDate=${this.dateRange[1]}`; + // + // try { + // // 鍙戦�丄PI璇锋眰锛岃幏鍙栨煡璇㈢粨鏋� + // const response = await fetch(url); + // const data = await response.json(); + // console.log(data); // 澶勭悊鏌ヨ缁撴灉锛屾瘮濡傚湪鎺у埗鍙拌緭鍑烘垨鏄剧ず鍦ㄩ〉闈笂 + // } catch (error) { + // console.error('Error fetching data:', error); + // } + // }, + // }, - try { - // 鍙戦�丄PI璇锋眰锛岃幏鍙栨煡璇㈢粨鏋� - const response = await fetch(url); - const data = await response.json(); - console.log(data); // 澶勭悊鏌ヨ缁撴灉锛屾瘮濡傚湪鎺у埗鍙拌緭鍑烘垨鏄剧ず鍦ㄩ〉闈笂 - } catch (error) { - console.error('Error fetching data:', error); - } - }, - }, - - reset() { + reset() { this.form = { id: null, workOrderNo: null, @@ -177,31 +175,12 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) - this.single = selection.length!==1 + this.single = selection.length !== 1 this.multiple = !selection.length }, getList() { this.loading = true; - // const startDate = new Date(this.queryParams.startDate); - // const endDate = new Date(this.queryParams.endDate); - // const resultList = []; - // // 鏋勫缓鏌ヨ鏉′欢锛屼娇鐢≒aramCollection琛ㄧ殑createtime浣滀负鍒ゆ柇鏉′欢 - // const query = { - // createTime: date // 浣跨敤褰撳墠鏃ユ湡浣滀负鏌ヨ鏉′欢 - // }; - // for (let date = startDate; date <= endDate; date.setDate(date.getDate() + 1)) { - // // 鏍规嵁褰撳墠鏃ユ湡鎵ц鏌ヨ鎿嶄綔锛屽苟灏嗙粨鏋滄坊鍔犲埌缁撴灉鏁扮粍涓� - // listParamCollection(query).then(response => { - // resultList.push(...response.rows); - // // 鍒ゆ柇鏄惁鏄渶鍚庝竴涓棩鏈燂紝濡傛灉鏄紝鍒欐洿鏂伴〉闈㈡暟鎹� - // if (date.getTime() === endDate.getTime()) { - // this.tightenReportList = resultList; - // this.total = resultList.length; - // this.loading = false; - // } - // }); - // } listParamCollection(this.queryParams).then(response => { this.tightenReportList = response.rows; this.total = response.total; @@ -209,8 +188,9 @@ }); }, - + }, } + </script> <style scoped> -- Gitblit v1.9.3