Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-12-24 09:39:07 +08:00
7 changed files with 41 additions and 38 deletions
+5 -2
View File
@@ -1,8 +1,9 @@
/** /**
* 文件预览 * 文件预览
*/ */
import { onlyOfficeUrl } from '@/sysConfig' import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { getBusStandFileByAttId } from 'api/process' import { getBusStandFileByAttId } from 'api/process'
let Base64 = require('js-base64').Base64;
export default attId => { export default attId => {
getBusStandFileByAttId({ getBusStandFileByAttId({
attId attId
@@ -15,7 +16,9 @@ export default attId => {
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}else { }else {
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) // window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
} }
} }
}).catch(e => { }).catch(e => {
@@ -470,9 +470,9 @@
this.form.modelList = data.modelList || data.form.modelList this.form.modelList = data.modelList || data.form.modelList
this.form.responUserList = data.form.responUserList this.form.responUserList = data.form.responUserList
this.form.responUserListName = data.form.responUserListName this.form.responUserListName = data.form.responUserListName
this.form.fileName = data.form.fileName || data.fileName || '' this.form.fileName = data.form? data.form.fileName : ''
this.form.fileId = data.form.fileId || data.fileId || '' this.form.fileId = data.form ? data.form.fileId : ''
this.form.dyhz = data.form.dyhz || data.dyhz || '' this.form.dyhz = data.form ? data.form.dyhz : ''
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -374,14 +374,14 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.dyhz = data.dyhz || data.form.dyhz this.form.dyhz = data.form ? data.form.dyhz : ''
this.form.title = data.title || data.form.title this.form.title = data.title || data.form.title
this.form.date = data.date || data.form.date this.form.date = data.date || data.form.date
this.json = data || data.form this.json = data || data.form
this.form.file = data.fileId || data.form.fileId this.form.file = data.form ? data.form.fileId : ''
this.form.fileName = data.fileName || data.form.fileName this.form.fileName = data.form ? data.form.fileName : ''
this.form.fileId = data.fileId || data.form.fileId this.form.fileId = data.form ? data.form.fileId : ''
this.form.modelList = data.modelList || data.form.modelList this.form.modelList = data.form ? data.form.modelList : []
this.form.fjList = data.fjList || data.form.fjList this.form.fjList = data.fjList || data.form.fjList
}).catch(e => { }).catch(e => {
}) })
@@ -478,19 +478,19 @@ export default {
this.listForm.dataList.forEach(item => { this.listForm.dataList.forEach(item => {
if(item.workPeople !== ''){ if(item.workPeople !== ''){
this.dataList.push(item) this.dataList.push(item)
item.children.forEach(items=> {
if(items.key === item.standId){
this.$set(items, "standName", item.standName);
this.$set(items, "standEnName", item.standEnName);
this.$set(items, "standYear", item.standYear);
this.$set(items, "standSort", item.standSort);
this.$set(items, "standNumber", item.standNumber);
this.$set(items, "zccssrq", item.zccssrq);
this.$set(items, "xcxssrq", item.xcxssrq);
this.$set(items, "ssrq", item.ssrq);
}
})
} }
item.children.forEach(items=> {
if(items.key === item.standId){
this.$set(items, "standName", item.standName);
this.$set(items, "standEnName", item.standEnName);
this.$set(items, "standYear", item.standYear);
this.$set(items, "standSort", item.standSort);
this.$set(items, "standNumber", item.standNumber);
this.$set(items, "zccssrq", item.zccssrq);
this.$set(items, "xcxssrq", item.xcxssrq);
this.$set(items, "ssrq", item.ssrq);
}
})
}) })
this.listForm.dataList.forEach(item => { this.listForm.dataList.forEach(item => {
dataChildren.push(item.children) dataChildren.push(item.children)
@@ -315,14 +315,14 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
this.form.dyhz = data.dyhz || data.form.dyhz this.form.dyhz = data.form ? data.form.dyhz : ''
this.form.title = data.title || data.form.title this.form.title = data.title || data.form.title
this.form.date = data.date || data.form.date this.form.date = data.date || data.form.date
this.json = data || data.form this.json = data || data.form
this.form.file = data.fileId || data.form.fileId this.form.file = data.form ? data.form.fileId : ''
this.form.fileName = data.fileName || data.form.fileName this.form.fileName = data.form ? data.form.fileName : ''
this.form.fileId = data.fileId || data.form.fileId this.form.fileId = data.form ? data.form.fileId : ''
this.form.modelList = data.modelList || data.form.modelList this.form.modelList = data.form ? data.form.modelList : []
this.form.fjList = data.fjList || data.form.fjList this.form.fjList = data.fjList || data.form.fjList
}).catch(e => { }).catch(e => {
}) })
@@ -1267,7 +1267,6 @@ export default {
}, },
// 编辑按钮 // 编辑按钮
editTghisRow(row) { editTghisRow(row) {
console.log(row);
// 用来储存取消时原来的数据,防止取消时修改 // 用来储存取消时原来的数据,防止取消时修改
localStorage.setItem("obj", JSON.stringify(row)); localStorage.setItem("obj", JSON.stringify(row));
@@ -1300,14 +1299,13 @@ export default {
}, },
// 抽屉提交按钮 // 抽屉提交按钮
saveInfo() { saveInfo() {
console.log(this.editRowData); if (this.editRowData.ssrq !== '' && this.editRowData.ssrq !== null) {
if (this.editRowData.ssrq !== '') {
this.editRowData.ssrq = this.editRowData.ssrq.join(',') this.editRowData.ssrq = this.editRowData.ssrq.join(',')
} }
if (this.editRowData.xcxssrqgj !== ''){ if (this.editRowData.xcxssrqgj !== '' && this.editRowData.xcxssrqgj !== null){
this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.join(',') this.editRowData.xcxssrqgj = this.editRowData.xcxssrqgj.join(',')
} }
if (this.editRowData.zccssrqgj !== ''){ if (this.editRowData.zccssrqgj !== '' && this.editRowData.zccssrqgj !== null){
this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.join(',') this.editRowData.zccssrqgj = this.editRowData.zccssrqgj.join(',')
} }
this.drawerEdit = false this.drawerEdit = false
@@ -2127,8 +2125,6 @@ export default {
this.$http.get('sys/dictype/getDicTypeListCode', '', { this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this _this: this
}, res => { }, res => {
console.log('能源类型',res.data.NYLXCLASS);
console.log('适用车型',res.data.ENERGYTYPES);
this.allSelectOptions = res.data || {} this.allSelectOptions = res.data || {}
this.regionOptions = res.data.REGION // 基础信息 区域list this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.NYLXCLASS // 能源类型 this.applyArcticOptions = res.data.NYLXCLASS // 能源类型
+8 -4
View File
@@ -19,7 +19,10 @@ const devWebUrl = 'https://srms.foton.com.cn/#/'
const webLoginType = 'dev' const webLoginType = 'dev'
// 配置onlyOffice 前端服务 // 配置onlyOffice 前端服务
const onlyOfficeUrl = 'http://127.0.0.1:8080' const onlyOfficeUrl = 'http://10.100.5.116:8088'
// 配置 kkFileView 前端服务
const kkFileViewUrl = 'https://srms.foton.com.cn/preview'
// 云端端口号 // 云端端口号
const DEV_CLOUD_RES_INTERFACE_PORT = '7777' const DEV_CLOUD_RES_INTERFACE_PORT = '7777'
@@ -54,14 +57,15 @@ const interfacePORT = process.env.NODE_ENV === 'production' ? prodInterfacePORT
const CLOUD_RES_INTERFACE_PORT = process.env.NODE_ENV === 'production' ? DEV_CLOUD_RES_INTERFACE_PORT : DEV_CLOUD_RES_INTERFACE_PORT const CLOUD_RES_INTERFACE_PORT = process.env.NODE_ENV === 'production' ? DEV_CLOUD_RES_INTERFACE_PORT : DEV_CLOUD_RES_INTERFACE_PORT
module.exports = { module.exports = {
baseUrl: 'https://' + serverIP + ':' + interfacePORT, baseUrl: 'http://' + serverIP + ':' + interfacePORT,
webLoginType: webLoginType, webLoginType: webLoginType,
ssoLoginUrlDev: ssoLogin + devWebUrl, ssoLoginUrlDev: ssoLogin + devWebUrl,
ssoLoginUrl: ssoLogin, ssoLoginUrl: ssoLogin,
onlyOfficeUrl: onlyOfficeUrl, onlyOfficeUrl: onlyOfficeUrl,
kkFileViewUrl: kkFileViewUrl,
devWebUrl: devWebUrl, devWebUrl: devWebUrl,
serverUrl: 'https://' + serverIP, // 服务器IP地址 serverUrl: 'http://' + serverIP, // 服务器IP地址
interfaceUrl: 'https://' + serverIP + ':' + interfacePORT + '/api/', // 服务器端接口访问地址, interfaceUrl: 'http://' + serverIP + ':' + interfacePORT + '/api/', // 服务器端接口访问地址,
cloudResInterFaceUrl: 'http://' + serverIP + ':' + interfacePORT + '/busApi/', // 云端资源库服务器端接口访问地址, cloudResInterFaceUrl: 'http://' + serverIP + ':' + interfacePORT + '/busApi/', // 云端资源库服务器端接口访问地址,
simpleUploadPath: 'api/' + simpleFilePath, // 单文件上传地址 simpleUploadPath: 'api/' + simpleFilePath, // 单文件上传地址
multipleUploadPath: 'api/' + multipleFilePath, // 多文件上传地址 multipleUploadPath: 'api/' + multipleFilePath, // 多文件上传地址