Browse Source

Merge branch 'master' into prod

shibei_master
dai 4 years ago
parent
commit
a2f260c560
  1. 2
      .env.production
  2. 2
      .env.production.uat
  3. 4
      public/index.html
  4. 2
      src/App.vue
  5. 2
      src/components/ren-process-detail/src/ren-process-detail.vue
  6. 2
      src/i18n/index.js
  7. 6
      src/js/ajax.js
  8. 4
      src/main.js
  9. 2
      src/mixins/view-module.js
  10. 6
      src/utils/request.js
  11. 2
      src/views/components/tinymce/index.vue
  12. 6
      src/views/main-content.vue
  13. 113
      src/views/main-navbar.vue
  14. 6
      src/views/main-shuju/main-content.vue
  15. 35
      src/views/main-shuju/main-navbar.vue
  16. 8
      src/views/main-shuju/main.vue
  17. 106
      src/views/main.vue
  18. 4
      src/views/modules/activiti/model.vue
  19. 2
      src/views/modules/activiti/process-deploy.vue
  20. 2
      src/views/modules/activiti/process-initiation.vue
  21. 2
      src/views/modules/activiti/process.vue
  22. 2
      src/views/modules/message/mail-template-add-or-update.vue
  23. 2
      src/views/modules/oss/oss-upload.vue
  24. 2
      src/views/modules/sys/news-add-or-update.vue
  25. 2
      src/views/pages/index.vue
  26. 2
      src/views/pages/login copy.vue
  27. 4
      src/views/pages/login.vue

2
.env.production

@ -1,4 +1,4 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api
VUE_APP_NODE_ENV=prod VUE_APP_NODE_ENV=prod
VUE_APP_PUBLIC_PATH=epmet-oper VUE_APP_PUBLIC_PATH=epmet-oper

2
.env.production.uat

@ -1,4 +1,4 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api VUE_APP_API_SERVER = http://120.27.18.76/api
VUE_APP_NODE_ENV=prod:uat VUE_APP_NODE_ENV=prod:uat
VUE_APP_PUBLIC_PATH=epmet-oper VUE_APP_PUBLIC_PATH=epmet-oper

4
public/index.html

@ -57,13 +57,13 @@
<!-- 验收测试环境 aliyun --> <!-- 验收测试环境 aliyun -->
<% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %> <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %>
<script> <script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api' window.SITE_CONFIG['apiURL'] = 'http://120.27.18.76/api'
</script> </script>
<% } %> <% } %>
<!-- 生产环境 --> <!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %> <% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %>
<script> <script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-cloud.elinkservice.cn/api' window.SITE_CONFIG['apiURL'] = 'https://epdc-shibei.elinkservice.cn/api'
</script> </script>
<% } %> <% } %>
</head> </head>

2
src/App.vue

