master
lion 2 years ago
parent 3f23db3de5
commit 9afafd62ba

@ -5,7 +5,7 @@ ENV='development'
VUE_APP_BASE_API = http://192.168.60.99:9004/
VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file
VUE_APP_OA_URL = http://192.168.60.18:2021
VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
#VUE_APP_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
#VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file

@ -7,8 +7,7 @@ import {
import {
getToken,
setToken,
removeToken,
removeWzglUser
removeToken
} from '@/utils/auth'
import {
resetRouter
@ -141,7 +140,6 @@ const actions = {
logout(state.token).then(() => {
removeToken() // must remove token first
resetRouter()
removeWzglUser()
commit('RESET_STATE')
resolve()
}).catch(error => {
@ -156,7 +154,6 @@ const actions = {
}) {
return new Promise(resolve => {
removeToken() // must remove token first
removeWzglUser()
commit('RESET_STATE')
resolve()
})

@ -1,7 +1,6 @@
import Cookies from 'js-cookie'
const TokenKey = 'patrol_wzgl_token'
const UserInfo = 'patrol_wzgl_user'
export function getToken() {
@ -25,23 +24,3 @@ export function removeToken() {
}
export function getWzglUser() {
//return Cookies.get(TokenKey)
if (Cookies.get(UserInfo)) {
return Cookies.get(UserInfo)
} else {
return sessionStorage.getItem(UserInfo);
}
}
export function setWzglUser(User) {
sessionStorage.setItem(UserInfo, User);
return Cookies.set(UserInfo, User)
}
export function removeWzglUser() {
sessionStorage.clear();
return Cookies.remove(UserInfo)
}

@ -40,9 +40,6 @@
import {
getInfo
} from '../../api/user.js'
import {
setWzglUser
} from '@/utils/auth.js'
export default {
components: {
@ -186,7 +183,6 @@
getInfo().then(response => {
console.log(response)
this.user = response
setWzglUser(this.user)
}).catch(error => {})
this.start_time = this.recentTime(-14, 'yyyy-MM-dd')
this.end_time = this.getNowDate()

@ -56,9 +56,9 @@
getInfo
} from "@/api/user.js"
import {
getOutboundsStatus
getOutboundsStatus,
getOatoken
} from "@/api/contract.js"
import addoutbounds from "./component/addoutbounds.vue"
import printoutbounds from "./component/printoutbounds.vue"
import {
@ -171,14 +171,6 @@
}
}).catch(error => {})
// const res = await JSON.parse(getWzglUser())
// this.userName = res.username
// this.authName = res.name
// for(var k of res.role){
// if(k.name==''){
// this.roleName = k.name
// }
// }
},
async getindex() {
this.loading = true
@ -210,7 +202,7 @@
this.$refs['printoutbounds'].type = type
this.$refs['printoutbounds'].chukuType = this.chukuType
},
tofollow(id,row){
async tofollow(id,row){
console.log(row)
if(row.id_outbounds_items_outbounds_id_relation.length<1){
Message({
@ -240,13 +232,15 @@
typeid = parseInt(typeObj[k])
}
}
let res = await getOatoken()
// = this.chukuType==''?31:(this.chukuType==''?32:33)
// http://suzhouhedaooa.langye.net/admin/flow/create/31?username=admin&default_json={%22bianhao%22:%22100%22}
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?username=${this.userName}&default_json=${JSON.stringify(default_json)}`
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${res.oatoken}&username=${this.userName}&default_json=${JSON.stringify(default_json)}`
let seeBuy = window.open(url, 'follow',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
},
deleteChuku(row) {
// return

@ -15,7 +15,7 @@
</div>
</div>
</template>
<template v-slot:caigouhetong v-if="form.rukuleixing=='请示'">
<template v-slot:qingshiliucheng v-if="form.rukuleixing=='请示'">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>请示流程
@ -331,6 +331,7 @@
rukupiciList: [],
form: {
caigouhetong: '',
qingshiliucheng:"",
gudingzichanbianhao: '',
rukushijian: '',
// caigouhetong:'',
@ -669,8 +670,10 @@
},
async toQsFollow(id){
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${id}?oatoken=${res.oatoken}`
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${id}?wuziguanli_oatoken=${res.oatoken}`
console.log("url",url)
let seeBuy = window.open(url, 'seeBuy','location=0')
},
//
@ -878,6 +881,7 @@
})
this.form = {
caigouhetong: res?.caigouhetong,
qingshiliucheng:res?.qingshiliucheng,
gudingzichanbianhao: res?.gudingzichanbianhao,
rukushijian: res?.rukushijian,
rukuleixing: res?.rukuleixing,
@ -889,6 +893,7 @@
rukumingxi: ''
}
this.editHt = res?.caigouhetong
this.editQs = res?.qingshiliucheng
this.mingxiList = res.id_stocks_items_stocks_id_relation
},
submit() {

@ -245,10 +245,11 @@
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.purchase_last_flow_id}?oatoken=${res.oatoken}`
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.purchase_last_flow_id}?wuziguanli_oatoken=${res.oatoken}`
let seeBuy = window.open(url, 'seeBuy',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
},
async seeBidding() {
if (!this.detail?.invite_last_flow_id) {
@ -261,10 +262,11 @@
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?oatoken=${res.oatoken}`
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?wuziguanli_oatoken=${res.oatoken}`
let seeBidding = window.open(url, 'seeBidding',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
},
async seeSignProcess() {
if (!this.detail?.join_last_flow_id) {
@ -277,10 +279,11 @@
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.join_last_flow_id}?oatoken=${res.oatoken}`
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.join_last_flow_id}?wuziguanli_oatoken=${res.oatoken}`
let seeSign = window.open(url, 'seeSign',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
},
async seeAskProcess() {
@ -293,11 +296,13 @@
return
}
let res = await getOatoken()
console.log(url)
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.req_last_flow_id}?oatoken=${res.oatoken}`
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${this.detail.req_last_flow_id}?wuziguanli_oatoken=${res.oatoken}`
let seeAsk = window.open(url, 'seeAsk',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
},
async getDetail(id) {

@ -152,13 +152,6 @@
},
methods: {
async getUserName(){
// const res = JSON.parse(getWzglUser())
// console.log("res",res)
// for(var k of res.role){
// if(k.name==''){
// this.roleName = k.name
// }
// }
getInfo().then(res => {
for(var k of res.role){
if(k.name=='系统管理员'){

Loading…
Cancel
Save