更新页面
This commit is contained in:
@ -60,8 +60,6 @@ const filesList = ref({});
|
||||
const baseUrl = ref('')//上传地址
|
||||
const modelUrl = ref('')//下载模板地址
|
||||
watch(()=>props.lx,(val)=>{
|
||||
let url = ''
|
||||
let moyRL = ''
|
||||
switch (val) {
|
||||
case 'policeF':
|
||||
baseUrl.value = '/mosty-api/mosty-jcgl/tbJcglXfll/importData'
|
||||
@ -79,6 +77,10 @@ watch(()=>props.lx,(val)=>{
|
||||
baseUrl.value = '/mosty-api/mosty-jcgl/tpjcglZnzb/importData'
|
||||
modelUrl.value = '/mosty-api/mosty-jcgl/tpjcglZnzb/importTemplate'
|
||||
break;
|
||||
case 'fjnr':
|
||||
baseUrl.value = '/mosty-api/mosty-gsxt/tbGsxtRqfjNr/importFxnr'
|
||||
// modelUrl.value = '/mosty-api/mosty-jcgl/tpjcglZnzb/importTemplate'
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -126,8 +128,8 @@ function onComfirm() {
|
||||
let formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("updateSupport", isSelect.value);
|
||||
axios.post(baseUrl.value, formData, {"Content-type": "multipart/form-data"})
|
||||
.then((res) => {
|
||||
let token = localStorage.getItem('token')
|
||||
axios.post(baseUrl.value, formData, {"Content-type": "multipart/form-data",headers:{"Authorization": `${token}`}}).then((res) => {
|
||||
if (res.status == 200) {
|
||||
let { data, message, code } = res.data;
|
||||
if (code == -1) ElMessage({ type:'warning', message:message, dangerouslyUseHTMLString:true });
|
||||
@ -174,6 +176,6 @@ function onComfirm() {
|
||||
</style>
|
||||
<style>
|
||||
.el-upload-list__item-name {
|
||||
color: #fff;
|
||||
color: #0072ff;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user