Commit 532f47a0 authored by 徐来柯's avatar 徐来柯

fix bug

parent a2e3d96c
...@@ -305,6 +305,7 @@ export default { ...@@ -305,6 +305,7 @@ export default {
}, },
//添加 //添加
addFun(value){ addFun(value){
value.ID = ''
let data = value let data = value
if (value.LinVar.trim() === '') { if (value.LinVar.trim() === '') {
this.typeV = '5' this.typeV = '5'
...@@ -335,24 +336,40 @@ export default { ...@@ -335,24 +336,40 @@ export default {
var $this = this var $this = this
let data = value let data = value
console.log('aa',JSON.stringify(data)) console.log('aa',JSON.stringify(data))
this.$axios({ this.$axios({
method:"post",
url:`/api/Schedule/Schedule_CheckWindowSave`,//检验是否可添加
data:value
}).then((res)=>{
console.log('resadd==>',res)
if(res.data.code != 0){
this.typeV = '9'
this.deletetext = res.data.msg
this.pathE = data
this.deleteShow = true
}else{
this.$axios({
method:"post", method:"post",
url:`/api/Schedule/Schedule_WindowEditSave`, url:`/api/Schedule/Schedule_WindowEditSave`,
data:data data:data
}).then((res)=>{ }).then((res)=>{
if(res.data.code != 0){ if(res.data.code != 0){
this.typeV = '5' this.typeV = '5'
this.deleteShow = true this.deleteShow = true
}else{ }else{
this.typeV = '6' this.typeV = '6'
this.cancelFun() this.cancelFun()
} }
this.deletetext = res.data.msg this.deletetext = res.data.msg
var postData = this.resetData() var postData = this.resetData()
$this.query(postData) $this.query(postData)
}).catch(function(err){ }).catch(function(err){
console.log('err',err) console.log('err',err)
}) })
}
}).catch(function(err){
console.log('err',err)
})
}, },
resetData () { resetData () {
......
...@@ -34,7 +34,7 @@ module.exports = { ...@@ -34,7 +34,7 @@ module.exports = {
'/api': { '/api': {
//这里最好有一个 / //这里最好有一个 /
// 192.168.1.237 192.168.1.125 // 192.168.1.237 192.168.1.125
target: 'http://192.168.1.180:8802', // 后台接口域名 target: 'http://192.168.1.125:8803', // 后台接口域名
ws: true, //如果要代理 websockets,配置这个参数 ws: true, //如果要代理 websockets,配置这个参数
secure: false, // 如果是https接口,需要配置这个参数 secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, //是否跨域 changeOrigin: true, //是否跨域
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment