|
|
@@ -6,15 +6,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <u-form labelPosition="left" :model="formData" labelWidth="140" labelAlign="left" class="baseForm">
|
|
|
- <u-form-item label="质检类型:" class="required-form" prop="assetType">
|
|
|
- <zxz-uni-data-select :localdata="typeList" v-model="formData.parentId" dataValue='id' format='{name}'
|
|
|
- dataKey="name" filterable></zxz-uni-data-select>
|
|
|
-
|
|
|
- <view class="btn_box rx-cc" @click="add">新增质检</view>
|
|
|
- </u-form-item>
|
|
|
- </u-form>
|
|
|
-
|
|
|
|
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
|
@@ -35,15 +26,12 @@
|
|
|
|
|
|
|
|
|
<view class="ww20 rx-ac">
|
|
|
- <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
|
|
|
- color="#fa3534"></uni-icons>
|
|
|
-
|
|
|
- <uni-icons custom-prefix="iconfont" type="icon-eye" size="20"
|
|
|
- color="#157A2C"></uni-icons>
|
|
|
+ <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"
|
|
|
+ @click="handleDel(idx)"></uni-icons>
|
|
|
+ <uni-icons type="eye-filled" size="20" @click="handleView(it)"></uni-icons>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
-
|
|
|
</view>
|
|
|
</u-list>
|
|
|
|
|
|
@@ -57,14 +45,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<ba-tree-picker ref="treePicker" :selectedData='selectedData' key="verify" :multiple="false"
|
|
|
@select-change="confirm" title="选择分类" :localdata="classificationList" valueKey="id" textKey="name"
|
|
|
childrenKey="children" multiple :selectParent='false' />
|
|
|
@@ -74,8 +54,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getTwoTreeByPid,
|
|
|
- treeByPid
|
|
|
+ getLastTreeByPid,
|
|
|
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
|
@@ -83,64 +62,52 @@
|
|
|
|
|
|
components: {
|
|
|
baTreePicker,
|
|
|
-
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
|
|
|
|
|
|
- typeList: [],
|
|
|
- formData: {
|
|
|
- parentId: null
|
|
|
- },
|
|
|
+
|
|
|
+
|
|
|
classificationList: [],
|
|
|
- selectedData: [
|
|
|
- '1772569297810362370', '1772569381088268289', '1773270364621639681'
|
|
|
- ],
|
|
|
+ selectedData: [],
|
|
|
|
|
|
List: []
|
|
|
}
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- this.getTwoTree()
|
|
|
+ this.getLastTree()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- getTwoTree() {
|
|
|
- getTwoTreeByPid(12).then(res => {
|
|
|
- this.typeList = res
|
|
|
+
|
|
|
+ getLastTree() {
|
|
|
+ getLastTreeByPid(this.$route.query.inspectionId).then(res => {
|
|
|
+ this.List = res
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- add() {
|
|
|
- if (!this.formData.parentId) {
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '请先选择质检类型'
|
|
|
- })
|
|
|
- return false
|
|
|
- } else {
|
|
|
- let params = {
|
|
|
- 'ids': [this.formData.parentId]
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- treeByPid(params).then(res => {
|
|
|
- this.classificationList = res[0].children
|
|
|
- this.$refs.treePicker._show()
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
|
|
|
- confirm(id, name, list) {
|
|
|
|
|
|
+ confirm(id, name, list) {
|
|
|
this.List = list
|
|
|
+ this.selectedData = []
|
|
|
+ this.selectedData = this.List.map(m => {
|
|
|
+ return m.id
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ handleDel(idx) {
|
|
|
+ this.List.splice(idx, 1)
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
+ handleView(it) {},
|
|
|
+
|
|
|
scrolltolower() {},
|
|
|
}
|
|
|
|
|
|
@@ -199,6 +166,7 @@
|
|
|
|
|
|
.content_table2 {
|
|
|
width: 100%;
|
|
|
+ margin-top: 18rpx;
|
|
|
|
|
|
.row {
|
|
|
width: 100%;
|
|
|
@@ -284,6 +252,6 @@
|
|
|
}
|
|
|
|
|
|
.z_list {
|
|
|
- max-height: 400rpx;
|
|
|
+ max-height: 800rpx;
|
|
|
}
|
|
|
</style>
|