// Message.error(res.data.msg); | // Message.error(res.data.msg); | ||||
} else { | } else { | ||||
store.dispatch('luru/set_state', res.data.status) | store.dispatch('luru/set_state', res.data.status) | ||||
console.log("长度:",store.state.luru.gongshi.length) | |||||
// 获取工时管理数据 | |||||
// 获取外判单的数据 | |||||
gongshimodel.getWaipanList({ time }).then((res) => { | |||||
if (res.data.code == 200) { | |||||
store.dispatch('luru/setWaipan',res.data.rows) | |||||
} | |||||
// 获取工时管理数据 | |||||
if (store.state.luru.lock_gongshi_getold&&store.state.luru.gongshi.length==0) { | if (store.state.luru.lock_gongshi_getold&&store.state.luru.gongshi.length==0) { | ||||
let param = { | let param = { | ||||
time: time, | time: time, | ||||
// Message.error(res.data.msg); | // Message.error(res.data.msg); | ||||
store.dispatch('luru/set_lock_gongshi_getold', false) | store.dispatch('luru/set_lock_gongshi_getold', false) | ||||
store.dispatch('luru/set_loading', false) | store.dispatch('luru/set_loading', false) | ||||
return; | |||||
} | } | ||||
if (res.data.rows) { | if (res.data.rows) { | ||||
store.dispatch('luru/set_lock_gongshi_getold', true) | store.dispatch('luru/set_lock_gongshi_getold', true) | ||||
store.dispatch('luru/set_loading', false) | store.dispatch('luru/set_loading', false) | ||||
}); | }); | ||||
} | } | ||||
}); | |||||
} | } | ||||
}); | }); | ||||
} | } |
"set_loading", | "set_loading", | ||||
"statusInit", | "statusInit", | ||||
"setMonth", | "setMonth", | ||||
"SETLINK" | |||||
"SETLINK", | |||||
]), | ]), | ||||
oninput(e) { | oninput(e) { | ||||
// this.active = e != ""; | // this.active = e != ""; | ||||
console.log("登录", res); | console.log("登录", res); | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
setToken(res.token); | setToken(res.token); | ||||
if (res.month!='') { | |||||
let time=res.month.replace('-','年')+"月" | |||||
this.setMonth(time); | |||||
} else { | |||||
let selectmonth = moment(new Date()) | |||||
.subtract(1, "months") | |||||
.format("YYYY年MM月"); | |||||
this.setMonth(selectmonth); | |||||
} | |||||
console.log(this.$router); | console.log(this.$router); | ||||
that.getUserInfo().then((res) => { | that.getUserInfo().then((res) => { | ||||
console.log(res); | console.log(res); | ||||
that.$router.push({ name: "/" }); | that.$router.push({ name: "/" }); | ||||
return; | return; | ||||
} | } | ||||
let selectmonth = moment(new Date()) | |||||
.subtract(1, "months") | |||||
.format("YYYY年MM月"); | |||||
this.setMonth(selectmonth); | |||||
that.$router.push({ name: "/" }); | that.$router.push({ name: "/" }); | ||||
}); | }); | ||||
} | } |
* Detail: https://cli.vuejs.org/config/#publicpath | * Detail: https://cli.vuejs.org/config/#publicpath | ||||
*/ | */ | ||||
publicPath: PUBLICPATH, | publicPath: PUBLICPATH, | ||||
outputDir: 'dist', | |||||
outputDir: 'dist1', | |||||
assetsDir: 'static', | assetsDir: 'static', | ||||
lintOnSave: process.env.NODE_ENV === 'development', | lintOnSave: process.env.NODE_ENV === 'development', | ||||
productionSourceMap: false, | productionSourceMap: false, |