Browse Source

增加工作日志页面

feature/syp_points
ZhaoTongYao 5 years ago
parent
commit
5775109c82
  1. 4
      public/index.html
  2. 30
      src/views/modules/worklog/worklog.vue
  3. 10
      src/views/pages/login.vue
  4. 1
      vue.config.js

4
public/index.html

@ -36,8 +36,8 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'http://localhost:9094/epdc-api'
// window.SITE_CONFIG['apiURL'] = 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api'
// window.SITE_CONFIG['apiURL'] = 'http://localhost:9094/epdc-api'
window.SITE_CONFIG['apiURL'] = 'https://epdc-jinan-test.elinkservice.cn/js/epdc-api'
</script>
<% } %>
<!-- 集成测试环境 -->

30
src/views/modules/worklog/worklog.vue

@ -0,0 +1,30 @@
<template>
<el-card class="worklog">
<iframe :src="url" class="iframe"/>
</el-card>
</template>
<script>
import Cookies from 'js-cookie'
export default {
data() {
return {
url: ''
}
},
created () {
const _token = Cookies.get('token') || localStorage.getItem('token')
const _customerId = Cookies.get('customerId') || localStorage.getItem('customerId')
this.url = `https://epdc-jinan-test.elinkservice.cn/plugin-wrf/#/NoteTaking?token=${_token}&customerId=${_customerId}`
}
}
</script>
<style lang="scss" scoped>
.worklog {
min-height: calc(calc(100vh - 50px - 38px - 30px) - 2px);
}
.iframe {
width: 100%;
min-height: calc(calc(100vh - 50px - 38px - 30px) - 2px);
}
</style>

10
src/views/pages/login.vue

@ -151,6 +151,16 @@ export default {
// localStorage
this.checkLocakStorage()
}).catch(() => { })
this.$http.get(`/api/plugins/workLog/getCustomId`)
.then(res => {
if (res.data.code !== 0) {
return this.$message.error(res.data.msg)
}
Cookies.set('customerId',res.data.data)
})
.catch((err) => {
console.log(err)
})
})
}, 1000, { 'leading': true, 'trailing': false }),
checkLocakStorage () {

1
vue.config.js

@ -9,6 +9,7 @@ module.exports = {
devServer: {
open: true,
port: 8001,
public: '192.168.51.32',
overlay: {
errors: false,
warnings: false

Loading…
Cancel
Save