| | |
| | | handleSubmit() { |
| | | if(!this.multi){ |
| | | if(this.table.selectionRows && this.table.selectionRows.length>1){ |
| | | this.$message.warning("请选择一条记录") |
| | | // this.$message.warning("请选择一条记录") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return false |
| | | } |
| | | } |
| | | if(!this.table.selectionRows || this.table.selectionRows.length==0){ |
| | | this.$message.warning("请选择一条记录") |
| | | // this.$message.warning("请选择一条记录") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return false |
| | | } |
| | | this.$emit('ok', this.table.selectionRows); |
| | |
| | | this.allTreeKeys = res.result |
| | | this.loadDepart() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.allTreeKeys = res.result |
| | | this.loadDepart() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | handleChange(info) { |
| | | let file = info.file; |
| | | if (file.response.success) { |
| | | this.$message.success(file.response.message); |
| | | // this.$message.success(file.response.message); |
| | | this.$notification.success({ |
| | | message:'消息', |
| | | description:file.response.message |
| | | }); |
| | | this.$emit('ok'); |
| | | this.close() |
| | | } else { |
| | | this.$message.warn(file.response.message); |
| | | // this.$message.warn(file.response.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:file.response.message |
| | | }); |
| | | this.close() |
| | | } |
| | | |
| | |
| | | /* |
| | | * jQuery table2excel - v1.1.2 |
| | | * jQuery plugin to export an .xls file in browser from an HTML table |
| | | * https://github.com/rainabba/jquery-table2excel |
| | | * |
| | | * Made by rainabba |
| | | * Under MIT License |
| | | */ |
| | | |
| | | //table2excel.js |
| | | import jQuery from 'jquery' |
| | | (function ( $, window, document, undefined ) { |
| | |
| | | componentPrefix: 'vc', |
| | | }); |
| | | |
| | | //注入全局属性$message |
| | | import {message,notification } from 'ant-design-vue' |
| | | Vue.prototype.$message = message |
| | | Vue.prototype.$notification = notification |
| | | message.config({ |
| | | }) |
| | | notification.config({ |
| | | bottom:'20px', |
| | | right:'100px' |
| | | }) |
| | | |
| | | |
| | | // import 'echarts-liquidfill' |
| | | Vue.prototype.$echarts = echarts |
| | | Vue.prototype.$qs = qs |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | console.log("导出参数",param) |
| | | downFile(this.url.exportXlsUrl,param).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("文件下载失败") |
| | | // this.$message.warning("文件下载失败") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"文件下载失败" |
| | | }); |
| | | return |
| | | } |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择一条记录' |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | this.$message.warning("此车间下面无设备!!") |
| | | // this.$message.warning("此车间下面无设备!!") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"此车间下面无设备!!" |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | |
| | | batchFrozen: function (status) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return false; |
| | | } else { |
| | | let ids = ""; |
| | |
| | | onOk: function () { |
| | | frozenBatch({ids: ids, status: status}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改车间!') |
| | | // this.$message.warning('请点击选择要修改车间!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请点击选择要修改车间!' |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | // this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | that.loading = true; |
| | | saveDepartPermission(params).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | that.loadData(); |
| | | }else { |
| | | that.$message.error(res.message); |
| | | // that.$message.error(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | } |
| | | }) |
| | |
| | | } |
| | | postAction(this.url.datarule,params).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success(res.message) |
| | | // this.$message.success(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | }else{ |
| | | this.$message.error(res.message) |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | that.$emit('delectTree','') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | that.$emit('delectTree','') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData2(); |
| | | // that.onClearSelected(); |
| | | // that.$emit('delectTree','') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.selectedRowKeys = [] |
| | | }, |
| | | handleEdit: function (record) { |
| | | console.log(record) |
| | | if (record.id) { |
| | | this.$refs.modalForm.title = '编辑' |
| | | this.$refs.modalForm.disableSubmit = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("成功") |
| | | // that.$message.success("成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | this.treeDataSource = res.result |
| | | this.generateList(res.result) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | this.loading = false |
| | |
| | | }, |
| | | batchDel: function(entity) { |
| | | if (!this.url.deleteBatch) { |
| | | this.$message.error('请设置url.deleteBatch属性!') |
| | | // this.$message.error('请设置url.deleteBatch属性!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请设置url.deletBatch属性!" |
| | | }); |
| | | return |
| | | } |
| | | let ids = entity.id |
| | | if (!ids) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return |
| | | } else { |
| | | var that = this |
| | |
| | | that.loading = true |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.queryTreeData(); |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("编辑成功") |
| | | // that.$message.success("编辑成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"编辑成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | // return { label: item.id, value: item.equipmentTypeName + '' } |
| | | // }) |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | console.log(val) |
| | | if(val.equipmentid ){ |
| | | this.model.equipmentId = val.equipmentid |
| | | this.model.equipmentName = val.equipmentname, |
| | | this.model.equipmentModel = val.equipmentmodel, |
| | | this.model.equipmentIp = val.equipmentip, |
| | | this.model.dataPort = val.dataport, |
| | | this.model.equipmentName = val.equipmentname |
| | | this.model.equipmentModel = val.equipmentmodel |
| | | this.model.equipmentIp = val.equipmentip |
| | | this.model.dataPort = val.dataport |
| | | this.model.driveType = val.drivetype |
| | | this.model.controlSystem = val.controlsystem |
| | | this.model.saveTableName = val.savetablename |
| | |
| | | } |
| | | obj.then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | }, |
| | | } |
| | |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("修改成功") |
| | | // that.$message.success("修改成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('gzl') |
| | | if (index < 0) { |
| | | this.$message.warn('不能取消查询故障率') |
| | | // this.$message.warn('不能取消查询故障率') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不能取消查询故障率" |
| | | }); |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | handleSubmit() { |
| | | let that = this; |
| | | if(!that.departId){ |
| | | this.$message.warning('请点击选择一个部门!') |
| | | // this.$message.warning('请点击选择一个部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择一个部门" |
| | | }); |
| | | } |
| | | let checkedKeys = [...that.checkedKeys, ...that.halfCheckedKeys] |
| | | const permissionIds = checkedKeys.join(",") |
| | |
| | | that.loading = true; |
| | | saveDepartPermission(params).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | that.loadData(); |
| | | }else { |
| | | that.$message.error(res.message); |
| | | // that.$message.error(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | } |
| | | }) |
| | |
| | | that.confirmLoading = true; |
| | | httpAction(this.url.add,this.model,"post").then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTreeData(); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | _this.$set(this.queryParams, 'parentId', res.result[0].key) |
| | | _this.queryStatistical() |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | // console.log(res.result[0].entity.tierName) |
| | | _this.$set(this.queryParam, 'tierName', res.result[0].title) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("修改成功") |
| | | // that.$message.success("修改成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }) |
| | |
| | | let startOne = start.replace(/:/g,''); |
| | | let endOne = end.replace(/:/g,''); |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于开始时间" |
| | | }); |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | let startOne = start.replace(/:/g,''); |
| | | let endOne = end.replace(/:/g,''); |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于开始时间" |
| | | }); |
| | | |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | formData.isUse = formData.isUse == true || formData.isUse == undefined ? "1" : "2" |
| | | putAction(this.url.add, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | formData.isUse = formData.isUse == true || formData.isUse == undefined ? "1" : "2" |
| | | putAction(this.url.add, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.sectionPData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.AnalysisBarList = res.result.graphics |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | console.log(res.result.pieCharts) |
| | | console.log(this.AnalysisPie) |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.AnalysisGauge = res.result.meters |
| | | this.AnalysisPie.push(res.result.pieCharts) |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | {value: 0, name: '关机率'}] |
| | | }] |
| | | }; |
| | | console.log(this.RateList) |
| | | if(this.RateList != null){ |
| | | console.log(this.RateList) |
| | | this.closeRate =[] |
| | | this.openRate =[] |
| | | this.usedRate = [] |
| | |
| | | this.waitRate=this.RateList[0].waitRate |
| | | pieCompChartOption1.series[0].data = [{value:this.openRate, name:'开机率'},{value:this.closeRate, name:'关机率'}]; |
| | | pieCompChartOption2.series[0].data = [{value:(this.usedRate * 100).toFixed(2), name:'加工率'},{value:(this.waitRate * 100).toFixed(2), name:'待机率'},{value:(this.closeRate * 100).toFixed(2), name:'关机率'}]; |
| | | console.log(pieCompChartOption1.series[0].data) |
| | | pieCompChart1.setOption(pieCompChartOption1); |
| | | pieCompChart2.setOption(pieCompChartOption2); |
| | | }else{ |
| | |
| | | </div> |
| | | </div> |
| | | <p style="margin-top: 5px;"> |
| | | <!--<span ref="message">{{item.equipmentName}}</span>--> |
| | | <span ref="message">{{item.equipmentName}}({{item.equipmentId}})</span> |
| | | </p> |
| | | </div> |
| | |
| | | }, |
| | | openDetail(item) { |
| | | if(item.oporation == 0){ |
| | | this.$message.warn("设备处于关机状态!"); |
| | | // this.$message.warn("设备处于关机状态!"); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"设备处于关机状态!" |
| | | }); |
| | | return false; |
| | | } |
| | | console.log(item); |
| | |
| | | getAction(this.url.mdcEquipmentDetailedInfo, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | _this.resultData = res.result |
| | | console.log(_this.resultData) |
| | | _this.driverType = res.result.deviceType |
| | | _this.spindlebeilv = res.result.spindlebeilv |
| | | _this.feedbeilv = res.result.feedbeilv |
| | |
| | | }) |
| | | // _this.initDeviceType(_this.resultData.deviceType) |
| | | } else { |
| | | _this.$message.warn(res.message) |
| | | // _this.$message.warn(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | |
| | |
| | | this.treeDataSource = res.result |
| | | this.generateList(res.result) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | let ids = entity.id |
| | | if (!ids) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择一条记录' |
| | | }); |
| | | return |
| | | } else { |
| | | var that = this |
| | |
| | | that.loading = true |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.queryTreeData(); |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | |
| | | let formData = Object.assign(this.model, values) |
| | | postAction(this.url.settingCalendar, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | this.treeDataSource = res.result |
| | | this.generateList(res.result) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | lastpermissionIds:that.defaultCheckedKeys.join(","), |
| | | }; |
| | | that.loading = true; |
| | | console.log("请求参数:",params); |
| | | saveRolePermission(params).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | if (exit) { |
| | | that.close() |
| | | } |
| | | }else { |
| | | that.$message.error(res.message); |
| | | // that.$message.error(res.message); |
| | | that.$notification.error({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loading = false; |
| | | if (exit) { |
| | | that.close() |
| | |
| | | this.checkedKeys = [...res.result]; |
| | | this.defaultCheckedKeys = [...res.result]; |
| | | this.expandedKeysss = this.allTreeKeys; |
| | | console.log(this.defaultCheckedKeys) |
| | | }) |
| | | }) |
| | | } |
| | |
| | | // this.onClearSelected() |
| | | //分页、排序、筛选变化时触发 |
| | | //TODO 筛选 |
| | | console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | // console.log(data); //选中某天 |
| | | // }, |
| | | changeDate(data) { |
| | | console.log(data); //左右点击切换月份 |
| | | // console.log(data); //左右点击切换月份 |
| | | }, |
| | | clickToday(data) { |
| | | console.log(data); // 跳到了本月 |
| | | //console.log(data); // 跳到了本月 |
| | | }, |
| | | // markChange(){ |
| | | // |
| | |
| | | } |
| | | }, |
| | | clickDay(today){//选中日期 |
| | | // today = this.fun(today) |
| | | console.log("当前选中日期===>", today); |
| | | let existDate = this.selectDate; |
| | | let isExist = true; |
| | | for (var i = 0; i < existDate.length; i++) { |
| | | if (existDate[i].date === today) { |
| | | console.log("当前日期存已在===>",today); |
| | | this.selectDate.splice(i,1); |
| | | this.shiData.splice(i,1); |
| | | this.sendDte.splice(i,1) |
| | |
| | | } |
| | | } |
| | | if (isExist) {//当前日期存在移除 |
| | | console.log("不存在-添加===>"); |
| | | let tempDate = {date: today, className: "mark1"} |
| | | // let ddd = this.fun(today) |
| | | let ddd = today |
| | |
| | | this.shiData.push(ddd) |
| | | this.sendDte.push(ccc) |
| | | } |
| | | console.log("this.selectDate===>",JSON.stringify(this.selectDate)); |
| | | console.log(this.sendDte) |
| | | }, |
| | | onSelect(value) { |
| | | console.log(value); |
| | |
| | | let formData = Object.assign(this.model, values) |
| | | |
| | | formData.dateList = this.sendDte |
| | | console.log(formData) |
| | | postAction(this.url.settingCalendar, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') |
| | | this.queryChart() |
| | | }else{ |
| | | this.$message.warning("请选择时间") |
| | | // this.$message.warning("请选择时间") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择时间" |
| | | }); |
| | | } |
| | | |
| | | // this.queryList() |
| | |
| | | }, |
| | | openWorkChart() { |
| | | if(!this.equipment.equipmentId){ |
| | | this.$message.warning("请选择设备进行查询") |
| | | // this.$message.warning("请选择设备进行查询") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择设备进行查询" |
| | | }); |
| | | }else{ |
| | | this.$refs.workChartModel.add(this.equipment) |
| | | this.$refs.workChartModel.title = '工作曲线' |
| | |
| | | openHistoryChart() { |
| | | // console.log(this.equipment); |
| | | if(!this.equipment.equipmentId){ |
| | | this.$message.warning("请选择设备进行查询") |
| | | // this.$message.warning("请选择设备进行查询") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择设备进行查询" |
| | | }); |
| | | // console.log(1111) |
| | | } else{ |
| | | this.$refs.workHistoryModel.add(this.equipment) |
| | |
| | | }, |
| | | dataAfter() { |
| | | if((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')){ |
| | | this.$message.warning("请选择今天以及今天之前的日期!!") |
| | | // this.$message.warning("请选择今天以及今天之前的日期!!") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择今天以及今天之前的日期!!' |
| | | }); |
| | | }else{ |
| | | this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD') |
| | | this.searchQuery() |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | return current && current > moment().endOf("day"); |
| | | }, |
| | | initPlainOptions(param) { |
| | | console.log(param) |
| | | let that = this |
| | | let equipment = param.equipmentId |
| | | console.log(equipment) |
| | | getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => { |
| | | if (res.success) { |
| | | |
| | |
| | | if (e.length <= 3) { |
| | | this.option = e |
| | | } else { |
| | | this.$message.warn('最多只能选择3个') |
| | | // this.$message.warn('最多只能选择3个') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'最多只能选择三个' |
| | | }); |
| | | return false |
| | | } |
| | | }, |
| | |
| | | } |
| | | getAction(this.url.workChart, param).then((res) => { |
| | | if(JSON.stringify(res.result) == '[]' || res.result == null){ |
| | | this.$message.warning('无数据!') |
| | | // this.$message.warning('无数据!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'无数据!' |
| | | }); |
| | | this.spinning = false; |
| | | _this.workChart.setOption(option,true) |
| | | }else{ |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | that.$emit('delectTree','') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | // console.log(this.node); |
| | | if(this.node.entity.equipmentId != null){ |
| | | // alert('不可在此层级下增加设备') |
| | | this.$message.warning('不可在此层级下增加设备!') |
| | | // this.$message.warning('不可在此层级下增加设备!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不可在此层级下增加设备!" |
| | | }); |
| | | }else{ |
| | | this.$refs.modalForm.add(this.node) |
| | | this.$refs.modalForm.title = '新增设备' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | } |
| | | } else { |
| | | this.$message.warning('请选择所属层级!') |
| | | // this.$message.warning('请选择所属层级!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请选择所属层级!' |
| | | }); |
| | | } |
| | | }, |
| | | handleAddTier() { |
| | | if (this.node && JSON.stringify(this.node) != '{}') { |
| | | if(this.node.entity.equipmentId != null){ |
| | | // alert('不可在此层级下增加层级') |
| | | this.$message.warning('不可在此层级下增加层级!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不可在此层级下增加设备!" |
| | | }); |
| | | }else{ |
| | | this.$refs.tierModalForm.add(this.node) |
| | | this.$refs.tierModalForm.title = '新增层级' |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("成功") |
| | | // that.$message.success("成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list属性!") |
| | | // this.$message.error("请设置url.list属性!") |
| | | this.$notification.error({ |
| | | message:'消息', |
| | | description:"请设置url.list属性!" |
| | | }); |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请配置设备!" |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss"); |
| | | let dataStart = stertDate.replace(/:/g,''); |
| | | if(startOne < dataStart){ |
| | | that.$message.warning("开始时间不能小于当前时间") |
| | | // that.$message.warning("开始时间不能小于当前时间") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"开始时间不能小于当前时间" |
| | | }); |
| | | that.confirmLoading = false |
| | | }else{ |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于开始时间" |
| | | }); |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | let stertDate = moment(data).format("YYYY-MM-DD HH:mm:ss"); |
| | | let dataStart = stertDate.replace(/:/g,''); |
| | | if(startOne < dataStart) { |
| | | that.$message.warning("开始时间不能小于当前时间") |
| | | // that.$message.warning("开始时间不能小于当前时间") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"开始时间不能小于当前时间" |
| | | }); |
| | | that.confirmLoading = false |
| | | }else{ |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于开始时间" |
| | | }); |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | let dataStart = stertDate.replace(/:/g,''); |
| | | if(this.editStart != startOne){ |
| | | if(startOne < dataStart) { |
| | | that.$message.warning("开始时间不能小于当前时间") |
| | | // that.$message.warning("开始时间不能小于当前时间") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"开始时间不能小于当前时间" |
| | | }); |
| | | that.confirmLoading = false |
| | | }else{ |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于当前时间" |
| | | }); |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("修改成功") |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | }else{ |
| | | if(startOne>=endOne){ |
| | | that.$message.warning("结束时间不能小于开始时间"); |
| | | // that.$message.warning("结束时间不能小于开始时间"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"结束时间不能小于开始时间" |
| | | }); |
| | | // console.log(this.model) |
| | | // this.endTime = '' |
| | | that.confirmLoading = false |
| | |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success("修改成功") |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | let dictCode = 'mdc_equipmentType' |
| | | let items = [] |
| | | items = getDictItemsFromCache(dictCode) |
| | | console.log(items) |
| | | if (deviceList && items.length > 0) { |
| | | for (let a = 0; a < deviceList.length; a++) { |
| | | if (items && items.length > 0) { |
| | |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | | if (index < 0) { |
| | | this.$message.warn('不能取消查询利用率') |
| | | // this.$message.warn('不能取消查询利用率') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不能取消查询利用率" |
| | | }) |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | | if (index < 0) { |
| | | this.$message.warn('不能取消查询利用率') |
| | | // this.$message.warn('不能取消查询开动率') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不能取消查询开动率" |
| | | }) |
| | | |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | |
| | | efficiencyOptionsOnChange(checkedList) { |
| | | let index = checkedList.indexOf('lyl') |
| | | if (index < 0) { |
| | | this.$message.warn('不能取消查询利用率') |
| | | // this.$message.warn('不能取消查询利用率') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"不能取消查询班次利用率" |
| | | }) |
| | | return false |
| | | } |
| | | this.checkedList = checkedList |
| | |
| | | }, |
| | | handleChange(value) { |
| | | this.queryParam.timeType = value |
| | | console.log(this.queryParam.timeType) |
| | | // console.log(this.queryParam.timeType) |
| | | }, |
| | | tabChange(val) { |
| | | this.activeKey = val |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | handleChange(value) { |
| | | this.queryParam.timeType = value |
| | | console.log(this.queryParam.timeType) |
| | | // console.log(this.queryParam.timeType) |
| | | }, |
| | | tabChange(val) { |
| | | this.activeKey = val |
| | |
| | | for(var i = 0;i<res.result.dayRateDto.length;i++){ |
| | | this.useingRates.push(res.result.dayRateDto[i].utilizationRate) |
| | | } |
| | | console.log(this,spaceTime) |
| | | // console.log(this,spaceTime) |
| | | this.drawTu() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | this.drawTu() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.queryParams = {} |
| | | // this.queryList() |
| | | this.equipment = {} |
| | | _this.$message.warning('请联系管理员,开放设备权限!') |
| | | // _this.$message.warning('请联系管理员,开放设备权限!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | let stat = formData.processQuantity |
| | | let end = formData.unqualifiedQuantity |
| | | if(end>stat){ |
| | | that.$message.warning("不合格数量必须小于等于加工数量"); |
| | | // that.$message.warning("不合格数量必须小于等于加工数量"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"不合格数量必须小于等于加工数量" |
| | | }); |
| | | that.confirmLoading = false |
| | | }else{ |
| | | let obj |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | console.log("导出参数",param) |
| | | // console.log("导出参数",param) |
| | | downFile(this.url.exportXlsUrl,param).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("文件下载失败") |
| | |
| | | let stat = formData.processQuantity |
| | | let end = formData.unqualifiedQuantity |
| | | if(end>stat){ |
| | | that.$message.warning("不合格数量必须小于等于加工数量"); |
| | | // that.$message.warning("不合格数量必须小于等于加工数量"); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"不合格数量必须小于等于加工数量" |
| | | }); |
| | | that.confirmLoading = false |
| | | }else{ |
| | | let obj |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | |
| | | param.equipmentId = this.queryParams.equipmentId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | console.log("导出参数",param) |
| | | // console.log("导出参数",param) |
| | | downFile(this.url.exportXlsUrl,param).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("文件下载失败") |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("修改成功") |
| | | |
| | | // that.$message.success("修改成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("修改成功") |
| | | // that.$message.success("修改成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | if (res.success) { |
| | | this.sectionData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | id: this.model.id |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("保存成功") |
| | | // that.$message.success("保存成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | var that = this; |
| | | deleteAction(that.url.deleteBatch, {id: record}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | let _this = this |
| | | putAction(this.url.changeStatus, { id: id, status: status }).then((res) => { |
| | | if (res.success) { |
| | | _this.$message.success('操作成功!') |
| | | // _this.$message.success('操作成功!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:"操作成功" |
| | | }); |
| | | _this.loadData() |
| | | } else { |
| | | that.$message.warning('操作失败!') |
| | | // _this.$message.warning('操作失败!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:"操作失败" |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | const that = this |
| | | // 触发表单验证 |
| | | this.form.validateFields((err, values) => { |
| | | console.log(values); |
| | | if (!err) { |
| | | // debugger |
| | | that.confirmLoading = true |
| | |
| | | let startTimeOne = startTime.replace(/:/g,''); |
| | | let endTimeOne = endTime.replace(/:/g,''); |
| | | if(startTimeOne>endTimeOne){ |
| | | that.$message.warning("非跨天班次结束时间不能小于等于开始时间!") |
| | | that.$message.success("保存失败") |
| | | // that.$message.warning("非跨天班次结束时间不能小于等于开始时间!") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"非跨天班次结束时间不能小于等于开始时间!" |
| | | }); |
| | | // that.$message.success("保存失败") |
| | | that.$notification.error({ |
| | | message:'消息', |
| | | description:"保存失败!" |
| | | }); |
| | | that.close() |
| | | }else{ |
| | | formData.shiftSubStatus = 1 |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("保存成功") |
| | | // that.$message.success("保存成功") |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("保存成功") |
| | | // that.$message.success |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | handleDefault:function(record){ |
| | | postAction(this.url.changeDefaultShift,qs.stringify({id:record.id})).then((res) =>{ |
| | | if(res.success){ |
| | | this.$message.success(res.message); |
| | | // this.$message.success(res.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | this.loadData() |
| | | }else{ |
| | | this.$message.success(res.message); |
| | | // this.$message.success(res.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | var that = this; |
| | | deleteAction(that.url.deleteBatch, {id: record}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | |
| | | this.onClearSelected1() |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.dataSource = res.result; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if(res.success){ |
| | | this.loadData2() |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | } |
| | | let ids = entity.id |
| | | if (!ids) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return |
| | | } else { |
| | | var that = this |
| | |
| | | this.$refs.nodeModal.add(this.currFlowId, '') |
| | | }, |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改部门!') |
| | | // this.$message.warning('请点击选择要修改部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择要修改部门" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | // this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择要修改部门" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } else if (num == 2) { |
| | | let key = this.currSelected.key |
| | | if (!key) { |
| | | this.$message.warning('请先点击选中上级部门!') |
| | | // this.$message.warning('请先点击选中上级部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请先点击选中上级部门!" |
| | | }); |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | |
| | | if (resp.success) { |
| | | //删除成功后,去除已选中中的数据 |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | that.$message.success('删除成功!') |
| | | // that.$message.success('删除成功!') |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"删除成功" |
| | | }); |
| | | that.loadTree() |
| | | //删除后同步清空右侧基本信息内容 |
| | | let orgCode=that.model.orgCode; |
| | |
| | | that.onClearSelected() |
| | | } |
| | | } else { |
| | | that.$message.warning('删除失败!') |
| | | // that.$message.warning('删除失败!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"删除失败" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------ |
| | | |
| | | |
| | | }, |
| | | created() { |
| | | this.currFlowId = this.$route.params.id |
| | |
| | | var that = this; |
| | | deleteAction(that.url.delete, {id: id}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | batchDel: function () { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | that.departTree = [] |
| | | //所有的树节点key信息 |
| | | that.allIds = [] |
| | | |
| | | |
| | | that.iExpandedKeys = [] |
| | | |
| | | |
| | | that.loading = false |
| | | queryDepartTreeSync().then((res) => { |
| | | if (res.success) { |
| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改车间!') |
| | | // this.$message.warning('请点击选择要修改车间!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择要修改车间!" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | // this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | console.log(this.currSelected) |
| | | let key = this.currSelected.key |
| | | if (!key) { |
| | | this.$message.warning('请先点击选中上级车间!') |
| | | // this.$message.warning('请先点击选中上级车间!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请先点击选中上级车间!" |
| | | }); |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | |
| | | if (resp.success) { |
| | | //删除成功后,去除已选中中的数据 |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | that.$message.success('删除成功!') |
| | | // that.$message.success('删除成功!') |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"删除成功" |
| | | }); |
| | | that.loadTree() |
| | | //删除后同步清空右侧基本信息内容 |
| | | // let orgCode=that.model.orgCode; |
| | |
| | | that.onClearSelected() |
| | | // } |
| | | } else { |
| | | that.$message.warning('删除失败!') |
| | | // that.$message.warning('删除失败!') |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:"删除失败" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys2.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return |
| | | } else { |
| | | var ids = '' |
| | |
| | | |
| | | batchFrozen: function (status) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return false; |
| | | } else { |
| | | let ids = ""; |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.$message.warning(res.message) |
| | | this.loadData(this.departId); |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(that.departId); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | }, |
| | | saveDataruleForRole(){ |
| | | if(!this.dataruleChecked || this.dataruleChecked.length==0){ |
| | | this.$message.warning("请注意,现未勾选任何数据权限!") |
| | | // this.$message.warning("请注意,现未勾选任何数据权限!") |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请注意,现未勾选任何数据权限!" |
| | | }); |
| | | } |
| | | let params = { |
| | | permissionId:this.functionId, |
| | |
| | | } |
| | | postAction(this.url.datarule,params).then(res=>{ |
| | | if(res.success){ |
| | | this.$message.success(res.message) |
| | | // this.$message.success(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | |
| | | }else{ |
| | | this.$message.error(res.message) |
| | | |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | that.confirmLoading = true; |
| | | httpAction(this.url.add,this.model,"post").then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTreeData(); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | } |
| | | |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.$message.warning(res.message) |
| | | this.loadData(this.productionId); |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | this.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(that.productionId); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | that.confirmLoading = true; |
| | | httpAction(this.url.add,this.model,"post").then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTreeData(); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | console.log('提交参数',this.model) |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | that.close(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |