Commit 552338de by cwq0219

修改

1 parent 83a1e2fb
......@@ -171,7 +171,6 @@ export const resources = {
},
'105': {
path: 'materialList',
icon: 'folder-o',
icon: 'tickets',
name: '物料列表',
meta: {
......@@ -361,7 +360,7 @@ export const resources = {
authId: '108',
parentId: '0'
},
component: _import('reportingLogs'),
component: _import('reportingLogs')
// auth: [{
// authId: '10801',
// parentId: '108',
......
......@@ -157,7 +157,7 @@ export default {
if(this.deviceNum === value && this.deviceName === this.editForm.deviceName) {
const res = await isExistApi({ deviceNum: value, deviceName: this.editForm.deviceName, stationCode: this.editForm.stationCode })
// console.log(res)
res ? callback(new Error(rule.message)) : callback()
res.deviceNum ? callback(new Error(rule.message)) : callback()
}
},
......
......@@ -282,7 +282,7 @@ export default {
params.method = 'fims.device.import'// params.method
// console.log(params)
params = sign(params, noSignAttr)
axios.post('http://192.168.3.191:8944/router', qs.stringify({
axios.post(process.env.VUE_APP_API, qs.stringify({
...params
}),
{
......
......@@ -3,7 +3,7 @@ import { constants } from 'fs';
<template>
<div>
<el-dialog
:title="!editForm.subsystemCode ? '添加子系统' : '编辑子系统'"
:title="title"
:visible.sync="isVisible"
:before-close="handleClose"
>
......@@ -77,6 +77,7 @@ export default {
data () {
return {
disabled: false,
title: '添加子系统',
rules: {
subsystemCode: [
{ required: true, message: '请输入子系统编号', trigger: 'blur' },
......@@ -118,6 +119,7 @@ export default {
watch: {
isVisible (val) {
this.disabled = !!this.editForm.subsystemCode
this.title = !this.editForm.subsystemCode ? '添加子系统' : '编辑子系统'
this.$refs.editRuleForm && this.$refs.editRuleForm.resetFields()
}
},
......@@ -126,7 +128,7 @@ export default {
async isCodeExist(rule, value, callback) {
if(this.editForm.trafficCode) {
const res = await isExistApi({ subsystemCode: value, trafficCode: this.editForm.trafficCode })
res ? callback(new Error(rule.message)) : callback()
res.subsystemCode ? callback(new Error(rule.message)) : callback()
}
},
......
......@@ -97,15 +97,15 @@ export default {
mounted () {},
methods: {
async isCodeExist(rule, value, callback) {
const res = await isExistApi({trafficCode: value})
res ? callback(new Error(rule.message)) : callback()
async isCodeExist (rule, value, callback) {
const res = await isExistApi({ trafficCode: value })
res.trafficCode ? callback(new Error(rule.message)) : callback()
},
handleClose () {
this.$emit('closeDialog')
},
handleConfirm () {
this.$refs.editRuleForm.validate((vaild) => {
if (vaild) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!