首页数据提交

20240205
e 3 years ago
parent 98e1655647
commit 1be55e5016
  1. 4
      src/api/api.js
  2. 8
      src/components/case/index.vue
  3. 51
      src/pages/counter/list/index.vue

@ -2,10 +2,10 @@ import axios from 'axios';
import router from '../router'; import router from '../router';
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: "http://39.108.250.202:9000/", // 中台测试服 baseURL: "http://39.108.250.202:9000/", // 中台测试服
// baseURL: "http://192.168.31.137:9000/", // 赓 // baseURL: "http://192.168.31.137:9000/", // 赓
// baseURL: "http://192.168.31.151:9000/", // 榕 // baseURL: "http://192.168.31.151:9000/", // 榕
baseURL: "http://192.168.31.125:9000/", // 坤 // baseURL: "http://192.168.31.125:9000/", // 坤
// baseURL: 'http://39.108.250.202:9000', // baseURL: 'http://39.108.250.202:9000',
timeout: 30000 // 请求超时时间 timeout: 30000 // 请求超时时间
}) })

@ -300,9 +300,9 @@ export default {
let systemId = sessionStorage.getItem('systemId') let systemId = sessionStorage.getItem('systemId')
let cid = sessionStorage.getItem('cid') let cid = sessionStorage.getItem('cid')
let params = { let params = {
"accountId": 0, // "accountId": 0,
"classId": 0, // "classId": 0,
"className":0, // "className":0,
"curriculumId":+cid, "curriculumId":+cid,
"endTime": this.actEndTime, "endTime": this.actEndTime,
"lcId": lcld, "lcId": lcld,
@ -313,7 +313,7 @@ export default {
"startTime": +startTime, "startTime": +startTime,
"submitTime": this.actEndTime, "submitTime": this.actEndTime,
"systemId": systemId, "systemId": systemId,
"timeSum": 0 // "timeSum": 0
} }
submit(params).then((data)=>{ submit(params).then((data)=>{
if(data.status == 200){ if(data.status == 200){

@ -204,7 +204,7 @@ export default {
callback(new Error('请输入密码')); callback(new Error('请输入密码'));
} else { } else {
if (this.passwordForm.password&&/^[0-9]*$/.test(this.passwordForm.password)&&this.passwordForm.password.length===6) { if (this.passwordForm.password&&/^[0-9]*$/.test(this.passwordForm.password)&&this.passwordForm.password.length===6) {
this.$refs.passwordForm.validateField('password'); // this.$refs.passwordForm.validateField('password');
callback(); callback();
}else{ }else{
callback(new Error('请注意密码格式以及密码长度')) callback(new Error('请注意密码格式以及密码长度'))
@ -359,7 +359,17 @@ export default {
} }
}, },
mounted(){ mounted(){
this.getQueryVariable() let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
if (token != null){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
}else{
}
// Promise.resolve(2).then(value=>{ // Promise.resolve(2).then(value=>{
// console.log(111,value) // console.log(111,value)
// return value // return value
@ -446,22 +456,17 @@ export default {
}); });
}, },
methods: { methods: {
getQueryVariable(variable) { getQueryVariable(name) {
// var query = window.location.href; var reg = new RegExp('(^|&)'+name+'=([^&]*)(&|$)')
// var vars = query.split("?"); if( window.location.href.split('?')[1]){
// if (vars.length <= 0){ var r = window.location.href.split('?')[1].match(reg)
// for (var i=1;i<vars.length;i++) { if (r != null){
// var pair = vars[i].split("&"); return (r[2])
// if(pair[0] == variable){return pair[1];} }else{
// } return null
// for (var j=0;j<pair.length;j++){ }
// var index=pair[j].lastIndexOf("="); }
// pair[j]=pair[j].substring(index+1,pair[j].length);
// }
// sessionStorage.setItem('token', pair[0])
// sessionStorage.setItem('cid', pair[1])
// sessionStorage.setItem('systemId', pair[2])
// }
}, },
toggleGoods() { toggleGoods() {
this.showGoods = !this.showGoods; this.showGoods = !this.showGoods;
@ -579,9 +584,15 @@ export default {
this.goodsShelfTotalData = this.auditGoodsShelf this.goodsShelfTotalData = this.auditGoodsShelf
let formExternalData = { let formExternalData = {
openAccount:{ openAccount:{
voucherNumber:this.receptionList, voucherNumber:[],
paymentCode:this.passwordForm.passwordAgain, paymentCode: '',
}
}
if (this.receptionList.length){
formExternalData.openAccount.voucherNumber = this.receptionList
} }
if (this.paymentCode.length){
formExternalData.openAccount.paymentCode = this.passwordForm.passwordAgain
} }
sessionStorage.setItem('formExternalData', JSON.stringify(formExternalData)) sessionStorage.setItem('formExternalData', JSON.stringify(formExternalData))
} }

Loading…
Cancel
Save