Commit ad506975 authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents a04b5e83 f08e5544
...@@ -40,3 +40,15 @@ export function delGeneral(id) { ...@@ -40,3 +40,15 @@ export function delGeneral(id) {
}); });
} }
export function uploadFiles(params) {
return fetch({
url: '/api/universal/file/app/unauth/uploadFiles',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
data: params
});
}
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
<!-- banner modal弹窗 --> <!-- banner modal弹窗 -->
<el-dialog :title="modalTitle" :visible.sync="dialogVisible"> <el-dialog :title="modalTitle" :visible.sync="dialogVisible" :before-close="handleDialogClose">
<el-form :model="dialogFrom" :rules="rules" ref="dialogFrom" label-width="90px"> <el-form :model="dialogFrom" :rules="rules" ref="dialogFrom" label-width="90px">
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input v-model="dialogFrom.title" placeholder="请输入标题"></el-input> <el-input v-model="dialogFrom.title" placeholder="请输入标题"></el-input>
...@@ -75,6 +75,20 @@ ...@@ -75,6 +75,20 @@
<el-button v-else type="primary" @click="update('dialogFrom')">确 定</el-button> <el-button v-else type="primary" @click="update('dialogFrom')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--多图上传-->
<!--<el-upload-->
<!--:multiple="multiple"-->
<!--action="${pageContext.request.contextPath}/lookup/editEvidence/123"-->
<!--list-type="picture-card"-->
<!--:auto-upload="false"-->
<!--:http-request="uploadFile"-->
<!--ref="upload"-->
<!--&gt;-->
<!--<i class="el-icon-plus"></i>-->
<!--</el-upload>-->
<!--<el-button @click="subPicForm">提交上传</el-button>-->
</div> </div>
</template> </template>
<style> <style>
...@@ -101,7 +115,8 @@ ...@@ -101,7 +115,8 @@
page, page,
addGeneral, addGeneral,
editGeneral, editGeneral,
delGeneral delGeneral,
uploadFiles
} from 'api/base_info/general'; } from 'api/base_info/general';
import rsCode from '../../utils/rsCode'; import rsCode from '../../utils/rsCode';
...@@ -126,6 +141,8 @@ ...@@ -126,6 +141,8 @@
}, },
data() { data() {
return { return {
multiple:true,
formDate:"",
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20 limit: 20
...@@ -205,15 +222,22 @@ ...@@ -205,15 +222,22 @@
}); });
}, },
/**
* 点击 X 关闭对话框的回调
**/
handleDialogClose() {
this.activeName2 = "";
this.dialogVisible = false;
},
/** /**
* 操作-编辑 * 操作-编辑
* */ * */
handleUpdate(row) { handleUpdate(row) {
this.modalTitle = '编辑'; this.modalTitle = '编辑';
this.dialogVisible = true; this.dialogVisible = true;
this.activeName2 = "first";
this.cleanDialogFrom(); this.cleanDialogFrom();
this.dialogFrom = row; this.dialogFrom = row;
this.activeName2 = "first";
}, },
/** /**
* 弹框-取消 * 弹框-取消
...@@ -221,6 +245,7 @@ ...@@ -221,6 +245,7 @@
cancelHandel(){ cancelHandel(){
this.cleanDialogFrom(); this.cleanDialogFrom();
this.dialogVisible = false; this.dialogVisible = false;
this.activeName2 = "";
}, },
/** /**
* 新建、编辑清空表单 * 新建、编辑清空表单
...@@ -230,7 +255,8 @@ ...@@ -230,7 +255,8 @@
title: "", title: "",
type: undefined, type: undefined,
value:"" value:""
} };
this.activeName2 = "";
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
...@@ -345,6 +371,24 @@ ...@@ -345,6 +371,24 @@
} }
}); });
}, },
uploadFile(file){
this.formDate.append('files', file.file);
},
subPicForm(){
this.formDate = new FormData()
this.$refs.upload.submit();
this.formDate.append('WS_CODE', "12133");
let config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
uploadFiles(this.formDate).then( res => {
console.log(res)
}).catch( res => {
console.log(res)
})
}
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment