Commit faae078c by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	pages/meter-out/personal-task/MeterPersonItemTaskManage.vue
parents 279467e5 68e04dd4
......@@ -59,6 +59,7 @@
</Row>
</div>
</div>
<docimasy ref="docimasy"></docimasy>
<FileManage ref="FileManage"></FileManage>
<operationModal ref="operationModal"></operationModal>
<SelEquip ref="SelEquip" @on-result-change="_equipSelectBack"></SelEquip>
......@@ -76,8 +77,10 @@ import MeterSubcontractorEdit from './MeterGoOutTestEdit'
import CarManage from './CarManage'
import MeterPersonItemTaskManage from './MeterPersonItemTaskManage'
import InstruMentEdit from './InstrumentEdit'
import docimasy from './docimasy'
export default {
components: {
docimasy,
MeterSubcontractorEdit,
CarManage,
MeterPersonItemTaskManage,
......@@ -105,6 +108,11 @@ export default {
type: 'success',
id: '',
name: '提交'
},
{
type: 'success',
id: '',
name: '检定条件'
}
],
iconMsg: [
......@@ -174,6 +182,9 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '检定条件':
this._docimasy()
break
case '仪器领用':
this._receiveApparatus()
break
......@@ -192,6 +203,9 @@ export default {
}
})
},
_docimasy() {
this.$refs.docimasy._open(this.selectIds)
},
_carManage() {
this.$refs.carEdit._open()
},
......
......@@ -67,18 +67,21 @@
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></modal-footer>
</div>
</Modal>
<fillout ref="fillout" @on-result-change="_page"></fillout>
<decide ref="decide" @on-result-change="_page"></decide>
<fillout ref="fillout"></fillout>
<decide ref="decide"></decide>
<docimasy ref="docimasy"></docimasy>
</div>
</template>
<script>
import { meterItem } from '../../../api'
import fillout from './DetectionValue'
import decide from './Judge'
import docimasy from './docimasy'
export default {
components: {
fillout,
decide
decide,
docimasy
// FoodSampleGovernDetail,
// CopyModal,
// FoodSampleGovernLYEdits
......@@ -117,6 +120,11 @@ export default {
type: 'success',
id: '',
name: '判定'
},
{
type: 'success',
id: '',
name: '检定条件'
}
],
options: [
......@@ -196,6 +204,9 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (msg) {
case '检定条件':
this._docimasy()
break
case '判定':
this._judge()
break
......@@ -221,6 +232,9 @@ export default {
}
})
},
_docimasy() {
this.$refs.docimasy._open(this.selectIds)
},
_detectionValue() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
......
<template>
<div>
<Modal v-model="showBackModal" :mask-closable="false" class="zIndex-1100">
<p slot="header">{{modalTitle}}</p>
<div>
<Form ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="90">
<Form-item label="温度:" prop="temperature">
<Input v-model="formObj.temperature" placeholder="请输入温度"></Input>
</Form-item>
<Form-item label="湿度:" prop="humidity">
<Input v-model="formObj.humidity" placeholder="请输入湿度"></Input>
</Form-item>
<Form-item label="其他:" prop="others">
<Input v-model="formObj.others" placeholder="其他"></Input>
</Form-item>
<Form-item label="地点:" prop="location">
<Input v-model="formObj.location" placeholder="地点"></Input>
</Form-item>
</Form>
</div>
<div slot="footer">
<ModalFooter ref="footerModal" @on-result-change="_footerResult" :footer="footerList"></ModalFooter>
</div>
</Modal>
</div>
</template>
<script>
/**
* 判定
*/
import ModalFooter from '../../../components/base/modalFooter'
export default {
components: {
ModalFooter
},
data() {
return {
ids: [], // 合同ids
modalTitle: '检定条件',
showBackModal: false,
formObj: {
temperature: '',
humidity: '',
others: '',
location: ''
},
path: '',
ruleValidate: {},
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
]
}
},
methods: {
_open(ids) {
this.ids = ids // 合同id
this.showBackModal = true
this.formObj.type = 1
this.formObj = {}
this.$refs.footerModal._hideLoading()
},
_cancel() {
this.showBackModal = false
},
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '保存':
this._ok()
break
}
this.$refs.footerModal._hideLoading()
},
_ok() {
this.$refs.formObj.validate(valid => {
if (valid) {
const data = {}
data.ids = this.ids.join(',')
this.$extend(data, this.formObj)
console.log('要传的数据', data)
this.showBackModal = false
// this.$store.dispatch('FoodItem/judge', data).then(() => {
// if (this.$store.state.FoodItem.success) {
// this.$Message.success('判定成功')
// this.showBackModal = false
// this.$emit('on-result-change')
// }
// })
} else {
this.$Message.error('表单验证失败!')
}
})
}
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment