|
@@ -11,15 +11,22 @@ export const webSocket = {
|
|
console.log('WebSocket连接成功')
|
|
console.log('WebSocket连接成功')
|
|
}
|
|
}
|
|
webSocket.onmessage = async (e) => {
|
|
webSocket.onmessage = async (e) => {
|
|
- if(e.data.indexOf('{') == -1){
|
|
|
|
|
|
+ if (e.data.indexOf('{') == -1) {
|
|
return false
|
|
return false
|
|
- }
|
|
|
|
|
|
+ }
|
|
const { code, data, message } = JSON.parse(e.data)
|
|
const { code, data, message } = JSON.parse(e.data)
|
|
|
|
+
|
|
|
|
+ if (code == 903 || code == 600) {
|
|
|
|
+ if (data.complete) {
|
|
|
|
+ this.$message.success(`导入完成`)
|
|
|
|
+ } else {
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// 603导出专利完成605导出PDF完成
|
|
// 603导出专利完成605导出PDF完成
|
|
- if(code == 903 || code == 600|| code == 603|| code == 605){
|
|
|
|
|
|
+ if (code == 603 || code == 605) {
|
|
if (data.complete) {
|
|
if (data.complete) {
|
|
- this.$message.success(`导入完成`)
|
|
|
|
- }else{
|
|
|
|
|
|
+ this.$message.success(`导出完成`)
|
|
|
|
+ } else {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -33,45 +40,45 @@ export const webSocket = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-export const commonData={
|
|
|
|
|
|
+export const commonData = {
|
|
mounted() {
|
|
mounted() {
|
|
// this.DictMessage()
|
|
// this.DictMessage()
|
|
// this.getUserInfo()
|
|
// this.getUserInfo()
|
|
// this.getScenario()
|
|
// this.getScenario()
|
|
},
|
|
},
|
|
- methods:{
|
|
|
|
|
|
+ methods: {
|
|
//获取个人信息
|
|
//获取个人信息
|
|
getUserInfo() {
|
|
getUserInfo() {
|
|
this.$api.getUserInfo().then(response => {
|
|
this.$api.getUserInfo().then(response => {
|
|
localStorage.tenant = response.data.tenantId
|
|
localStorage.tenant = response.data.tenantId
|
|
this.$store.commit('SET_USERINFO', response.data)
|
|
this.$store.commit('SET_USERINFO', response.data)
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取字典项
|
|
//获取字典项
|
|
DictMessage() {
|
|
DictMessage() {
|
|
this.$api.getOsSystemDict([]).then(response => {
|
|
this.$api.getOsSystemDict([]).then(response => {
|
|
- this.$store.commit("SET_DictMessage",response.data)
|
|
|
|
|
|
+ this.$store.commit("SET_DictMessage", response.data)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取应用场景
|
|
//获取应用场景
|
|
- getScenario(){
|
|
|
|
|
|
+ getScenario() {
|
|
this.$api.getScenario().then(response => {
|
|
this.$api.getScenario().then(response => {
|
|
- this.$store.commit("SET_Scenario",response.data.data)
|
|
|
|
|
|
+ this.$store.commit("SET_Scenario", response.data.data)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取调查类型
|
|
//获取调查类型
|
|
- getMatter(){
|
|
|
|
|
|
+ getMatter() {
|
|
this.$api.getMatter([]).then(response => {
|
|
this.$api.getMatter([]).then(response => {
|
|
- this.$store.commit("SET_Matter",response.data.data)
|
|
|
|
|
|
+ this.$store.commit("SET_Matter", response.data.data)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取权限
|
|
//获取权限
|
|
- getPermissionList(){
|
|
|
|
|
|
+ getPermissionList() {
|
|
var code = "e424f3cc4f8138f0f68bef092b92212f;6a8d3f4d1d5f11eda41c00163e2f0200"
|
|
var code = "e424f3cc4f8138f0f68bef092b92212f;6a8d3f4d1d5f11eda41c00163e2f0200"
|
|
- this.$api.getPermissionList({code:code}).then(response=>{
|
|
|
|
|
|
+ this.$api.getPermissionList({ code: code }).then(response => {
|
|
this.$store.commit('SET_PERMISSION', response.data)
|
|
this.$store.commit('SET_PERMISSION', response.data)
|
|
- }).catch(error=>{
|
|
|
|
|
|
+ }).catch(error => {
|
|
this.$store.commit('SET_PERMISSION', [])
|
|
this.$store.commit('SET_PERMISSION', [])
|
|
})
|
|
})
|
|
},
|
|
},
|