zhangdi 11 months ago
commit ebde89d922
  1. 4
      src/views/businessManagement/ordinary.vue
  2. 2
      src/views/device/deviceSystem.vue
  3. 28
      src/views/labManagement/components/addDialog.vue
  4. 6
      src/views/labManagement/inspectionManagement.vue

@ -35,7 +35,7 @@
<el-button v-show="permission.ordinaryView" @click="handleView(row)">查看</el-button>
<el-button v-show="permission.ordinaryOrder && (row.status == 101 || row.status == 400 || row.status == 205)"
@click="takeOrders(row)">接单</el-button>
@click="takeOrders(row)">{{row.status == 400 ? '派单' : '接单'}}</el-button>
<el-button v-show="permission.ordinaryClose && row.status == 101" @click="handleClone(row)">关闭</el-button>
<el-button v-show="permission.ordinaryConfirm && row.status == 201" @click="reciveOrder(row)">确认</el-button>
@ -309,7 +309,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="productId" align="center" label="物料名称" width="140">
<el-table-column prop="productId" align="center" label="物料名称" >
<template slot-scope="scope">
<el-select @change="((val) => { changeProduct(val, scope.$index) })"
@blur="((val) => { changeProduct(val, scope.$index) })" v-loadmore="loadmoreProduct"

@ -208,7 +208,7 @@
</el-table-column>
<el-table-column label="巡检周期" prop="period">
<template slot-scope="scope">
<el-select v-model="scope.row.period" placeholder="巡检周期" :disabled="viewType == 'view'">
<el-select v-model="scope.row.period + ''" placeholder="巡检周期" :disabled="viewType == 'view'">
<el-option v-for="item in periodArr" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"></el-option>
</el-select>

@ -165,6 +165,7 @@ export default {
watch: {
detailForm(newVal, oldVal) {
if (JSON.stringify(newVal) != '{}') {
console.log('JSON.stringify(newVal)---------------------->',JSON.stringify(newVal))
this.deviceList = []
this.detailForm = newVal
this.addForm = {
@ -188,7 +189,7 @@ export default {
this.drawfiles = []
this.filesList = this.detailForm.attaches
this.imgList = this.detailForm.attaches
this.detailForm.draws.map(item => {
this.detailForm.draws && this.detailForm.draws.length != 0 && this.detailForm.draws.map(item => {
this.drawList.push({
name: item.name,
url: item.link
@ -241,9 +242,9 @@ export default {
this.floorArr = []
this.roomArr = []
this.tableData = this.getDeepCode(this.detailForm.details, [])
this.changeUnit(this.detailForm.deptId)
this.detailForm.deptId && this.changeUnit(this.detailForm.deptId)
this.detailForm.attaches.map(item => {
this.detailForm.attaches && this.detailForm.attaches.length != 0 && this.detailForm.attaches.map(item => {
this.imgList.push({
name: item.name,
url: item.link
@ -253,7 +254,7 @@ export default {
url: item.link
})
})
this.detailForm.draws.map(item => {
this.detailForm.draws && this.detailForm.draws.length != 0 && this.detailForm.draws.map(item => {
this.drawList.push({
name: item.name,
url: item.link
@ -273,9 +274,7 @@ export default {
},
methods: {
getDeepCode(data, arr) {
console.log('data', data)
if (data && data.length > 0) {
data.map(item => {
data && data.length != 0 && data.map(item => {
if (item.details.length != 0) {
this.getDeepCode(item.details, arr)
} else {
@ -283,8 +282,6 @@ export default {
}
})
return arr
}
},
handleSuccess(response, file, fileList) {
if (response.code == 200) {
@ -456,17 +453,14 @@ export default {
},
//
changeUnit(val) {
console.log('val===========>', val)
console.log('unitData===============>', this.unitData)
this.labId = val
if (this.title == '新建') {
this.addForm.unitName = this.unitData.length > 0 ? this.unitData.find(item => item.id == val).title : ''
this.addForm.unitName = this.unitData.find(item => item.id == val) ? this.unitData.find(item => item.id == val).title : ''
this.deviceList.map(item => {
item.disabled = false
})
}
getDeepData({ parentId: val }).then(res => {
console.log('res ------------------->', res)
this.floorArr = res.data.data
this.activeFloor = res.data.data.length > 0 ? res.data.data[0].id : ''
getDeepData({ parentId: this.activeFloor }).then(res => {
@ -476,13 +470,11 @@ export default {
if (JSON.stringify(this.detailForm) != '{}') {
console.log(this.activeFloor, this.activeRoom)
this.addForm.tableData = this.tableData.filter(item => item.floorId == this.activeFloor && item.deptId == this.activeRoom)
console.log('addForm==========>', this.addForm.tableData)
let arr1 = this.deviceList.filter(item1 =>
this.addForm.tableData.some(item2 =>
item1.id == item2.deviceId
)
);
console.log('arr1==============>', arr1)
this.deviceList.map(item1 => {
item1.disabled = false
arr1.map(item2 => {
@ -570,11 +562,9 @@ export default {
this.dealFloor(val.id)
},
clickRoom(val) {
this.activeRoom = val.id
console.log('val1------------->', val)
console.log('title------------->', this.title)
if (val) {
this.activeRoom = val.id
if (this.title == '新建') {
getDeviceLists({ limsId: this.labId, floorId: this.activeFloor, roomId: this.activeRoom }).then(res => {
this.deviceList = res.data.data
@ -630,8 +620,6 @@ export default {
this.getSpanArr(this.addForm.tableData)
})
}
}
},
}

@ -444,7 +444,6 @@ export default {
},
handleView(row) {
getPlanDetail({ id: row.id }).then(res => {
console.log('res==============>', res)
this.dialogTitle = '查看'
if (res.data.code == 200) {
this.detailForm = res.data.data
@ -477,10 +476,9 @@ export default {
getLeftLab() {
getLimsTree().then(res => {
console.log('res==============>', res)
this.treeData = res.data.data
this.unitData = res.data.data.filter(item => item.parentId == 0)
console.log('unitData============>', this.unitData)
// this.unitData = res.data.data.filter(item => item.parentId == 0)
this.unitData = res.data.data
})
},
nodeClick(data) {

Loading…
Cancel
Save