@ -19,7 +19,7 @@ export default {
methods: { methods: {
i18nHandle (val, oldVal) { i18nHandle (val, oldVal) {
Cookies.set('language', val) localStorage.setItem('language', val)
document.querySelector('html').setAttribute('lang', val) document.querySelector('html').setAttribute('lang', val)
document.title = messages[val].brand.lg document.title = messages[val].brand.lg
// //

2
src/components/ren-process-detail/src/ren-process-detail.vue

@ -69,7 +69,7 @@ export default {
// (xml/image)url // (xml/image)url
getResourceURL () { getResourceURL () {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token'), 'token': localStorage.getItem('token'),
'processInstanceId': this.dataForm.processInstanceId 'processInstanceId': this.dataForm.processInstanceId
}) })
return `${window.SITE_CONFIG['apiURL']}/activiti/his/getInstImage?${params}` return `${window.SITE_CONFIG['apiURL']}/activiti/his/getInstImage?${params}`

2
src/i18n/index.js

@ -29,6 +29,6 @@ export const messages = {
} }
export default new VueI18n({ export default new VueI18n({
locale: Cookies.get('language') || 'zh-CN', locale: localStorage.getItem('language') || 'zh-CN',
messages messages
}) })

6
src/js/ajax.js

@ -45,9 +45,9 @@ function endLoading () {
*/ */
axios.interceptors.request.use( axios.interceptors.request.use(
(config) => { (config) => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN'
config.headers['token'] = Cookies.get('token') || '' config.headers['token'] = localStorage.getItem('token') || ''
config.headers['Authorization'] = Cookies.get('token') || '' config.headers['Authorization'] = localStorage.getItem('token') || ''
// 默认参数 // 默认参数
var defaults = {} var defaults = {}
// 防止缓存,GET请求默认带_t参数 // 防止缓存,GET请求默认带_t参数

4
src/main.js

@ -33,7 +33,9 @@ import getQueryPara from "dai-js/modules/getQueryPara";
// 兼容token传参登录 // 兼容token传参登录
if (getQueryPara("token")) { if (getQueryPara("token")) {
console.log('token', getQueryPara("token")); console.log('token', getQueryPara("token"));
Cookies.set("token", getQueryPara("token")); localStorage.setItem("token", getQueryPara("token"));
console.log('token222222', localStorage.getItem('token'));
} }
window.app = Object.assign( window.app = Object.assign(

2
src/mixins/view-module.js

@ -142,7 +142,7 @@ export default {
// 导出 // 导出
exportHandle () { exportHandle () {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token'), 'token': localStorage.getItem('token'),
...this.dataForm ...this.dataForm
}) })
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}` window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}`

6
src/utils/request.js

@ -15,9 +15,9 @@ const http = axios.create({
* 请求拦截 * 请求拦截
*/ */
http.interceptors.request.use(config => { http.interceptors.request.use(config => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN'
config.headers['token'] = Cookies.get('token') || '' config.headers['token'] = localStorage.getItem('token') || ''
config.headers['Authorization'] = Cookies.get('token') || '' config.headers['Authorization'] = localStorage.getItem('token') || ''
// 默认参数 // 默认参数
var defaults = {} var defaults = {}
// 防止缓存,GET请求默认带_t参数 // 防止缓存,GET请求默认带_t参数

2
src/views/components/tinymce/index.vue

@ -137,7 +137,7 @@ export default {
}) })
}, },
getUserToken () { getUserToken () {
let token = Cookie.get('token') let token = localStorage.getItem('token')
// console.log('token', token) // console.log('token', token)
// return this.$store.getters['user/isLogin'] // return this.$store.getters['user/isLogin']
return token return token

6
src/views/main-content.vue

@ -87,7 +87,7 @@ export default {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.sendMessage() // this.sendMessage()
// }) // })
this.token = Cookie.get("token"); this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId"); this.customerId = localStorage.getItem("customerId");
}, },
methods: { methods: {
@ -100,7 +100,7 @@ export default {
this.iframeUrl = this.iframeUrl =
url + url +
"?token=" + "?token=" +
Cookie.get("token") + localStorage.getItem("token") +
"&customerId=" + "&customerId=" +
localStorage.getItem("customerId"); localStorage.getItem("customerId");
return isURL(url); return isURL(url);
@ -169,7 +169,7 @@ export default {
console.log("iframe", iframe); console.log("iframe", iframe);
// iframe.postMessage({ // iframe.postMessage({
// token: Cookie.get('token'), // token: localStorage.getItem('token'),
// customerId: localStorage.getItem('customerId') // customerId: localStorage.getItem('customerId')
// }, '*') // }, '*')
iframe.postMessage({ name: "lalalal" }, "*"); iframe.postMessage({ name: "lalalal" }, "*");

113
src/views/main-navbar.vue

@ -46,9 +46,7 @@
mode="horizontal" mode="horizontal"
class="aui-navbar__menu mr-auto z-div" class="aui-navbar__menu mr-auto z-div"
> >
<el-menu-item <el-menu-item @click="toIndexPage">
@click="toIndexPage"
>
<span>首页</span> <span>首页</span>
</el-menu-item> </el-menu-item>
@ -104,12 +102,11 @@
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item @click.native="updatePasswordHandle()">{{
@click.native="updatePasswordHandle()" $t("updatePassword.title")
>{{ $t('updatePassword.title') }}</el-dropdown-item }}</el-dropdown-item>
>
<el-dropdown-item @click.native="logoutHandle()">{{ <el-dropdown-item @click.native="logoutHandle()">{{
$t('logout') $t("logout")
}}</el-dropdown-item> }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -127,119 +124,121 @@
</template> </template>
<script> <script>
import { messages } from '@/i18n' import { messages } from "@/i18n";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import screenfull from 'screenfull' import screenfull from "screenfull";
import UpdatePasswordWork from './main-navbar-update-password-work' import UpdatePasswordWork from "./main-navbar-update-password-work";
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from "@/utils";
export default { export default {
inject: ['refresh'], inject: ["refresh"],
data() { data() {
return { return {
showHeader: true, showHeader: true,
i18nMessages: messages, i18nMessages: messages,
updatePassowrdVisible: false, updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName') customerName: "",
} };
}, },
components: { components: {
UpdatePasswordWork UpdatePasswordWork,
}, },
created() { created() {
let platformToken = localStorage.getItem('showHeader') || '' let platformToken = localStorage.getItem("showHeader") || "";
if ( if (
typeof platformToken !== 'undefined' && typeof platformToken !== "undefined" &&
platformToken !== 'undefined' && platformToken !== "undefined" &&
platformToken !== '' platformToken !== ""
) { ) {
this.showHeader = false this.showHeader = false;
} }
console.log('=============================', this.userType) this.changeCustomerName();
console.log("=============================", this.userType);
}, },
computed: { computed: {
userType() { userType() {
return localStorage.getItem('userType') return localStorage.getItem("userType");
} },
}, },
methods: { methods: {
toIndexPage(){ toIndexPage() {
this.$router.replace('/indexWork') this.$router.replace("/indexWork");
}, },
// menuId() // menuId()
gotoRouteHandle(menuId, idx) { gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter( var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId (item) => item.meta.menuId === menuId
)[0] )[0];
if (route) { if (route) {
this.$router.push({ name: route.name }) this.$router.push({ name: route.name });
} }
this.$store.state.LevelOneMenuActiveName = menuId this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList = this.$store.state.sidebarActiveSubMenuList =
this.$store.state.sidebarMenuList[idx].children || [] this.$store.state.sidebarMenuList[idx].children || [];
}, },
changeCustomerName(customerName) { changeCustomerName(customerName) {
this.customerName = localStorage.getItem('customerName') this.customerName =
localStorage.getItem("customerName") || "党建引领基层治理互联管理平台";
}, },
// //
fullscreenHandle() { fullscreenHandle() {
if (!screenfull.enabled) { if (!screenfull.enabled) {
return this.$message({ return this.$message({
message: this.$t('fullscreen.prompt'), message: this.$t("fullscreen.prompt"),
type: 'warning', type: "warning",
duration: 500 duration: 500,
}) });
} }
screenfull.toggle() screenfull.toggle();
}, },
// //
updatePasswordHandle() { updatePasswordHandle() {
this.updatePassowrdVisible = true this.updatePassowrdVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.updatePassowrd.init() this.$refs.updatePassowrd.init();
}) });
}, },
// 退 // 退
logoutHandle() { logoutHandle() {
this.$confirm( this.$confirm(
this.$t('prompt.info', { handle: this.$t('logout') }), this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t('prompt.title'), this.$t("prompt.title"),
{ {
confirmButtonText: this.$t('confirm'), confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t('cancel'), cancelButtonText: this.$t("cancel"),
type: 'warning' type: "warning",
} }
) )
.then(() => { .then(() => {
// //
// tabs, // tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter( this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === 'home' (item) => item.name === "home"
) );
this.$http this.$http
.post('/auth/login/logout') .post("/auth/login/logout")
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
// 退 // 退
if (res.code !== 10007) { if (res.code !== 10007) {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
} }
clearLoginInfo() clearLoginInfo();
this.$router.push({ name: 'login' }) this.$router.push({ name: "login" });
// if (localStorage.getItem('userType') === 'work') { // if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' }) // this.$router.push({ name: 'loginWork' })
// } else { // } else {
// this.$router.push({ name: 'login' }) // this.$router.push({ name: 'login' })
// } // }
}) })
.catch(() => {}) .catch(() => {});
}) })
.catch(() => {}) .catch(() => {});
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main-line { .main-line {

6
src/views/main-shuju/main-content.vue

@ -24,7 +24,7 @@ export default {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.sendMessage() // this.sendMessage()
// }) // })
this.token = Cookie.get('token') this.token = localStorage.getItem('token')
this.customerId = localStorage.getItem('customerId') this.customerId = localStorage.getItem('customerId')
}, },
methods: { methods: {
@ -34,7 +34,7 @@ export default {
// tabs, iframe // tabs, iframe
tabIsIframe (url) { tabIsIframe (url) {
// this.appendIframe(url) // this.appendIframe(url)
this.iframeUrl = url + '?token=' + Cookie.get('token') + '&customerId=' + localStorage.getItem('customerId') this.iframeUrl = url + '?token=' + localStorage.getItem('token') + '&customerId=' + localStorage.getItem('customerId')
return isURL(url) return isURL(url)
}, },
// tabs, tab // tabs, tab
@ -85,7 +85,7 @@ export default {
console.log('iframe', iframe) console.log('iframe', iframe)
// iframe.postMessage({ // iframe.postMessage({
// token: Cookie.get('token'), // token: localStorage.getItem('token'),
// customerId: localStorage.getItem('customerId') // customerId: localStorage.getItem('customerId')
// }, '*') // }, '*')
iframe.postMessage({ name: 'lalalal' }, '*') iframe.postMessage({ name: 'lalalal' }, '*')

35
src/views/main-shuju/main-navbar.vue

@ -3,9 +3,7 @@
<nav v-if="showHeader" class="m-navbar"> <nav v-if="showHeader" class="m-navbar">
<div class="navbar__header"> <div class="navbar__header">
<h1 class="navbar__brand" @click="$router.push({ name: 'home' })"> <h1 class="navbar__brand" @click="$router.push({ name: 'home' })">
<a class="navbar__brand-lg" href="javascript:;">{{ <a class="navbar__brand-lg" href="javascript:;">{{ customerName }}</a>
userType === "work" ? customerName : $t("brand.lg")
}}</a>
<a class="navbar__brand-mini" href="javascript:;">{{ <a class="navbar__brand-mini" href="javascript:;">{{
customerName.slice(0, 2) customerName.slice(0, 2)
}}</a> }}</a>
@ -150,29 +148,25 @@ export default {
showHeader: true, showHeader: true,
i18nMessages: messages, i18nMessages: messages,
updatePassowrdVisible: false, updatePassowrdVisible: false,
customerName: localStorage.getItem("customerName"), customerName: "",
}; };
}, },
components: { components: {
UpdatePasswordWork, UpdatePasswordWork,
}, },
created() { created() {
let platformToken = localStorage.getItem("showHeader") || ""; // let platformToken = localStorage.getItem("showHeader") || "";
if ( // if (
typeof platformToken !== "undefined" && // typeof platformToken !== "undefined" &&
platformToken !== "undefined" && // platformToken !== "undefined" &&
platformToken !== "" // platformToken !== ""
) { // ) {
this.showHeader = false; // this.showHeader = false;
} // }
console.log("=============================", this.userType); this.changeCustomerName();
this.$store.state.mainShuju.menuList = window.SITE_CONFIG["menuShujuList"]; this.$store.state.mainShuju.menuList = window.SITE_CONFIG["menuShujuList"];
}, },
computed: { computed: {},
userType() {
return localStorage.getItem("userType");
},
},
methods: { methods: {
toIndexPage() { toIndexPage() {
this.$router.replace("/indexWork"); this.$router.replace("/indexWork");
@ -187,8 +181,9 @@ export default {
this.$store.state.mainShuju.activeName = menuId; this.$store.state.mainShuju.activeName = menuId;
} }
}, },
changeCustomerName(customerName) { changeCustomerName() {
this.customerName = localStorage.getItem("customerName"); this.customerName =
localStorage.getItem("customerName") || "数据分析可视化平台";
}, },
// //
fullscreenHandle() { fullscreenHandle() {

8
src/views/main-shuju/main.vue

@ -108,12 +108,18 @@ export default {
async getWorkUserInfo() { async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo"; const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {}; let params = {};
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.$store.state.user = { ...data }; this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList); localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId); localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}
} else {
this.$message.error(rspMsg);
} }
}, },
}, },

106
src/views/main.vue

@ -1,7 +1,8 @@
<template> <template>
<div v-loading.fullscreen.lock="loading" <div
:element-loading-text="$t('loading')" v-loading.fullscreen.lock="loading"
:class="[ :element-loading-text="$t('loading')"
:class="[
'aui-wrapper', 'aui-wrapper',
{ 'aui-sidebar--fold': $store.state.sidebarFold }, { 'aui-sidebar--fold': $store.state.sidebarFold },
{ {
@ -9,14 +10,16 @@
$store.state.sidebarActiveSubMenuList.length == 0, $store.state.sidebarActiveSubMenuList.length == 0,
}, },
{ 'z-iframe': $store.state.inIframe }, { 'z-iframe': $store.state.inIframe },
]"> ]"
>
<template v-if="!loading"> <template v-if="!loading">
<main-navbar ref="ref_navbar" <main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" /> <main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper"> <div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh" <main-content
@changeCustomerName="changeCustomerName" /> v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
</div> </div>
<main-theme-tools v-if="!$store.state.inIframe" /> <main-theme-tools v-if="!$store.state.inIframe" />
</template> </template>
@ -31,12 +34,13 @@ import MainThemeTools from "./main-theme-tools";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import nextTick from "dai-js/tools/nextTick"; import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default { export default {
provide () { provide() {
return { return {
// //
refresh () { refresh() {
this.$store.state.contentIsNeedRefresh = true; this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false; this.$store.state.contentIsNeedRefresh = false;
@ -44,7 +48,7 @@ export default {
}, },
}; };
}, },
data () { data() {
return { return {
loading: true, loading: true,
userType: localStorage.getItem("userType"), userType: localStorage.getItem("userType"),
@ -60,26 +64,20 @@ export default {
watch: { watch: {
$route: "routeHandle", $route: "routeHandle",
}, },
async created () { async created() {
this.windowResizeHandle(); this.windowResizeHandle();
this.routeHandle(this.$route); this.routeHandle(this.$route);
if (localStorage.getItem("userType") === "work") { Promise.all([this.getWorkUserInfo()]).then(() => {
Promise.all([this.getWorkUserInfo()]).then(() => { this.loading = false;
this.loading = false; });
});
} else {
Promise.all([this.getUserInfo()]).then(() => {
this.loading = false;
});
}
}, },
computed: {}, computed: {},
methods: { methods: {
changeCustomerName (customerName) { changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName); this.$refs["ref_navbar"].changeCustomerName(customerName);
}, },
// //
windowResizeHandle () { windowResizeHandle() {
this.$store.state.sidebarFold = this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false; document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener( window.addEventListener(
@ -91,7 +89,7 @@ export default {
); );
}, },
// , // ,
routeHandle (route) { routeHandle(route) {
if (!route.meta.isTab) { if (!route.meta.isTab) {
return false; return false;
} }
@ -114,7 +112,7 @@ export default {
this.$store.state.contentTabsActiveName = tab.name; this.$store.state.contentTabsActiveName = tab.name;
this.syncLevelOneMenuActive(tab.menuId); this.syncLevelOneMenuActive(tab.menuId);
}, },
async syncLevelOneMenuActive (menuId) { async syncLevelOneMenuActive(menuId) {
await nextTick(); await nextTick();
console.log( console.log(
"*******************************", "*******************************",
@ -137,54 +135,22 @@ export default {
idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : []; idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : [];
}, },
// //
getUserInfo () { async getWorkUserInfo() {
const url = "/epmetuser/operuser/queryOperUserDto";
return this.$http
.get(url)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$store.state.user.id = res.data.id;
this.$store.state.user.realName = res.data.realName;
this.$store.state.user.superAdmin = res.data.superAdmin;
this.$store.state.user.gender = data.gender;
localStorage.setItem("customerId", "");
})
.catch(() => { });
},
//
getWorkUserInfo () {
const url = "/epmetuser/customerstaff/staffbasicinfo"; const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {}; let params = {};
window.app.ajax.post( const { data, code, msg } = await requestPost(url, params);
url, if (code === 0) {
params, this.$store.state.user = { ...data };
(data, rspMsg) => { console.log("user---hahha", this.$store.state.user);
this.$store.state.user = { ...data }; localStorage.setItem("roleList", data.roleList);
console.log("user---hahha", this.$store.state.user); localStorage.setItem("customerId", data.customerId);
// this.$store.state.user.id = data.id localStorage.setItem("staffId", data.id);
// this.$store.state.user.realName = data.realName if (!localStorage.getItem("customerName")) {
// this.$store.state.user.superAdmin = data.superAdmin localStorage.setItem("customerName", data.customerName || "");
// this.$store.state.user.gender = data.gender
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
// this.$store.state.user.roleList = data.roleList
// this.$store.state.user.customerId = data.customerId
},
(rspMsg, data) => {
this.$message.error(rspMsg);
} }
); } else {
// return this.$http.get(url).then(({ data: res }) => { this.$message.error(rspMsg);
// if (res.code !== 0) { }
// return this.$message.error(res.msg)
// }
// }).catch(() => { })
}, },
}, },
}; };

4
src/views/modules/activiti/model.vue

@ -83,7 +83,7 @@ export default {
// 线url // 线url
getModelerURL (id) { getModelerURL (id) {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token'), 'token': localStorage.getItem('token'),
'modelId': id 'modelId': id
}) })
return `${window.SITE_CONFIG['apiURL']}/activiti/modeler.html?${params}` return `${window.SITE_CONFIG['apiURL']}/activiti/modeler.html?${params}`
@ -91,7 +91,7 @@ export default {
// url // url
getExportURL (id) { getExportURL (id) {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token') 'token': localStorage.getItem('token')
}) })
return `${window.SITE_CONFIG['apiURL']}/activiti/model/export/${id}?${params}` return `${window.SITE_CONFIG['apiURL']}/activiti/model/export/${id}?${params}`
}, },

2
src/views/modules/activiti/process-deploy.vue

@ -28,7 +28,7 @@ export default {
methods: { methods: {
init () { init () {
this.visible = true this.visible = true
this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${Cookies.get('token')}` this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${localStorage.getItem('token')}`
this.fileList = [] this.fileList = []
}, },
// //

2
src/views/modules/activiti/process-initiation.vue

@ -85,7 +85,7 @@ export default {
// (xml/image)url // (xml/image)url
getResourceURL (id, name) { getResourceURL (id, name) {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token'), 'token': localStorage.getItem('token'),
'deploymentId': id, 'deploymentId': id,
'resourceName': name 'resourceName': name
}) })

2
src/views/modules/activiti/process.vue

@ -101,7 +101,7 @@ export default {
// (xml/image)url // (xml/image)url
getResourceURL (id, name) { getResourceURL (id, name) {
var params = qs.stringify({ var params = qs.stringify({
'token': Cookies.get('token'), 'token': localStorage.getItem('token'),
'deploymentId': id, 'deploymentId': id,
'resourceName': name 'resourceName': name
}) })

2
src/views/modules/message/mail-template-add-or-update.vue

@ -108,7 +108,7 @@ export default {
theme: 'snow' theme: 'snow'
}) })
// (使element upload) // (使element upload)
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}`
this.quillEditor.getModule('toolbar').addHandler('image', () => { this.quillEditor.getModule('toolbar').addHandler('image', () => {
this.$refs.uploadBtn.$el.click() this.$refs.uploadBtn.$el.click()
}) })

2
src/views/modules/oss/oss-upload.vue

@ -29,7 +29,7 @@ export default {
methods: { methods: {
init () { init () {
this.visible = true this.visible = true
this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}`
this.num = 0 this.num = 0
this.fileList = [] this.fileList = []
}, },

2
src/views/modules/sys/news-add-or-update.vue

@ -108,7 +108,7 @@ export default {
theme: 'snow' theme: 'snow'
}) })
// (使element upload) // (使element upload)
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}` this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${localStorage.getItem('token')}`
this.quillEditor.getModule('toolbar').addHandler('image', () => { this.quillEditor.getModule('toolbar').addHandler('image', () => {
this.$refs.uploadBtn.$el.click() this.$refs.uploadBtn.$el.click()
}) })

2
src/views/pages/index.vue

@ -73,7 +73,7 @@ export default {
localStorage.setItem('customerId', res.data.customerId) localStorage.setItem('customerId', res.data.customerId)
localStorage.setItem('userType', 'work') localStorage.setItem('userType', 'work')
localStorage.setItem('showHeader', '0') localStorage.setItem('showHeader', '0')
Cookies.set('token', res.data.token) localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' }) this.$router.replace({ name: 'home' })
}) })
.catch(() => {}) .catch(() => {})

2
src/views/pages/login copy.vue

@ -145,7 +145,7 @@ export default {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
localStorage.setItem('userType', 'oper') localStorage.setItem('userType', 'oper')
Cookies.set('token', res.data.token) localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' }).catch(() => { }) this.$router.replace({ name: 'home' }).catch(() => { })
}).catch(() => { }) }).catch(() => { })
}) })

4
src/views/pages/login.vue

@ -243,7 +243,7 @@ export default {
localStorage.setItem('customerId', res.data.customerId) localStorage.setItem('customerId', res.data.customerId)
localStorage.setItem('userType', 'work') localStorage.setItem('userType', 'work')
localStorage.setItem('showHeader', '0') localStorage.setItem('showHeader', '0')
Cookies.set('token', res.data.token) localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' }) this.$router.replace({ name: 'home' })
}) })
.catch(() => { }) .catch(() => { })
@ -271,7 +271,7 @@ export default {
localStorage.setItem('userType', 'work') localStorage.setItem('userType', 'work')
Cookies.set('token', res.data.token) localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'indexWork' }).catch(() => { }) this.$router.replace({ name: 'indexWork' }).catch(() => { })
}) })
.catch(() => { }) .catch(() => { })

Loading…
Cancel
Save