Commit bc1ebfda by lichengming

修改了数据录入设备选择

parent 0a314aee
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
// 'LmsEquipInfo/page', // 'LmsEquipInfo/page',
// this.$serializeFormSearch(this.formObj) // this.$serializeFormSearch(this.formObj)
// ) // )
const result = await equip.page() const result = await equip.page(this.$serializeFormSearch(this.formObj))
console.log('仪器结果', result) console.log('仪器结果', result)
if (result) { if (result) {
this.getPage = result this.getPage = result
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord> <SelectOriTempRecord ref="recordModal" @on-result-change="_page"></SelectOriTempRecord>
<OriginalRecordEdit ref="editModal"></OriginalRecordEdit> <OriginalRecordEdit ref="editModal"></OriginalRecordEdit>
<IndexManage ref="indexModal" @on-result-change="_page"></IndexManage> <IndexManage ref="indexModal" @on-result-change="_page"></IndexManage>
<SelEquip ref="selEquip" @on-result-change="_equipResult"></SelEquip>
</div> </div>
</template> </template>
<script> <script>
...@@ -60,12 +61,14 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson' ...@@ -60,12 +61,14 @@ import AssignPerson from '../../../../components/user-info-single/AssignPerson'
import SelectOriTempRecord from '../SelectOriTempRecord' import SelectOriTempRecord from '../SelectOriTempRecord'
import OriginalRecordEdit from '../OriginalRecordEdit' import OriginalRecordEdit from '../OriginalRecordEdit'
import IndexManage from '../IndexManage' import IndexManage from '../IndexManage'
import SelEquip from '../../../../components/select-equip/SelEquip'
export default { export default {
components: { components: {
AssignPerson, AssignPerson,
SelectOriTempRecord, SelectOriTempRecord,
OriginalRecordEdit, OriginalRecordEdit,
IndexManage IndexManage,
SelEquip
}, },
data() { data() {
return { return {
...@@ -105,6 +108,7 @@ export default { ...@@ -105,6 +108,7 @@ export default {
btn: [ btn: [
{ type: 'success', id: '', name: '填写原始记录' }, { type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '完成提交' }, { type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' },
{ type: '', id: 'food-task-assign-adjust-group', name: '调整分组' }, { type: '', id: 'food-task-assign-adjust-group', name: '调整分组' },
{ {
type: '', type: '',
...@@ -206,6 +210,24 @@ export default { ...@@ -206,6 +210,24 @@ export default {
this.userColumns = colList this.userColumns = colList
this.$refs.pageTable._loadColumn(colList) this.$refs.pageTable._loadColumn(colList)
}, },
_equipResult(res) {
console.log(res)
// let equipIds = []
// for (let i = 0; i < res.length; i++) {
// equipIds.push(res[i].id)
// }
// this.$layxLoading()
// this.$store.dispatch('FoodItem/selectEquip', {
// ids: this.selectIds.join(','),
// equipIds: equipIds.join(',')
// }).then(() => {
// if (this.$store.state.FoodItem.success) {
// this.$Message.success('操作成功!');
// this._updateRows('selected');
// }
// this.$layxLoading(false);
// });
},
// 从字典查预警期 // 从字典查预警期
_dicSearch() { _dicSearch() {
const data = ['食品检测预警天数', '食品默认计划完成时间'] const data = ['食品检测预警天数', '食品默认计划完成时间']
...@@ -333,6 +355,9 @@ export default { ...@@ -333,6 +355,9 @@ export default {
case '完成提交': case '完成提交':
this._submitItem(this.selectData) this._submitItem(this.selectData)
break break
case '设备':
this._selectEquipment()
break
case '按组分配': case '按组分配':
await this._reportDueDate() await this._reportDueDate()
await this._groupAssign() await this._groupAssign()
...@@ -358,6 +383,13 @@ export default { ...@@ -358,6 +383,13 @@ export default {
break break
} }
}, },
_selectEquipment() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this.$refs.selEquip._open('sample-input')
}
},
_submitItem(data) { _submitItem(data) {
console.log(data) console.log(data)
if (data[0].recorded !== '是') { if (data[0].recorded !== '是') {
......
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