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_BASE_API = http://192.168.60.99:9004/
VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file 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 = 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_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
#VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file #VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file

@ -7,8 +7,7 @@ import {
import { import {
getToken, getToken,
setToken, setToken,
removeToken, removeToken
removeWzglUser
} from '@/utils/auth' } from '@/utils/auth'
import { import {
resetRouter resetRouter
@ -61,7 +60,7 @@ const actions = {
}).then(response => { }).then(response => {
//console.log(response) //console.log(response)
const { const {
data data
} = response; } = response;
@ -140,8 +139,7 @@ const actions = {
console.log("logout",state.token) console.log("logout",state.token)
logout(state.token).then(() => { logout(state.token).then(() => {
removeToken() // must remove token first removeToken() // must remove token first
resetRouter() resetRouter()
removeWzglUser()
commit('RESET_STATE') commit('RESET_STATE')
resolve() resolve()
}).catch(error => { }).catch(error => {
@ -155,8 +153,7 @@ const actions = {
commit commit
}) { }) {
return new Promise(resolve => { return new Promise(resolve => {
removeToken() // must remove token first removeToken() // must remove token first
removeWzglUser()
commit('RESET_STATE') commit('RESET_STATE')
resolve() resolve()
}) })

@ -1,7 +1,6 @@
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
const TokenKey = 'patrol_wzgl_token' const TokenKey = 'patrol_wzgl_token'
const UserInfo = 'patrol_wzgl_user'
export function getToken() { 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 { import {
getInfo getInfo
} from '../../api/user.js' } from '../../api/user.js'
import {
setWzglUser
} from '@/utils/auth.js'
export default { export default {
components: { components: {
@ -186,7 +183,6 @@
getInfo().then(response => { getInfo().then(response => {
console.log(response) console.log(response)
this.user = response this.user = response
setWzglUser(this.user)
}).catch(error => {}) }).catch(error => {})
this.start_time = this.recentTime(-14, 'yyyy-MM-dd') this.start_time = this.recentTime(-14, 'yyyy-MM-dd')
this.end_time = this.getNowDate() this.end_time = this.getNowDate()

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

@ -15,7 +15,7 @@
</div> </div>
</div> </div>
</template> </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">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>请示流程 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>请示流程
@ -330,7 +330,8 @@
}], }],
rukupiciList: [], rukupiciList: [],
form: { form: {
caigouhetong: '', caigouhetong: '',
qingshiliucheng:"",
gudingzichanbianhao: '', gudingzichanbianhao: '',
rukushijian: '', rukushijian: '',
// caigouhetong:'', // caigouhetong:'',
@ -669,8 +670,10 @@
}, },
async toQsFollow(id){ async toQsFollow(id){
let res = await getOatoken() let res = await getOatoken()
let url = 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') let seeBuy = window.open(url, 'seeBuy','location=0')
}, },
// //
@ -877,7 +880,8 @@
table_name: this.tableName table_name: this.tableName
}) })
this.form = { this.form = {
caigouhetong: res?.caigouhetong, caigouhetong: res?.caigouhetong,
qingshiliucheng:res?.qingshiliucheng,
gudingzichanbianhao: res?.gudingzichanbianhao, gudingzichanbianhao: res?.gudingzichanbianhao,
rukushijian: res?.rukushijian, rukushijian: res?.rukushijian,
rukuleixing: res?.rukuleixing, rukuleixing: res?.rukuleixing,
@ -888,7 +892,8 @@
beizhu: res?.beizhu, beizhu: res?.beizhu,
rukumingxi: '' rukumingxi: ''
} }
this.editHt = res?.caigouhetong this.editHt = res?.caigouhetong
this.editQs = res?.qingshiliucheng
this.mingxiList = res.id_stocks_items_stocks_id_relation this.mingxiList = res.id_stocks_items_stocks_id_relation
}, },
submit() { submit() {

@ -245,10 +245,11 @@
} }
let res = await getOatoken() let res = await getOatoken()
let url = 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', let seeBuy = window.open(url, 'seeBuy',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
) )
console.log(url)
}, },
async seeBidding() { async seeBidding() {
if (!this.detail?.invite_last_flow_id) { if (!this.detail?.invite_last_flow_id) {
@ -261,10 +262,11 @@
} }
let res = await getOatoken() let res = await getOatoken()
let url = 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', let seeBidding = window.open(url, 'seeBidding',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
) )
console.log(url)
}, },
async seeSignProcess() { async seeSignProcess() {
if (!this.detail?.join_last_flow_id) { if (!this.detail?.join_last_flow_id) {
@ -277,10 +279,11 @@
} }
let res = await getOatoken() let res = await getOatoken()
let url = 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', let seeSign = window.open(url, 'seeSign',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
) )
console.log(url)
}, },
async seeAskProcess() { async seeAskProcess() {
@ -292,12 +295,14 @@
}) })
return return
} }
let res = await getOatoken() let res = await getOatoken()
console.log(url)
let 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', let seeAsk = window.open(url, 'seeAsk',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
) )
console.log(url)
}, },
async getDetail(id) { async getDetail(id) {

@ -152,13 +152,6 @@
}, },
methods: { methods: {
async getUserName(){ 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 => { getInfo().then(res => {
for(var k of res.role){ for(var k of res.role){
if(k.name=='系统管理员'){ if(k.name=='系统管理员'){

Loading…
Cancel
Save