| @@ -50,7 +50,7 @@ | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | |||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
| <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
| <van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
| @@ -136,35 +136,17 @@ | |||||
| onSubmit(){ | onSubmit(){ | ||||
| console.log(this.openFile) | console.log(this.openFile) | ||||
| console.log(this.openPic) | console.log(this.openPic) | ||||
| this.openFile.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPic.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| openAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| openAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -178,9 +160,19 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPic.push(file.file); | this.openPic.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | console.log(file) | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -1,7 +1,7 @@ | |||||
| <template> | <template> | ||||
| <div class="home_wrapper"> | <div class="home_wrapper"> | ||||
| <div class="header_main"> | <div class="header_main"> | ||||
| 新增财务公开 | |||||
| 修改财务公开 | |||||
| <div class="return_btn" @click="onClickLeft"></div> | <div class="return_btn" @click="onClickLeft"></div> | ||||
| <div class="add_btn"></div> | <div class="add_btn"></div> | ||||
| </div> | </div> | ||||
| @@ -164,37 +164,17 @@ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onSubmit(){ | onSubmit(){ | ||||
| this.openFileList.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPicList.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| console.log(that.form.openFile) | |||||
| console.log(that.form.openPic) | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| openEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| openEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -208,9 +188,19 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPicList.push(file.file); | this.openPicList.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | console.log(file) | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -50,7 +50,7 @@ | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | |||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
| <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
| <van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
| @@ -141,37 +141,17 @@ | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| onSubmit(){ | onSubmit(){ | ||||
| console.log(this.openFile) | |||||
| console.log(this.openPic) | |||||
| this.openFile.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPic.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| majorEventOpenAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| majorEventOpenAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -185,9 +165,19 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPic.push(file.file); | this.openPic.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | console.log(file) | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -170,37 +170,17 @@ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onSubmit(){ | onSubmit(){ | ||||
| this.openFileList.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPicList.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| console.log(that.form.openFile) | |||||
| console.log(that.form.openPic) | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| majorEventOpenEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| majorEventOpenEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -214,9 +194,18 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPicList.push(file.file); | this.openPicList.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -50,7 +50,7 @@ | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple style="margin-top: 10PX" /> | |||||
| <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | |||||
| <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
| <van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
| @@ -134,37 +134,17 @@ | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| onSubmit(){ | onSubmit(){ | ||||
| console.log(this.openFile) | |||||
| console.log(this.openPic) | |||||
| this.openFile.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPic.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| tempWorkerOpenAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| tempWorkerOpenAdd(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '新增成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -178,9 +158,18 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPic.push(file.file); | this.openPic.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -164,37 +164,17 @@ | |||||
| }) | }) | ||||
| }, | }, | ||||
| onSubmit(){ | onSubmit(){ | ||||
| this.openFileList.map(res=>{ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| this.openPicList.map(res=>{ | |||||
| console.log(res) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", res); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }) | |||||
| var that = this; | var that = this; | ||||
| setTimeout(function(){ | |||||
| console.log(that.form.openFile) | |||||
| console.log(that.form.openPic) | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| tempWorkerOpenEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| },2000); | |||||
| that.form.openFile = that.openFile2.join(',') | |||||
| that.form.openPic = that.openPic2.join(',') | |||||
| tempWorkerOpenEdit(that.form).then((r1) => { | |||||
| if (r1.code == 200){ | |||||
| that.$notify({ type: 'success', message: '修改成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmOpenNy(data){ | onConfirmOpenNy(data){ | ||||
| this.form.openNy = this.format(data,'yyyy-MM'); | this.form.openNy = this.format(data,'yyyy-MM'); | ||||
| @@ -208,9 +188,18 @@ | |||||
| afterRead(file) { | afterRead(file) { | ||||
| // 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
| this.openPicList.push(file.file); | this.openPicList.push(file.file); | ||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openPic2.push(r1.fileName); | |||||
| }) | |||||
| }, | }, | ||||
| afterReadOpenFile(file){ | afterReadOpenFile(file){ | ||||
| console.log(file) | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| this.openFile2.push(r1.fileName); | |||||
| }) | |||||
| let name = file.file.name; | let name = file.file.name; | ||||
| let type = ''; | let type = ''; | ||||
| if (name.indexOf('.doc') > -1){ | if (name.indexOf('.doc') > -1){ | ||||
| @@ -52,26 +52,19 @@ | |||||
| <div class="clear"></div> | <div class="clear"></div> | ||||
| </div> | </div> | ||||
| <!-- <div class="list_main">--> | |||||
| <!-- <van-list--> | |||||
| <!-- v-model="loading"--> | |||||
| <!-- :finished="finished"--> | |||||
| <!-- finished-text="没有更多了"--> | |||||
| <!-- @load="getList"--> | |||||
| <!-- >--> | |||||
| <!-- <div class="item" v-for="(item,index) in applicationList" :key="index">--> | |||||
| <!-- <div class="info" @click="goDetail(item.id)">--> | |||||
| <!-- <div class="title">--> | |||||
| <!-- <i class="icon_box"></i>--> | |||||
| <!-- <p class="news_title">{{item.openName}}</p>--> | |||||
| <!-- </div>--> | |||||
| <!-- <div class="time red green">--> | |||||
| <!-- +¥100.00--> | |||||
| <!-- </div>--> | |||||
| <!-- </div>--> | |||||
| <!-- </div>--> | |||||
| <!-- </van-list>--> | |||||
| <!-- </div>--> | |||||
| <div class="box1"> | |||||
| <div class="wrap"> | |||||
| <ul> | |||||
| <li>1移动端</li> | |||||
| <li>2可滑动</li> | |||||
| <li>3ie8以上</li> | |||||
| <li>4</li> | |||||
| <li>5</li> | |||||
| </ul> | |||||
| </div> | |||||
| </div> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -141,6 +134,28 @@ | |||||
| </script> | </script> | ||||
| <style scoped lang="scss"> | <style scoped lang="scss"> | ||||
| .box1{ | |||||
| width: 100PX; | |||||
| height: 60PX; | |||||
| overflow: hidden;/* 超出隐藏滚动条 */ | |||||
| background-color: skyblue; | |||||
| } | |||||
| .box1 .wrap{ | |||||
| width: 100PX;/* 和父盒子宽度一样 */ | |||||
| height: 76PX;/* 比里层元素高16px 为了隐藏滚动条*/ | |||||
| overflow-x: scroll;/* 定义超出此盒子滚动 */ | |||||
| overflow-y: hidden; | |||||
| } | |||||
| .box1 .wrap ul{ | |||||
| width: 300PX; | |||||
| display: flex; | |||||
| } | |||||
| .box1 .wrap ul li{ | |||||
| flex: 1; | |||||
| width: 60PX; | |||||
| height: 60PX; | |||||
| box-sizing: border-box; | |||||
| } | |||||
| .home_wrapper{ | .home_wrapper{ | ||||
| background: #e9e9e9; | background: #e9e9e9; | ||||
| min-height: 100vh; | min-height: 100vh; | ||||