Commit 2fb36252 authored by jingnan's avatar jingnan 👀

缺件信息维护组件修改

parent f2cbd534
<template>
<!-- <dee-dialog
v-if="visible"
title="缺件信息维护"
:dialog-visible.sync="visible"
width="40%"
> -->
<section class="chatBox-com">
<!-- <div class="header">
<h3>缺件信息维护</h3>
</div> -->
<div class="main">
<div class="talkshow">
<ul v-for="item in list" :key="item.id" class="atalk">
......@@ -22,7 +13,6 @@
<strong>{{ item.message }}</strong>
</span>
</li>
<!-- <strong v-if="item.id===1"> :{{ item.name }}</strong> -->
</ul>
</div>
</div>
......@@ -44,19 +34,22 @@
<button class="btnClose" @click="closeMsgBox">关闭</button>
</div>
</section>
<!-- </dee-dialog> -->
</template>
<script>
import $ from 'jquery'
// import { addInformation, getInformation } from '@/api/requestOutStorageMatch.js'
import { post } from '@/utils/http'
export default {
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
list: [],
wordone: '',
visible: false,
row: {}
wordone: ''
}
},
......@@ -69,51 +62,49 @@ export default {
})
}
},
created() {
mounted() {
this.infoInit()
},
methods: {
// 缺件信息查询
infoInit() {
this.loading = true
// const params = {
// 'indices': [
// 'WrMaterialLackLog'
// ],
// 'pageFrom': 1,
// 'pageSize': 99999999,
// 'searchItems': {
// 'items': [
// {
// 'fieldName': 'wrMaterialLackId',
// 'operator': 'EQ',
// 'value': this.row.id
// }
// ],
// 'operator': 'AND'
// },
// 'sortItem': [
// {
// 'fieldName': 'modifyTime',
// 'sortOrder': 'asc'
// }
// ]
// }
// getInformation(params).then(res => {
// this.list = []
// res.items.content.map(item => {
// if (!item.message) return
// this.list.push({
// name: item.creator.userName,
// message: item.message,
// time: item.createTime
// })
// })
// }).catch(err => {
// console.log(err)
// }).finally(() => {
// this.loading = false
// })
const params = {
'indices': [],
'pageFrom': 1,
'pageSize': 99999999,
'searchItems': {
'items': [
{
'fieldName': 'wrMaterialLackId',
'operator': 'EQ',
'value': this.basicData.id
}
],
'operator': 'AND'
},
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'asc'
}
]
}
post('/WrMaterialLackLog/search', params).then(res => {
this.list = []
res.items.content.map(item => {
if (!item.message) return
this.list.push({
name: item.creator.userName,
message: item.message,
time: item.createTime
})
})
}).catch(err => {
console.log(err)
}).finally(() => {
this.loading = false
})
},
// 缺件信息添加
sendmsg() {
......@@ -122,48 +113,31 @@ export default {
return this.$utils.showMessageWarning('输入内容过长,请重新输入')
}
this.loading = true
this.list.push({
name: 11,
message: '假数据,接口待定',
time: 11
})
// const params = {
// 'operator': 'ADD',
// 'subTypeName': 'WrMaterialLackLog',
// 'id': '',
// 'dxClassname': 'com.tf.mes.vo.schedule.WrMaterialLackLogVo',
// 'wrMaterialLackId': this.row.id,
// 'wrMaterialLackIdType': this.row.subTypeName,
// 'message': this.wordone
const params = {
'operator': 'ADD',
'wrMaterialLack': this.basicData,
'message': this.wordone
// }
// addInformation(params).then(res => {
// this.$utils.showMessageSuccess('添加成功')
// this.infoInit()
// }).catch(err => {
// console.log(err)
// }).finally(() => {
// this.wordone = ''
// this.loading = false
// }
}
post('/WrMaterialLackLog/recursion', params).then(res => {
this.$utils.showMessageSuccess('添加成功')
this.infoInit()
}).catch(err => {
console.log(err)
}).finally(() => {
this.wordone = ''
this.loading = false
}
// )
)
} else {
this.$utils.showMessageWarning('请输入内容后添加')
}
},
// 打开弹出框
open(row = {}) {
this.visible = true
this.list = []
this.wordone = ''
this.row = row
this.infoInit()
},
// 关闭弹框
closeMsgBox() {
this.wordone = ''
this.visible = false
this.$emit('cancel')
}
}
......
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