@@ -123,8 +123,12 @@ export default { | |||
// Message.error(res.data.msg); | |||
} else { | |||
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) { | |||
let param = { | |||
time: time, | |||
@@ -135,7 +139,6 @@ export default { | |||
// Message.error(res.data.msg); | |||
store.dispatch('luru/set_lock_gongshi_getold', false) | |||
store.dispatch('luru/set_loading', false) | |||
return; | |||
} | |||
if (res.data.rows) { | |||
store.dispatch('luru/set_lock_gongshi_getold', true) | |||
@@ -144,6 +147,7 @@ export default { | |||
store.dispatch('luru/set_loading', false) | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
} |
@@ -143,7 +143,7 @@ export default { | |||
"set_loading", | |||
"statusInit", | |||
"setMonth", | |||
"SETLINK" | |||
"SETLINK", | |||
]), | |||
oninput(e) { | |||
// this.active = e != ""; | |||
@@ -159,6 +159,15 @@ export default { | |||
console.log("登录", res); | |||
if (res.code == 200) { | |||
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); | |||
that.getUserInfo().then((res) => { | |||
console.log(res); | |||
@@ -171,10 +180,6 @@ export default { | |||
that.$router.push({ name: "/" }); | |||
return; | |||
} | |||
let selectmonth = moment(new Date()) | |||
.subtract(1, "months") | |||
.format("YYYY年MM月"); | |||
this.setMonth(selectmonth); | |||
that.$router.push({ name: "/" }); | |||
}); | |||
} |
@@ -29,7 +29,7 @@ module.exports = { | |||
* Detail: https://cli.vuejs.org/config/#publicpath | |||
*/ | |||
publicPath: PUBLICPATH, | |||
outputDir: 'dist', | |||
outputDir: 'dist1', | |||
assetsDir: 'static', | |||
lintOnSave: process.env.NODE_ENV === 'development', | |||
productionSourceMap: false, |