|
@@ -73,22 +73,22 @@ export default {
|
|
|
this.$refs.uForm.setRules(this.rules);
|
|
|
},
|
|
|
methods: {
|
|
|
- downDocx(url){
|
|
|
+ downDocx(url) {
|
|
|
uni.downloadFile({
|
|
|
- url: this.$method.splitImgHost(url),
|
|
|
- success: (res) => {
|
|
|
- if (res.statusCode === 200) {
|
|
|
- console.log(this.$method.splitImgHost(url))
|
|
|
- this.$method.showToast("下载成功")
|
|
|
- }
|
|
|
- }
|
|
|
+ url: this.$method.splitImgHost(url),
|
|
|
+ success: res => {
|
|
|
+ if (res.statusCode === 200) {
|
|
|
+ console.log(this.$method.splitImgHost(url));
|
|
|
+ this.$method.showToast('下载成功');
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
clearWord() {
|
|
|
this.$set(this.form, 'commitment_seal', '');
|
|
|
},
|
|
|
uploadFieds() {
|
|
|
- var self = this
|
|
|
+ var self = this;
|
|
|
wx.chooseMessageFile({
|
|
|
count: 1,
|
|
|
size: 2097152,
|
|
@@ -110,15 +110,24 @@ export default {
|
|
|
async submitApi() {
|
|
|
var data = JSON.parse(JSON.stringify(this.form));
|
|
|
if (data['commitment_seal']) {
|
|
|
+ console.log(123);
|
|
|
data.commitment_seal = await this.$method.uploadFile(data.commitment_seal, 0);
|
|
|
+ } else {
|
|
|
+ console.log(456);
|
|
|
}
|
|
|
- var concatData = {}
|
|
|
- Object.assign(concatData,this.copyData,data)
|
|
|
+ var concatData = {};
|
|
|
+ Object.assign(concatData, this.copyData, data);
|
|
|
console.log(concatData);
|
|
|
},
|
|
|
//验证表单
|
|
|
resultForm(int) {
|
|
|
if (this.openVerify) {
|
|
|
+ for (let i = 0; i < this.listData.length; i++) {
|
|
|
+ if (this.listData[i].fieldKey === 'commitment_seal' && !this.listData[i].required) {
|
|
|
+ this.submitApi();
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
if (int === 1) {
|