|
|
@ -1,3 +1,12 @@ |
|
|
|
<!-- |
|
|
|
* @Author: mk 2403457699@qq.com |
|
|
|
* @Date: 2023-09-05 19:39:02 |
|
|
|
* @LastEditors: mk 2403457699@qq.com |
|
|
|
* @LastEditTime: 2023-09-06 13:35:51 |
|
|
|
* @Description: 介绍一下改动了什么 |
|
|
|
* |
|
|
|
* |
|
|
|
--> |
|
|
|
<template> |
|
|
|
<div class="write-container"> |
|
|
|
<h1 id="inActiveTime" |
|
|
@ -85,7 +94,9 @@ export default { |
|
|
|
orgName: '',//人员所属组织名【组织-组织,组织-部门,组织-网格】 |
|
|
|
orgType: '',//人员所属类型(组织:agency;部门:dept;网格:grid) |
|
|
|
realName: '',//填写人姓名 |
|
|
|
accessKey: '' |
|
|
|
accessKey: '', |
|
|
|
anonymous:'', |
|
|
|
agencyId: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
metaInfo: { |
|
|
@ -107,8 +118,15 @@ export default { |
|
|
|
|
|
|
|
console.log('微信传入token') |
|
|
|
const token = this.$route.query.token |
|
|
|
const agencyId = this.$route.query.agencyId |
|
|
|
|
|
|
|
this.anonymous = this.$route.query.anonymous |
|
|
|
this.agencyId = agencyId; |
|
|
|
|
|
|
|
console.log('anonymous',this.anonymous); |
|
|
|
if (token) { |
|
|
|
this.$store.dispatch('user/setTokens', token) |
|
|
|
this.$store.dispatch('user/setAgencyId', agencyId) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -297,10 +315,14 @@ export default { |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(255, 255, 255, 0.5)' |
|
|
|
}) |
|
|
|
|
|
|
|
console.log('提交获取agencyId',this.$store.state.agencyId); |
|
|
|
// 完成时间 |
|
|
|
let inActiveTime = document.getElementById('inActiveTime').innerText |
|
|
|
await this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/result/create?access_key=${this.accessKey}`, { |
|
|
|
let url = this.anonymous == '1'?`/user/project/result/createAnonymously`:`/user/project/result/create?access_key=${this.accessKey}&` |
|
|
|
|
|
|
|
// debugger |
|
|
|
|
|
|
|
await this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}${url}`, { |
|
|
|
'completeTime': inActiveTime, |
|
|
|
'projectKey': this.projectConfig.projectKey, |
|
|
|
'submitOs': ua.os.name, |
|
|
@ -315,10 +337,21 @@ export default { |
|
|
|
'orgName': this.orgName,//人员所属组织名【组织-组织,组织-部门,组织-网格】 |
|
|
|
'orgType': this.orgType,//人员所属类型(组织:agency;部门:dept;网格:grid) |
|
|
|
'realName': this.realName,//填写人姓名 |
|
|
|
'agencyId': this.agencyId |
|
|
|
//'accessKey':this.accessKey |
|
|
|
}).then((res) => { |
|
|
|
|
|
|
|
if(res.code==0){ |
|
|
|
this.writeStatus = 2 |
|
|
|
|
|
|
|
}else{ |
|
|
|
console.log('不等于0',res.msg); |
|
|
|
this.$message( |
|
|
|
{ |
|
|
|
message: res.msg, |
|
|
|
type: 'warning' |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
if (this.userProjectSetting.submitJumpUrl) { |
|
|
|
setTimeout(() => { |
|
|
|
window.location.replace(this.userProjectSetting.submitJumpUrl) |
|
|
@ -326,8 +359,14 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
(msg) => { |
|
|
|
(err) => { |
|
|
|
// debugger |
|
|
|
this.$message( |
|
|
|
{ |
|
|
|
message: err.msg, |
|
|
|
type: 'warning' |
|
|
|
} |
|
|
|
) |
|
|
|
}) |
|
|
|
// debugger |
|
|
|
loading.close() |
|
|
|