Commit 2fb36252 authored by jingnan's avatar jingnan 👀

缺件信息维护组件修改

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