Commit 552338de by cwq0219

修改

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