From fb6f530bc0e0302d75f690752bf8ca4ac722400e Mon Sep 17 00:00:00 2001 From: "DESKTOP-00SUCB6\\Administrator" Date: Mon, 26 Apr 2021 14:39:07 +0800 Subject: [PATCH] no message --- public/config.js | 4 +- src/views/get/addGet.vue | 71 ++++++++++++++++++++-------- src/views/get/get.vue | 25 +++++----- src/views/send/send.vue | 8 ++-- src/views/systemManage/whiteList.vue | 12 +++-- 5 files changed, 76 insertions(+), 44 deletions(-) diff --git a/public/config.js b/public/config.js index b3b4a2a..5fdb086 100644 --- a/public/config.js +++ b/public/config.js @@ -5,8 +5,8 @@ // SHOW_URL: "http://www.fatoaniic.com/ftpfile/", // } config = { - API_URL: 'http://121.36.65.171:9999', - // API_URL: 'http://172.119.50.59:8081', + // API_URL: 'http://121.36.65.171:9999', + API_URL: 'http://172.119.50.59:8081', UPLOAD_URL: "http://61.135.192.42:8082/attachment/uploadOne", DOWNLOAD_URL: "http://61.135.192.42:8082/api-ftp/ftp/download?filename=", diff --git a/src/views/get/addGet.vue b/src/views/get/addGet.vue index 4a6965c..0e9bbb0 100644 --- a/src/views/get/addGet.vue +++ b/src/views/get/addGet.vue @@ -3,10 +3,10 @@
- 123123123 + {{num}} - 2021-05-01 + {{theGetTime}} 发码总数:{{AllData.sendTotal}} @@ -23,9 +23,9 @@ > @@ -34,11 +34,10 @@ > @@ -48,9 +47,9 @@ > @@ -76,6 +75,7 @@ import { addFetchList } from "@/api/get" +import { getWhitelist } from "@/api/user" export default { name: "addGet", data() { @@ -86,35 +86,64 @@ export default { getTotal:'40000万', otherTotal:'50000万', }, + id:this.$route.query.id || "", + num:'FMD_'+new Date().getTime(), + theGetTime:new Date().toLocaleDateString() + ' ' + new Date().toTimeString().split(" ")[0], paramsForm:{ - params: [ - {describe:'aaa',number:123,company:'公司1'} - ], + params: [], paramsRules:{ - company:[ + whitelist_id:[ {required: true, message: '请选择公司', trigger: 'change'} ], - number:[ + fetch_count:[ {required: true,type:'number', message: '请输入取码数量', trigger: 'blur'} ], } - } - //表格数据 + }, + whiteList:[] }; }, mounted() { + this.getCompanyList() }, methods: { + getCompanyList(){ + const params = { + pageNo: 1, + pageSize: 1000, + } + + getWhitelist(params).then(res => { + this.whiteList = res.data.list + }) + }, addRowData(){ - this.paramsForm.params.push({describe:'',number:'',company:''}) + this.paramsForm.params.push({summary:'',fetch_count:'',whitelist_id:''}) }, deleteData(index){ this.paramsForm.params.splice(index,1) }, + addFetch(){ + const params = { + fetch_time:this.theGetTime, + fetch_id:this.num, + list:this.paramsForm.params + } + addFetchList(params).then(res => { + this.$message({ + message: res.msg, + type: res.code == 200 ? 'success' : 'error' + }); + this.$router.go(-1); + }).catch(err => { + console.log(err); + }) + }, //form提交检验 submitForm(formName) { this.$refs[formName].validate((valid) => { if (valid) { + this.addFetch() } else { console.log('error submit!!'); return false; diff --git a/src/views/get/get.vue b/src/views/get/get.vue index f930a1b..871c225 100644 --- a/src/views/get/get.vue +++ b/src/views/get/get.vue @@ -6,6 +6,7 @@
- - - - - - + + + + + + - + @@ -122,7 +123,7 @@ export default { }, //点击创建取码单 addGetDialog(id){ - this.$router.push({name:'addGet'}) + this.$router.push({name:'addGet',query:{id:id}}) }, //每页条数变化 handleSizeChange(val) { diff --git a/src/views/send/send.vue b/src/views/send/send.vue index 125747a..71dfe14 100644 --- a/src/views/send/send.vue +++ b/src/views/send/send.vue @@ -34,9 +34,9 @@

- - - + + +