| | |
| | | }) |
| | | } |
| | | |
| | | export function DeleteMesOrderStepReport(data) { |
| | | return request({ |
| | | url: 'ReportManager/DeleteMesOrderStepReport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 入库记录导出 |
| | | export function StorageRecordExcelSearch(data) { |
| | | return request({ |
| | |
| | | // Vue.prototype.$ButtonData = JSON.parse(localStorage.getItem('ButtonData')) |
| | | }, |
| | | mounted() { |
| | | this.getHubConnectionBuilder() |
| | | // this.getHubConnectionBuilder() |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | |
| | | // 建立hub连接 |
| | | async getHubConnectionBuilder() { |
| | | const url = 'http://121.196.36.24:8048/chatHub' |
| | | |
| | | // 本地开发 |
| | | // if (process.env.NODE_ENV === 'development') { |
| | | // url = 'http://121.196.36.24:8048/chatHub' |
| | | // } else { // 生产环境(关键!!!用相对路径,避免跨域/协议错误) |
| | | // url = '/chatHub' |
| | | // } |
| | | |
| | | this.signalr = new signalR.HubConnectionBuilder().withUrl(url, { |
| | | // skipNegotiation: true, |
| | | // transport: signalR.HttpTransportType.WebSockets |
| | | withCredentials: false, // 跨域需要 |
| | | skipNegotiation: true, |
| | | transport: signalR.HttpTransportType.WebSockets |
| | | }).configureLogging(signalR.LogLevel.Information).build() |
| | | |
| | | await this.signalr.start().then(() => { |
| | | if (window.Notification) { |
| | | if (Notification.permission === 'granted') { |
| | | console.log('允许通知') |
| | | } else if (Notification.permission !== 'denied') { |
| | | console.log('需要通知权限') |
| | | Notification.requestPermission((permission) => { |
| | | console.log('权限通知', permission) |
| | | }) |
| | | } else if (Notification.permission === 'denied') { |
| | | // console.log('拒绝通知') |
| | | } |
| | | } else { |
| | | console.error('浏览器不支持Notification') |
| | | } |
| | | // console.log('连接成功') |
| | | // if (window.Notification) { |
| | | // if (Notification.permission === 'granted') { |
| | | // console.log('允许通知') |
| | | // } else if (Notification.permission !== 'denied') { |
| | | // console.log('需要通知权限') |
| | | // Notification.requestPermission((permission) => { |
| | | // console.log('权限通知', permission) |
| | | // }) |
| | | // } else if (Notification.permission === 'denied') { |
| | | // console.log('拒绝通知') |
| | | // } |
| | | // } else { |
| | | // console.error('浏览器不支持Notification') |
| | | // } |
| | | console.log('连接成功') |
| | | }) |
| | | |
| | | this.signalr.off('SendCustomUserMessage') |
| | |
| | | this.$notify({ offset: 80, type: 'warning', title: '消息提醒', message: res }) |
| | | this.$store.state.settings.isDot = true |
| | | }) |
| | | await this.signalr.invoke('AddUser', localStorage.getItem('account')) |
| | | await this.signalr.invoke('AddUser', localStorage.getItem('usercode')) |
| | | }, |
| | | |
| | | systemSetting() { |
| | |
| | | sortable="custom" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | width="80" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="删除记录" placement="top"> |
| | | <i |
| | | class="el-icon-delete" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="del(row)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { handleDatetime, validateCode } from '@/utils/global' |
| | | import { |
| | | DeleteMesOrderStepReport, |
| | | GroupSalaryReportSearchUser, MesOrderStepReportExcelSearch, MesOrderStepReportSearch |
| | | } from '@/api/ReportManager' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | // this.$confirm('是否确认删除?', '提示', { |
| | | // confirmButtonText: '确定', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning' |
| | | // }).then(() => { |
| | | // DeleteOrganization({ orgid: row.code }).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success('删除成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | | // this.form.page-- |
| | | // } |
| | | // this.getMesOrderStepReportSearch() |
| | | // } |
| | | // }) |
| | | // }).catch(() => { |
| | | // this.$message.info('已取消删除') |
| | | // }) |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const data = { |
| | | 'id': row.id, |
| | | 'sbid': row.sbid, |
| | | 'wocode': row.wo_code, |
| | | 'stepcode': row.step_code, |
| | | 'stype': row.steptype, |
| | | 'goodqty': row.report_qty, |
| | | 'ngqty': row.ng_qty, |
| | | 'laborbadqty': row.laborbad_qty, |
| | | 'materielbadqty': row.materielbad_qty, |
| | | 'verify': row.verify |
| | | } |
| | | DeleteMesOrderStepReport(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | | this.form.page-- |
| | | } |
| | | this.getMesOrderStepReportSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消删除') |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |