From 4a8efc53405efe0d20312694d39fbd8184badb39 Mon Sep 17 00:00:00 2001
From: yuyu <1981343953@qq.com>
Date: 星期二, 15 八月 2023 17:14:23 +0800
Subject: [PATCH] 8.15提交
---
src/views/rawMaterials/reportForInspection/index.vue | 63 +++++++++++++++++--------------
1 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/src/views/rawMaterials/reportForInspection/index.vue b/src/views/rawMaterials/reportForInspection/index.vue
index 720e8d5..e1663e3 100644
--- a/src/views/rawMaterials/reportForInspection/index.vue
+++ b/src/views/rawMaterials/reportForInspection/index.vue
@@ -63,7 +63,13 @@
prop="type"
label="妫�楠岀被鍨�"
min-width="200"
- />
+ >
+ <template slot-scope="scope">
+ <span v-if="scope.row.type===0">鍘熸潗鏂欐楠�</span>
+ <span v-else-if="scope.row.type===1">鍗婃垚鍝佹楠�</span>
+ <span v-else-if="scope.row.type===2">鎴愬搧妫�楠�</span>
+ </template>
+ </el-table-column>
<el-table-column
prop="createTime"
label="鍒涘缓鏃堕棿"
@@ -75,7 +81,7 @@
min-width="200"
/>
<el-table-column
- prop="registrant"
+ prop="inspectUserId"
label="妫�楠屼汉"
min-width="200"
/>
@@ -131,7 +137,7 @@
width="40%"
>
<div class="check-box">
- <el-radio-group v-model="type">
+ <el-radio-group v-model="addInspectionType">
<el-radio :label="0" border>鍘熸潗鏂欐楠�</el-radio>
<el-radio :label="1" border>鍗婃垚鍝佹楠�</el-radio>
<el-radio :label="2" border>鎴愬搧妫�楠�</el-radio>
@@ -152,7 +158,7 @@
</template>
<script>
-import { getInspectionList } from '@/api/rawMaterials/reportForInspection'
+import { getInspectionList, addInspection } from '@/api/rawMaterials/reportForInspection'
export default {
data() {
return {
@@ -179,7 +185,7 @@
pageSize: 10, // 姣忛〉鐨勬暟鎹潯鏁�
radioValue: '鍏ㄩ儴',
checkTypeVisible: false,
- type: 0
+ addInspectionType: 0
}
},
watch: {
@@ -192,26 +198,6 @@
deep: true
}
},
- // beforeRouteEnter(to, from, next) {
- // console.log(to, from)
- // next()
- // // 鍦ㄦ覆鏌撹缁勪欢鐨勫搴旇矾鐢辫 confirm 鍓嶈皟鐢�
- // // 涓嶏紒鑳斤紒鑾峰彇缁勪欢瀹炰緥 `this`
- // // 鍥犱负褰撻挬瀛愭墽琛屽墠锛岀粍浠跺疄渚嬭繕娌¤鍒涘缓
- // },
- // beforeRouteUpdate(to, from, next) {
- // console.log(to, from)
- // if (to.name === 'ForInspectionDetail') this.showDetail = true
- // this.$nextTick(() => {
- // console.log(1)
- // this.showDetail = true
- // })
- // next()
- // // 鍦ㄥ綋鍓嶈矾鐢辨敼鍙橈紝浣嗘槸璇ョ粍浠惰澶嶇敤鏃惰皟鐢�
- // // 涓句緥鏉ヨ锛屽浜庝竴涓甫鏈夊姩鎬佸弬鏁扮殑璺緞 /foo/:id锛屽湪 /foo/1 鍜� /foo/2 涔嬮棿璺宠浆鐨勬椂鍊欙紝
- // // 鐢变簬浼氭覆鏌撳悓鏍风殑 Foo 缁勪欢锛屽洜姝ょ粍浠跺疄渚嬩細琚鐢ㄣ�傝�岃繖涓挬瀛愬氨浼氬湪杩欎釜鎯呭喌涓嬭璋冪敤銆�
- // // 鍙互璁块棶缁勪欢瀹炰緥 `this`
- // },
created() {
this.getInspectionTableData()
},
@@ -223,12 +209,26 @@
const res = await getInspectionList({ pageSize: this.currentPage, countSize: this.pageSize })
// this.inspectionTable = data
console.log(res)
+ this.inspectionTable = res.data
},
- goToForInspectionDetail() {
- this.$router.push('/rawMaterials/reportForInspection/forInspectionDetail')
+ async goToForInspectionDetail() {
+ try {
+ //
+ const form = new FormData()
+ form.append('type', this.addInspectionType)
+ let { data: inspectionDetail } = await addInspection(form)
+ // console.log(res)
+ inspectionDetail = JSON.stringify(inspectionDetail)
+ this.$message.success('娣诲姞鎴愬姛')
+ this.$router.push({ path: '/rawMaterials/reportForInspection/forInspectionDetail', query: { inspectionDetail }})
+ } catch (error) {
+ this.$message.error('娣诲姞澶辫触')
+ }
},
+ // 鏌ョ湅瀵瑰簲鐢宠鍗曡鎯�
handleClick(row) {
- console.log(row)
+ const inspectionDetail = JSON.stringify(row)
+ this.$router.push({ path: '/rawMaterials/reportForInspection/forInspectionDetail', query: { inspectionDetail }})
},
// 姣忛〉鏉℃暟鏀瑰彉鏃惰Е鍙� 閫夋嫨涓�椤垫樉绀哄灏戣
handleSizeChange(val) {
@@ -281,6 +281,8 @@
height: 100%;
display: flex;
flex-direction: column;
+ min-height: calc(100vh - 88px);
+ padding: 15px;
}
.top-bar{
margin: -25px;
@@ -333,6 +335,11 @@
flex-direction: column;
.el-table {
flex: 1;
+ display: flex;
+ flex-direction: column;
+ ::v-deep .el-table__body-wrapper{
+ flex: 1;
+ }
}
>div:nth-child(2){
display: flex;
--
Gitblit v1.9.3