gaoshuguang 1 year ago
parent 9b6a687a66
commit 83fc704143

@ -78,8 +78,6 @@ public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor {
//properties.setProperty("DownloadPath", properties.getProperty("DownloadPath") + File.separator + "DownloadFilePath");
//当前程序的站级别1-为站 2-为分中心,4-联网中心
properties.setProperty("UserType", UserType);
//nfs地址
properties.setProperty("NFSFilePath", properties.getProperty("NFSFilePath") == null ? "/usr/sg/nfsfile/" + PathUtil.webName : properties.getProperty("NFSFilePath") + File.separator + PathUtil.webName);
//分中心编号 站编号
properties.setProperty("UserStaNO", UserStaNO);
properties.setProperty("socketPort", Newproperties.getProperty("socketPort"));

@ -52,7 +52,7 @@ public class DcomTreeController {
selectParams.clear();
selectParams.put("ROADNO", SFZTree.get(k).get("ROADNO"));
selectParams.put("STANO", SFZTree.get(k).get("STANO"));
List<Map<String, Object>> CDTree = managerService.selectCD(selectParams);
List<Map<String, Object>> CDTree = managerService.selectJTCD(selectParams);
for (int m = 0; m < CDTree.size(); m++) {
CDTree.get(m).put("id", CDTree.get(m).get("ROADNO") + CDTree.get(m).get("STANO").toString() + CDTree.get(m).get("PORTNO").toString());
CDTree.get(m).put("label", getLaber2(CDTree.get(m)));

@ -21,6 +21,7 @@ public interface TreeMapper extends BaseMapper<List<Map<String, Object>>> {
List<Map<String, Object>> selectSFZ(Map<String, Object> selectParams);
List<Map<String, Object>> selectCD(Map<String, Object> selectParams);
List<Map<String, Object>> selectJTCD(Map<String, Object> selectParams);
//String selectPortType(String portType);
List<Map<String, Object>> selectLWZXNMGLWADMIN(Map<String, Object> params);

@ -120,5 +120,22 @@
</if>
</where>
</select>
<select id="selectJTCD" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
*
FROM
SETUP_TABLE_JAVA SETUP
LEFT JOIN PORTTYPE_TEXT PORYTYPE ON SETUP.PORTTYPE= PORYTYPE.VALUE
<where>
PORTIP IS
NOT NULL
<if test="ROADNO != null and ROADNO != ''">
AND ROADNO = ${ROADNO}
</if>
<if test="STANO != null and STANO != ''">
AND STANO = ${STANO}
</if>
</where>
</select>
</mapper>

@ -16,6 +16,7 @@ public interface ManagerService {
List<Map<String, Object>> selectSFZ(Map<String, Object> selectParams);
List<Map<String, Object>> selectJTSFZ(Map<String, Object> selectParams);
List<Map<String, Object>> selectCD(Map<String, Object> selectParams);
List<Map<String, Object>> selectJTCD(Map<String, Object> selectParams);
//String selectPortType(String portType);
/**
*NMGLWADMINNAME_TABLE_DCOM

@ -49,6 +49,11 @@ public class ManagerServiceImpl implements ManagerService {
return treeMapper.selectCD(selectParams);
}
@Override
public List<Map<String, Object>> selectJTCD(Map<String, Object> selectParams) {
return treeMapper.selectJTCD(selectParams);
}
/**
* NMGLWADMINNAME_TABLE_DCOM
*/

@ -99,6 +99,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
* @author: shuguang
@ -356,9 +357,9 @@ public class ManualIssueServiceImpl implements ManualIssueService {
//String ip = "8.142.95.188";
log.info("[uuid:{}]-下发程序ip{},端口号:{}", uuid, ip, tomcatPort);
//ALLROADMINFEE#站编码.SQB0.280.29需要,普通的车道应该还是不带站编码
//if (Constant.ZHY_IP_LIST.contains(ip)) {
// paraName = paraName.replace(Constant.STR_SQB, "#" + staNo + Constant.STR_SQB);
//}
if (Constant.ZHY_IP_LIST.contains(ip)) {
paraName = paraName.replace(Constant.STR_SQB, "#" + staNo + Constant.STR_SQB);
}
if (paraName.contains("#")) {
paraName = paraName.split("#")[0] + "#" + roadNo + "#" + staNo + Constant.STR_SQB;
} else {
@ -561,6 +562,8 @@ public class ManualIssueServiceImpl implements ManualIssueService {
sqlStr = cmsParameter.getOraStr();
}
String newName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_ZLIB;
if (StringUtils.isNotBlank(sqlStr) && paraId != 2) {
List<Map<String, Object>> mapList = sysMapper.selectList(sqlStr);
CreateDbfUtil.createDbfFile(uuid, paraId, fileName, mapList, DownloadPath);
@ -582,82 +585,128 @@ public class ManualIssueServiceImpl implements ManualIssueService {
+ Constant.WEBSERVICE_BACK;
}
if (list != null && list.size() > 0) {
for (SetUpTable setUpTable : list) {
if (StringUtils.isNotBlank(setUpTable.getPORTIP())) {
//路段号
Integer roadNo = setUpTable.getROADNO();
// 站编码
Integer staNo = setUpTable.getSTANO();
//paraId=2需要路段号和站编号下发时根据路段号和站编号做替换
if (paraId == 2) {
if (Constant.STR_ONE.equals(DBType)) {
sqlStr = cmsParameter.getSqlStr();
} else if (Constant.STR_TWO.equals(DBType)) {
sqlStr = cmsParameter.getOraStr();
} else if (Constant.STR_FOUR.equals(DBType)) {
sqlStr = cmsParameter.getOraStr();
String isNmgGs = PropertiesUtil.getValue("isNmgGs");
//判断是否是高路公司管辖指定的站系统
if(Constant.STR_ONE.equals(isNmgGs)){
// 获取所有唯一的 stano 值并拼接成字符串
String stanoString = list.stream()
.map(SetUpTable::getSTANO)
.distinct() // 去除重复
.map(Object::toString) // 转换为字符串
.collect(Collectors.joining(","));
if (paraId == 2) {
sqlStr = sqlStr.replace("%STANO%", stanoString);
}
List<Map<String, Object>> mapList = sysMapper.selectList(sqlStr);
CreateDbfUtil.createDbfFile(uuid, paraId, fileName, mapList, DownloadPath);
ZLibUtils.compressFile(DownloadPath + File.separator + fileName, DownloadPath + File.separator + newName, uuid);
//MD5
md5 = MD5Util.getMd5ByFilePath(DownloadPath + File.separator + newName);
String zlibName = newName.replace(Constant.STR_ZLIB, Constant.STR_ + md5 + Constant.STR_ZLIB);
String oldPath = DownloadPath + File.separator + newName;
String newPath = DownloadPath + File.separator + zlibName;
FileUtil.copyFile(oldPath, newPath);
//下载文件地址
downUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.INTERFACE_DOWN + EncryptionInfo.decodeLock(zlibName);
//回调地址
backUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.WEBSERVICE_BACK;
for (SetUpTable setUpTable : list) {
if (StringUtils.isNotBlank(setUpTable.getPORTIP())) {
//路段号
Integer roadNo = setUpTable.getROADNO();
// 站编码
Integer staNo = setUpTable.getSTANO();
//查询站的IP和程序的端口号
QueryWrapper<NameTableDcom> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("ROADNO", roadNo)
.eq("STANO", staNo);
NameTableDcom nameTableDcom = nameTableDcomMapper.selectOne(queryWrapper);
unifiedMethod(uuid, nameTableDcom, setUpTable, lastNum, protocolType, man, decryptManNo,
fileName, paraName, isZlib, ip, downUrl, backUrl, md5, version, isDate);
}
}
}else {
for (SetUpTable setUpTable : list) {
if (StringUtils.isNotBlank(setUpTable.getPORTIP())) {
//路段号
Integer roadNo = setUpTable.getROADNO();
// 站编码
Integer staNo = setUpTable.getSTANO();
//paraId=2需要路段号和站编号下发时根据路段号和站编号做替换
if (paraId == 2) {
if (Constant.STR_ONE.equals(DBType)) {
sqlStr = cmsParameter.getSqlStr();
} else if (Constant.STR_TWO.equals(DBType)) {
sqlStr = cmsParameter.getOraStr();
} else if (Constant.STR_FOUR.equals(DBType)) {
sqlStr = cmsParameter.getOraStr();
}
Date now2 = new Date();
//FileUtil.delFile(new File(DownloadPath + File.separator + fileName));
version = DateTimeUtil.getFormateString(now2, Constant.MMDDHHMMSSSSS);
//version = staNo + DateTimeUtil.getFormateString(now2, Constant.YYMMDD);
newName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_ZLIB;
String newFileName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_DBF;
sqlStr = sqlStr.replace("%ROADNO%", String.valueOf(roadNo)).replace("%STANO%", String.valueOf(staNo));
List<Map<String, Object>> mapList = sysMapper.selectList(sqlStr);
CreateDbfUtil.createDbfFile(uuid, paraId, fileName, mapList, DownloadPath);
ZLibUtils.compressFile(DownloadPath + File.separator + fileName, DownloadPath + File.separator + newName, uuid);
//MD5
md5 = MD5Util.getMd5ByFilePath(DownloadPath + File.separator + newName);
String zlibName = newName.replace(Constant.STR_ZLIB, Constant.STR_ + md5 + Constant.STR_ZLIB);
String oldPath = DownloadPath + File.separator + newName;
String newPath = DownloadPath + File.separator + zlibName;
FileUtil.copyFile(oldPath, newPath);
//if (new File(oldPath).renameTo(new File(newPath))) {
//
//}
//下载文件地址
downUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.INTERFACE_DOWN + EncryptionInfo.decodeLock(zlibName);
//回调地址
backUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.WEBSERVICE_BACK;
//线程等待1秒
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
Date now2 = new Date();
//FileUtil.delFile(new File(DownloadPath + File.separator + fileName));
version = DateTimeUtil.getFormateString(now2, Constant.MMDDHHMMSSSSS);
//version = staNo + DateTimeUtil.getFormateString(now2, Constant.YYMMDD);
newName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_ZLIB;
String newFileName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_DBF;
sqlStr = sqlStr.replace("%ROADNO%", String.valueOf(roadNo)).replace("%STANO%", String.valueOf(staNo));
List<Map<String, Object>> mapList = sysMapper.selectList(sqlStr);
CreateDbfUtil.createDbfFile(uuid, paraId, fileName, mapList, DownloadPath);
ZLibUtils.compressFile(DownloadPath + File.separator + fileName, DownloadPath + File.separator + newName, uuid);
//MD5
md5 = MD5Util.getMd5ByFilePath(DownloadPath + File.separator + newName);
String zlibName = newName.replace(Constant.STR_ZLIB, Constant.STR_ + md5 + Constant.STR_ZLIB);
String oldPath = DownloadPath + File.separator + newName;
String newPath = DownloadPath + File.separator + zlibName;
FileUtil.copyFile(oldPath, newPath);
//if (new File(oldPath).renameTo(new File(newPath))) {
//
//序列号
//int lastNum = 1;
////先查询CMS_DOWNLOG_JAVA中下发的批次号
////判断当前是否是Oracle
//List<CmsDownLog> cmsDownLogs;
//if (Constant.STR_TWO.equals(DBType)) {
// cmsDownLogs = cmsDownLogMapper.selectListOracle(protocolType, isDate);
//} else {
// QueryWrapper<CmsDownLog> downLogQueryWrapper = new QueryWrapper<>();
// downLogQueryWrapper.select("NUM").eq("PARAID", protocolType)
// .eq("DT", isDate)
// .lt("NUM", 10000);
// cmsDownLogs = cmsDownLogMapper.selectList(downLogQueryWrapper);
//}
//下载文件地址
downUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.INTERFACE_DOWN + EncryptionInfo.decodeLock(zlibName);
//回调地址
backUrl = Constant.HTTP + ip + Constant.STR_COLON + tomcatPort + Constant.STR_SLASH + PathUtil.webName
+ Constant.WEBSERVICE_BACK;
//线程等待1秒
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
//序列号
//int lastNum = 1;
////先查询CMS_DOWNLOG_JAVA中下发的批次号
////判断当前是否是Oracle
//List<CmsDownLog> cmsDownLogs;
//if (Constant.STR_TWO.equals(DBType)) {
// cmsDownLogs = cmsDownLogMapper.selectListOracle(protocolType, isDate);
//} else {
// QueryWrapper<CmsDownLog> downLogQueryWrapper = new QueryWrapper<>();
// downLogQueryWrapper.select("NUM").eq("PARAID", protocolType)
// .eq("DT", isDate)
// .lt("NUM", 10000);
// cmsDownLogs = cmsDownLogMapper.selectList(downLogQueryWrapper);
//}
//if (cmsDownLogs != null && cmsDownLogs.size() > 0) {
// cmsDownLogs.sort(Comparator.comparing(CmsDownLog::getNum).reversed());
// lastNum = cmsDownLogs.get(0).getNum() + 1;
//}
//查询站的IP和程序的端口号
QueryWrapper<NameTableDcom> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("ROADNO", roadNo)
.eq("STANO", staNo);
NameTableDcom nameTableDcom = nameTableDcomMapper.selectOne(queryWrapper);
unifiedMethod(uuid, nameTableDcom, setUpTable, lastNum, protocolType, man, decryptManNo,
fileName, paraName, isZlib, ip, downUrl, backUrl, md5, version, isDate);
//if (cmsDownLogs != null && cmsDownLogs.size() > 0) {
// cmsDownLogs.sort(Comparator.comparing(CmsDownLog::getNum).reversed());
// lastNum = cmsDownLogs.get(0).getNum() + 1;
//}
//查询站的IP和程序的端口号
QueryWrapper<NameTableDcom> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("ROADNO", roadNo)
.eq("STANO", staNo);
NameTableDcom nameTableDcom = nameTableDcomMapper.selectOne(queryWrapper);
unifiedMethod(uuid, nameTableDcom, setUpTable, lastNum, protocolType, man, decryptManNo,
fileName, paraName, isZlib, ip, downUrl, backUrl, md5, version, isDate);
}
}
}
}
}

@ -1,5 +1,6 @@
package com.nm.gsgl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.nm.gsgl.common.Constant;
import com.nm.gsgl.common.enumeration.MessageEnum;
@ -37,8 +38,8 @@ import java.util.Date;
public class UploadZlibServiceImpl implements UploadZlibService {
@Value("${DownloadPath}")
private String DownloadPath;
@Value("${NFSFilePath}")
public String NFSFilePath;
//@Value("${NFSFilePath}")
//public String NFSFilePath;
@Value("${UserType}")
public String UserType;
@Resource
@ -72,13 +73,20 @@ public class UploadZlibServiceImpl implements UploadZlibService {
if ( !(StringUtils.containsIgnoreCase(fileName, Constant.STR_ZLIB) || StringUtils.containsIgnoreCase(fileName, Constant.STR_SQB))) {
throw new PPException(MessageEnum..getCode(), MessageEnum..getMessage());
}
String upLoadPath;
String upLoadPath = "";
if (Constant.INT_UPLOAD.contains(paraId)) {
UpdateWrapper<CmsParameter> updateWrapper = new UpdateWrapper<>();
//根据文件名称获取相应参数的值
//判断是否联网中心
if (Constant.STR_FOUR.equals(UserType)) {
upLoadPath = NFSFilePath;
QueryWrapper<NewFileInfo> newFileInfoQueryWrapper = new QueryWrapper<>();
newFileInfoQueryWrapper.eq("PROTOCOLTYPE", paraId);
NewFileInfo newFileInfo = newFileInfoMapper.selectOne(newFileInfoQueryWrapper);
if (null != newFileInfo) {
upLoadPath = newFileInfo.getZlibPath();
}
if (paraId == Constant.INT_9001) {
priceSqbHandle(uuid, file, fileName, upLoadPath, paraId, updateWrapper);
updateNewFileInfo(paraId, zlibFileName, upLoadPath, md5ByFile, priceVersion);

@ -5,8 +5,8 @@
<meta charset="UTF-8"/>
<title></title>
<script type="module" crossorigin src="./assets/index.6e17d1c9.js"></script>
<link rel="stylesheet" href="./assets/index.d94d690a.css">
<script type="module" crossorigin src="./assets/index.f0cdb2c0.js"></script>
<link rel="stylesheet" href="./assets/index.f0fb4751.css">
</head>
<body>
<div id="app">

@ -17,3 +17,4 @@
12 2024年09月05日 1.1.1 修复下发操作人员名单时出现下发的非本站的文件
13 2024年09月20日 1.1.2 下发车道时可根据车道类型选择相应的车道功能
14 2024年10月08日 1.1.3 下发车道人员工号时先删除下发文件夹下的operator.DBF然后再下发
14 2024年11月01日 1.1.4 优化手动上传费率文件

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!--<html lang="en" class="dark">-->
<html lang="en" class="light">
<head>
<meta charset="UTF-8"/>
<title></title>
<script type="module" crossorigin src="./assets/index.f0cdb2c0.js"></script>
<link rel="stylesheet" href="./assets/index.f0fb4751.css">
</head>
<body>
<div id="app">
<div class="loading">
<div class="loading-wrap">
<div class="loading-dots">
<span class="dot dot-spin">
<i></i>
<i></i>
<i></i>
<i></i>
</span>
</div>
<div class="loading-title">
正在缓冲...
</div>
</div>
</div>
</div>
</body>
</html>

@ -1,6 +1,6 @@
{
"hash": "7a0e2aae",
"browserHash": "2285fce2",
"browserHash": "24d2c489",
"optimized": {
"@element-plus/icons-vue": {
"src": "../../@element-plus/icons-vue/dist/index.js",
@ -212,42 +212,18 @@
"fileHash": "ff3c3c7c",
"needsInterop": true
},
"element-plus/es/components/row/style/css": {
"src": "../../element-plus/es/components/row/style/css.mjs",
"file": "element-plus_es_components_row_style_css.js",
"fileHash": "23b0ebb8",
"needsInterop": false
},
"element-plus/es/components/col/style/css": {
"src": "../../element-plus/es/components/col/style/css.mjs",
"file": "element-plus_es_components_col_style_css.js",
"fileHash": "c3ed36ab",
"needsInterop": false
},
"element-plus/es/components/menu/style/css": {
"src": "../../element-plus/es/components/menu/style/css.mjs",
"file": "element-plus_es_components_menu_style_css.js",
"fileHash": "2ea43185",
"needsInterop": false
},
"element-plus/es/components/menu-item/style/css": {
"src": "../../element-plus/es/components/menu-item/style/css.mjs",
"file": "element-plus_es_components_menu-item_style_css.js",
"fileHash": "69b2342f",
"needsInterop": false
},
"element-plus/es/components/icon/style/css": {
"src": "../../element-plus/es/components/icon/style/css.mjs",
"file": "element-plus_es_components_icon_style_css.js",
"fileHash": "c0781492",
"needsInterop": false
},
"element-plus/es/components/button/style/css": {
"src": "../../element-plus/es/components/button/style/css.mjs",
"file": "element-plus_es_components_button_style_css.js",
"fileHash": "9de75e26",
"needsInterop": false
},
"element-plus/es/components/row/style/css": {
"src": "../../element-plus/es/components/row/style/css.mjs",
"file": "element-plus_es_components_row_style_css.js",
"fileHash": "23b0ebb8",
"needsInterop": false
},
"element-plus/es/components/checkbox-group/style/css": {
"src": "../../element-plus/es/components/checkbox-group/style/css.mjs",
"file": "element-plus_es_components_checkbox-group_style_css.js",
@ -266,22 +242,46 @@
"fileHash": "b6a195ef",
"needsInterop": false
},
"element-plus/es/components/col/style/css": {
"src": "../../element-plus/es/components/col/style/css.mjs",
"file": "element-plus_es_components_col_style_css.js",
"fileHash": "c3ed36ab",
"needsInterop": false
},
"element-plus/es/components/form/style/css": {
"src": "../../element-plus/es/components/form/style/css.mjs",
"file": "element-plus_es_components_form_style_css.js",
"fileHash": "ac16b78c",
"needsInterop": false
},
"element-plus/es/components/upload/style/css": {
"src": "../../element-plus/es/components/upload/style/css.mjs",
"file": "element-plus_es_components_upload_style_css.js",
"fileHash": "4b70b9ba",
"needsInterop": false
},
"element-plus/es/components/form-item/style/css": {
"src": "../../element-plus/es/components/form-item/style/css.mjs",
"file": "element-plus_es_components_form-item_style_css.js",
"fileHash": "5ac034ba",
"needsInterop": false
},
"element-plus/es/components/upload/style/css": {
"src": "../../element-plus/es/components/upload/style/css.mjs",
"file": "element-plus_es_components_upload_style_css.js",
"fileHash": "4b70b9ba",
"element-plus/es/components/icon/style/css": {
"src": "../../element-plus/es/components/icon/style/css.mjs",
"file": "element-plus_es_components_icon_style_css.js",
"fileHash": "c0781492",
"needsInterop": false
},
"element-plus/es/components/menu/style/css": {
"src": "../../element-plus/es/components/menu/style/css.mjs",
"file": "element-plus_es_components_menu_style_css.js",
"fileHash": "2ea43185",
"needsInterop": false
},
"element-plus/es/components/menu-item/style/css": {
"src": "../../element-plus/es/components/menu-item/style/css.mjs",
"file": "element-plus_es_components_menu-item_style_css.js",
"fileHash": "69b2342f",
"needsInterop": false
},
"element-plus/es/components/radio-group/style/css": {

@ -9,6 +9,7 @@ import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import "lib-flexible-computer";
import 'element-plus/theme-chalk/el-loading.css'
const app = createApp(App).use(router).use(VueCookies).use(axios).use(ElementPlus, {
locale: zhCn,
});
@ -17,4 +18,4 @@ installElementPlus(app)
for (let iconName in ElIcon) {
app.component(iconName, ElIcon[iconName])
}
app.mount('#app')
app.mount('#app')

@ -78,7 +78,9 @@
<el-dialog title="ZLIB转换DBF/SQB工具" v-model="TransformationFlag" width="60%" align-center draggable>
<DecZlibUtil ref="DecZlibUtil"></DecZlibUtil>
</el-dialog>
<el-dialog title="手动上传文件" v-model="dialogUpload" width="60%" top="0.5%" :close-on-click-modal=false>
<el-dialog title="手动上传文件"
v-model="dialogUpload" width="60%" top="0.5%" :close-on-click-modal=false>
<el-row v-loading="fullscreenLoading" element-loading-text="加载中...">
<!-- 文件上传-->
<el-form :rules="rules" :model="dataForm" ref="dataForm" label-width="150px" @submit.native.prevent>
<el-form-item label="参数编号:" prop="paraId">
@ -108,7 +110,7 @@
</el-form-item>
</el-form>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="cancelUpload"> </el-button>
@ -120,6 +122,7 @@
</el-button>
</span>
</template>
</el-dialog>
</el-container>
@ -139,6 +142,7 @@ export default {
},
data() {
return {
fullscreenLoading:false,
// isShow:false,
isShow: true,
Upload,
@ -207,8 +211,10 @@ export default {
//uploadsubmithttpRequest
submitUpload() {
this.$refs.uploadImport.submit();
},
httpRequest(param) {
this.fullscreenLoading=true;
let fd = new FormData();
fd.append('uploadFile', param.file); //
// fd.append('paraId', this.dataForm.paraId);
@ -218,11 +224,13 @@ export default {
headers: {'Content-Type': 'multipart/form-data'},//,
timeout: 200000,
}).then(res => {
// console.log(res)
//paramsonSuccesssuccessHandler
//ui
///params.onSuccess({name: 'eric'})
if (res.data.code === '0') {
this.fullscreenLoading=false;
ElMessage({
message: '手动上传成功!',
type: 'success',
@ -230,10 +238,14 @@ export default {
this.dialogUpload = false;
this.dataForm = {}
} else {
this.fullscreenLoading=false;
ElMessage.error(res.data.msg); //
this.dialogUpload = false;
this.dataForm = {}
}
this.fullscreenLoading = false; // false
this.dialogUpload = false;
this.dataForm = {};
}).catch(
ElMessage({
type: 'info',
@ -258,6 +270,7 @@ export default {
},
cancelUpload() {
this.fullscreenLoading=false;
this.dialogUpload = false;
this.dataForm = {}

Loading…
Cancel
Save