From dcdce700f2b20825de135694aba01de2003fa356 Mon Sep 17 00:00:00 2001
From: Zhao Qiqi <1287235164@qq.com>
Date: Sat, 2 Jul 2022 17:42:11 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E9=93=BE=E7=AE=A1=E7=90=86--?=
=?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E5=BA=93=E3=80=81=E5=AD=98=E6=94=BE?=
=?UTF-8?q?=E5=9C=B0=E7=82=B9=E5=8F=98=E6=9B=B4=E7=94=B3=E8=AF=B7=E3=80=81?=
=?UTF-8?q?main.js=EF=BC=8C=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86--=E4=BB=A3?=
=?UTF-8?q?=E5=8A=9E=E3=80=81=E5=B7=B2=E5=8A=9E=E3=80=81Home.vue=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
anrui-scm/anrui-scm-ui/src/main.js | 55 ++++++++++++-------
.../rukuguanli/rukuguanliAwait.vue | 4 +-
.../cunfangdidianbiangeng.vue | 25 ++-------
.../cunfangdidianbiangengEdit.vue | 16 ++----
.../cunfangdidianbiangengInfo.vue | 32 ++++++-----
anrui-system-ui/src/views/Home/Home.vue | 12 ++--
anrui-system-ui/src/views/flow/doneList.vue | 3 +-
anrui-system-ui/src/views/flow/todoList.vue | 3 +-
8 files changed, 74 insertions(+), 76 deletions(-)
diff --git a/anrui-scm/anrui-scm-ui/src/main.js b/anrui-scm/anrui-scm-ui/src/main.js
index e53fd86411..5d21c3c847 100644
--- a/anrui-scm/anrui-scm-ui/src/main.js
+++ b/anrui-scm/anrui-scm-ui/src/main.js
@@ -1,45 +1,45 @@
import 'babel-polyfill'
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
-
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
-Vue.use(ElementUI)
-
import '@/styles/index.scss' // global css
-
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // 引入icon文件夹下所有的svg
+// 全局自定义组件
+import Pagination from '@/components/pagination/index.vue'
+import tabsearch from '@/components/tab-search/index.vue'
+import eimage from '@/components/E-image/index.vue'
+import moment from 'moment'
+import Print from '@/utils/print' // 引入附件的js文件
+import request from '@/utils/request'
+import { setStorage } from './utils/auth.js'
+import VueAMap from 'vue-amap'
+
+Vue.use(ElementUI)
+
// import '@/permission' //权限控制
Vue.prototype.$userInfo = null // 用户信息
-// 全局自定义组件
-import Pagination from '@/components/pagination/index.vue'
Vue.component('Pagination', Pagination)
-import tabsearch from '@/components/tab-search/index.vue'
Vue.component('tab-search', tabsearch)
-import eimage from '@/components/E-image/index.vue'
Vue.component('eimage', eimage)
-import moment from 'moment'
Vue.prototype.moment = moment
Vue.filter('dateFormat', function(dateStr, pattern = 'YYYY-MM-DD') {
return moment(dateStr).format(pattern)
})
-import Print from '@/utils/print' // 引入附件的js文件
Vue.use(Print) // 注册
-import request from '@/utils/request'
-import { setStorage, getStorage } from './utils/auth.js'
let token = null
token = GetQueryString('token')
if (token) {
-setStorage(token)
-let href = window.location.href
-href = href.split(`token=${token}`)[0]
-window.location.href = href.slice(0, href.length - 1)
+ setStorage(token)
+ let href = window.location.href
+// href = href.split(`token=${token}`)[0]
+// window.location.href = href.slice(0, href.length - 1)
}
// 获取登录用户信息
@@ -86,12 +86,27 @@ function getUserInfo() {
getUserInfo()
function GetQueryString(name) {
- var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
- var r = window.location.search.substr(1).match(reg)
- if (r != null) return unescape(r[2]); return null
+ var one = window.location.href.indexOf('?token=') + 7
+ var two = window.location.href.lastIndexOf('&') //+ 1
+ var data = window.location.href.substr(one)
+ if (two > one) {
+ data = window.location.href.slice(one, two)
+ console.log('token', data)
+ }
+ if (data) {
+ return data
+ }
+ return null
+ // var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
+ // var rrr = window.location.href.?token=
+ // console.log('rrr',rrr)
+ // var rr = rrr.substr(1)
+ // console.log('rr',rr)
+ // var r = rr.match(reg)
+ // console.log('r',r)
+ // if (r != null) return unescape(r[2]); return null
}
-import VueAMap from 'vue-amap'
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAwait.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAwait.vue
index 6a288b53fe..f8e9d1651e 100644
--- a/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAwait.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAwait.vue
@@ -59,8 +59,8 @@
-
-
+
+
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
index 8ab605f934..e6be3bb163 100644
--- a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
@@ -233,25 +233,12 @@ export default {
}, '*')
},
created() {
- // console.log('url:' + window.location.href)
- // var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置
- // var b = window.location.href.indexOf('#data') // 第一个#data出现的位置
- // const info = window.location.href.slice(a, b)
- // var sid = info.substr(info.indexOf('=') + 1)
- // this.showInfo(sid)
// ===获取参数
- var one = window.location.href.indexOf('?data') + 6
- console.log('iframe页面获取的one:', one)
- var two = window.location.href.lastIndexOf('&') //+ 1
- console.log('iframe页面获取的two:', two)
- const data = window.location.href.slice(one, two) // url解码unescape()已从web中移除,尽量不使用
- console.log('iframe页面获取的data:', data)
- // var tar = data.substr(data.indexOf('=') + 1)
- // console.log('iframe页面获取的tar:', tar)
+ var one = window.location.href.indexOf('&data') + 6
+ const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
const obj = JSON.parse(decodeURIComponent(data))
- console.log('iframe页面获取的obj:', obj)
// 同意列表
- this.agreeList.businessSid = obj.sid
+ this.agreeList.businessSid = obj.businessSid
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.taskDefKey = obj.taskDefKey
@@ -260,19 +247,19 @@ export default {
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
// 驳回列表
- this.regectList.businessSid = obj.sid
+ this.regectList.businessSid = obj.businessSid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
this.regectList.userSid = obj.userSid
// 终止列表
- this.stopList.businessSid = obj.sid
+ this.stopList.businessSid = obj.businessSid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
this.stopList.userSid = obj.userSid
// 办理状态
this.transactState = obj.transactState
// 加载流程图相关的数据
- this.showInfo(obj.sid)
+ this.showInfo(obj.businessSid)
this.getModelDetail(obj.deployId)
this.getFlowViewer(obj.instanceId)
},
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
index efa5695aba..05420d8bdb 100644
--- a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
@@ -192,19 +192,11 @@ export default {
}, '*')
},
created() {
- console.log('url:' + window.location.href)
- var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置
- var b = window.location.href.indexOf('#data') // 第一个#data出现的位置
- const info = window.location.href.slice(a, b)
- var sid = info.substr(info.indexOf('=') + 1)
// ===获取参数
- var one = window.location.href.lastIndexOf('#') + 1
- var two = window.location.href.lastIndexOf('}') + 1
- const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用
- var tar = data.substr(data.indexOf('=') + 1)
- const obj = JSON.parse(tar)
- console.log('iframe页面获取的obj:', obj)
- this.showEdit(sid,obj.instanceId,obj.taskId)
+ var one = window.location.href.indexOf('&data') + 6
+ const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
+ const obj = JSON.parse(decodeURIComponent(data))
+ this.showEdit(obj.businessSid,obj.instanceId,obj.taskId)
},
methods: {
getType() {
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue
index 55f95a20db..2358608c84 100644
--- a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue
@@ -168,25 +168,29 @@ export default {
}, '*')
},
created() {
- console.log('url:' + window.location.href)
- var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置
- var b = window.location.href.indexOf('#data') // 第一个#data出现的位置
- const info = window.location.href.slice(a, b)
- var sid = info.substr(info.indexOf('=') + 1)
- this.showInfo(sid)
// ===获取参数
- var one = window.location.href.lastIndexOf('#') + 1
- var two = window.location.href.lastIndexOf('}') + 1
- const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用
- var tar = data.substr(data.indexOf('=') + 1)
- const obj = JSON.parse(tar)
- console.log('iframe页面获取的obj:', obj)
+ var one = window.location.href.indexOf('&data') + 6
+ // var two = window.location.href.lastIndexOf('&') //+ 1
+ // const data = window.location.href.slice(one, two) // url解码unescape()已从web中移除,尽量不使用
+ const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
+ const obj = JSON.parse(decodeURIComponent(data))
+ // var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置
+ // var b = window.location.href.indexOf('#data') // 第一个#data出现的位置
+ // const info = window.location.href.slice(a, b)
+ // var sid = info.substr(info.indexOf('=') + 1)
+ // // ===获取参数
+ // var one = window.location.href.lastIndexOf('#') + 1
+ // var two = window.location.href.lastIndexOf('}') + 1
+ // const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用
+ // var tar = data.substr(data.indexOf('=') + 1)
+ // const obj = JSON.parse(tar)
+ this.showInfo(obj.businessSid)
// 撤回列表
- this.revokeList.businessSid = sid
+ this.revokeList.businessSid = obj.businessSid
this.revokeList.instanceId = obj.instanceId
this.revokeList.taskId = obj.taskId
this.revokeList.taskDefKey = obj.taskDefKey
- this.revokeList.userSid = obj.userSid
+ this.revokeList.userSid = window.sessionStorage.getItem('userSid')
// 办理状态
this.transactState = obj.transactState
// 加载流程图相关的数据
diff --git a/anrui-system-ui/src/views/Home/Home.vue b/anrui-system-ui/src/views/Home/Home.vue
index 7319c019c2..de80486ffc 100644
--- a/anrui-system-ui/src/views/Home/Home.vue
+++ b/anrui-system-ui/src/views/Home/Home.vue
@@ -259,17 +259,17 @@
// this.$router.push({path: '/index'})
let myPopup = window.open('/#/index', '_blank')
} else if (index == '7') {
- let myPopup = window.open('http://120.46.131.15/base' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://120.46.131.15/base/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '8') {
- let myPopup = window.open('http://120.46.131.15/message' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://120.46.131.15/message/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '1') {
- let myPopup = window.open('http://127.0.0.1:9531/scm' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '4') {
- let myPopup = window.open('http://120.46.131.15/fin' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://120.46.131.15/fin/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '5') {
- let myPopup = window.open('http://120.46.131.15/manage' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://120.46.131.15/manage/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '0') {
- let myPopup = window.open('http://120.46.131.15/buscenter' + '?token=' + getStorage(), '_blank')
+ let myPopup = window.open('http://120.46.131.15/buscenter/#/' + '?token=' + getStorage(), '_blank')
}
// const page = this.$router.resolve({name: name})
// window.open(page.href,'_blank')
diff --git a/anrui-system-ui/src/views/flow/doneList.vue b/anrui-system-ui/src/views/flow/doneList.vue
index e602e774a7..bf1c9b2e3c 100644
--- a/anrui-system-ui/src/views/flow/doneList.vue
+++ b/anrui-system-ui/src/views/flow/doneList.vue
@@ -261,7 +261,6 @@
this.selectUrl_list.taskDefKey = row.taskDefKey
this.selectUrl_list.type = 2 // 详情
const parameter_list = {
- businessSid: row.processVariables.businessSid,
instanceId: row.procInsId,
taskId: row.taskId,
taskDefKey: row.taskDefKey,
@@ -272,7 +271,7 @@
}
selectUrl(this.selectUrl_list).then((response) => {
if (response.code === '200') {
- this.url = 'http://localhost:9531' + response.data.url + '?data=' + encodeURI((JSON.stringify(parameter_list))) + '&token=' + getStorage()
+ this.url = 'http://localhost:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
// this.url = 'http://120.46.131.15' + response.data.url + '?data=' + JSON.stringify(parameter_list) + '&token=' + getStorage()
} else {
this.$notify({
diff --git a/anrui-system-ui/src/views/flow/todoList.vue b/anrui-system-ui/src/views/flow/todoList.vue
index 4808a4e8a4..7a3d566a5a 100644
--- a/anrui-system-ui/src/views/flow/todoList.vue
+++ b/anrui-system-ui/src/views/flow/todoList.vue
@@ -326,8 +326,9 @@ export default {
}
selectUrl(this.selectUrl_list).then((response) => {
if (response.code === '200') {
- this.url = 'http://localhost:9531' + response.data.url + '?data=' + encodeURI((JSON.stringify(parameter_list))) + '&token=' + getStorage()
+ this.url = 'http://localhost:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list)))
// this.url = 'http://120.46.131.15' + response.data.url + '?data=' + JSON.stringify(parameter_list) + '&token=' + getStorage()
+ console.log('已办拼接url:',this.url)
} else {
this.$notify({
title: '提示',