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

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-27 23:39:34 +08:00
8 changed files with 360 additions and 49 deletions
+9
View File
@@ -604,6 +604,15 @@ export function getConvertFileByAttId(data) {
})
}
// 获取openOffice 在线预览文件
export function getBusStandFileByAttId(data) {
return axios({
url: 'api/att/attFile/getBusStandFileByAttId',
method: 'get',
params: data
})
}
// 未符合项跟踪修改状态
export function updateBaseInfo(data) {
return axios({
+53 -23
View File
@@ -67,7 +67,8 @@
</template>
<script>
import { getConvertFileByAttId } from 'api/process'
import { getConvertFileByAttId,getBusStandFileByAttId } from 'api/process'
let Base64 = require('js-base64').Base64;
export default {
name: 'CustomFile',
data() {
@@ -335,29 +336,43 @@ export default {
handlePreview(file) {
const attId = file.response.data.id
if (this.preview) {
this.getConvertFileByAttId(attId)
.then(res => {
switch (res.convertState) {
case 'ERROR':
this.$message.warning('文档转换失败')
break
case 'LODING':
this.$message.info('文档转换中,请稍后查看')
break
case 'SUCCESS':
const { convertFileInfo } = res
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
break
}
}).catch(e => {
this.$message.warning('文档转换失败')
})
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
this.getBusStandFileByAttId(attId)
.then(res => {
console.log(res)
if(res){
const editFileInfo = res
console.log(editFileInfo)
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
}else {
const nowTime = new Date().getTime()
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}
// switch (res.convertState) {
// case 'ERROR':
// this.$message.warning('文档转换失败')
// break
// case 'LODING':
// this.$message.info('文档转换中,请稍后查看')
// break
// case 'SUCCESS':
// const { convertFileInfo } = res
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
// break
// }
}).catch(e => {
console.log(e)
this.$message.warning('文件不存在,预览失败')
})
}
},
@@ -377,6 +392,21 @@ export default {
})
})
},
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
/**
* @description: 获取展示的文件
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -140,7 +140,7 @@
isShowSelect: false, // 是否显示树状选择器
options: [],
selectedData: [], // 选中的节点
style: 'width:' + this.width + 'px;' + 'height:100%;',
style: 'width:' + this.width + 'px;' + '',
selectStyle: 'width:100%;',
checkedIds: [],
checkedData: [],
@@ -164,13 +164,13 @@
<ProcessTitle v-show="verifySarStandard">
<template slot="title">实施日期</template>
</ProcessTitle>
<div class="prc-content-border" v-show="verifySarStandard" >
<div class="prc-content-border content_input" v-show="verifySarStandard" >
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="实施日期(标准文本)" prop="ssrq" class="add-form-item form-item-disabled">
<el-date-picker
v-model="form.ssrq"
type="date"
type="dates"
placeholder="请选择标准实施日期(标准文本)"
value-format="yyyy-MM-dd">
</el-date-picker>
@@ -178,7 +178,7 @@
<el-form-item label="在产车实施日期(标准文本)" prop="zccssrq" class="add-form-item form-item-disabled">
<el-date-picker
v-model="form.zccssrq"
type="date"
type="dates"
placeholder="请选择在产车实施日期(标准文本)"
value-format="yyyy-MM-dd">
</el-date-picker>
@@ -188,7 +188,7 @@
<el-form-item label="新车型实施日期(标准文本)" prop="xcxssrq" class="add-form-item form-item-disabled">
<el-date-picker
v-model="form.xcxssrq"
type="date"
type="dates"
placeholder="请选择新车型实施日期(标准文本"
value-format="yyyy-MM-dd">
</el-date-picker>
@@ -676,15 +676,17 @@
></el-input>
</el-form-item>
<el-form-item v-show="form.standInData === '0'" label="我司署名人" prop="wssmr" class="add-form-item form-item-disabled">
<el-select :popper-append-to-body="false" v-model="form.wssmr" placeholder="选择我司署名人" multiple>
<el-option
v-for="item in wssmrOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<el-input v-model="form.wssmr" placeholder="选择我司署名人" @click.native="choiceZRRS('wssmr', '选择我司署名人', form.wssmr)">
</el-input>
<!-- <el-select :popper-append-to-body="false" v-model="form.wssmr" placeholder="请选择我司署名人" multiple>-->
<!-- <el-option-->
<!-- v-for="item in wssmrOptions"-->
<!-- placeholder="请选择"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item v-show="form.standInData === '0'" label="我司参与深度" prop="cysd" class="add-form-item form-item-disabled">
<el-select :popper-append-to-body="false" v-model="form.cysd" placeholder="请选择我司参与深度">
@@ -1032,7 +1034,7 @@
</div>
</el-dialog>
<Role-tree
is-title="选择责任部门对接人"
:is-title="drawerTitle"
:is-visible.sync="modalShowRoleFlag"
@checkedRole="checkedRole2"
:nodeList="nodeList2"
@@ -1283,6 +1285,7 @@
zbjbdFileList: [],
kwjFileList: [],
glwjFileList: [],
nodeList5: [],
filterText:'',
textStatusMap: {}, // 文本状态id与name对应
standardDrawer: false,
@@ -1406,9 +1409,9 @@
standSystemName: '',// 标准体系名称
gxhbq: '', // 标签
// 实施日期
ssrq: '', // 实施日期(标准文本)
xcxssrq: '', // 新车型实施日期(标准文本)
zccssrq: '', // 在产车实施日期(标准文本)
ssrq: [], // 实施日期(标准文本)
xcxssrq: [], // 新车型实施日期(标准文本)
zccssrq: [], // 在产车实施日期(标准文本)
ssrqgj: '', // 实施日期(国际)
xcxssrqgj: '', // 新车型实施日期(国际)
zccssrqgj: '', // 在产车实施日期(国际)
@@ -1466,6 +1469,8 @@
zrUserName: '',
jlUserId: '',
jlUserName: '',
wssmr: '',
wssmrId: '',
applyUpdUserId: this.$store.getters.userInfo.userId,
applyUpdUserName: this.$store.getters.userInfo.userName,
prcCreateUser: this.$store.getters.userInfo.userId,
@@ -1704,6 +1709,7 @@
// this.modalshowflag2 = true
// },
checkedRole2 (data) {
console.log('1712',this.drawerTitle)
let idList = ''
let nameList = ''
data.forEach( item => {
@@ -1714,8 +1720,13 @@
idList += item.id
nameList += item.name
})
if (this.drawerTitle === '选择责任人'){
this.roleForm.zrUserId=idList;
this.roleForm.zrUserName=nameList;
}
if (this.drawerTitle === '选择我司署名人'){
this.form.wssmr = nameList
}
},
checkedRole (data) {
if (this.userType === 'jlUserId') {
@@ -2067,6 +2078,7 @@
},
choiceZRRS (type, title, id) {
console.log('2077',title)
this.nodeList = []
this.nodeList.push(id)
this.userType = type
@@ -2801,6 +2813,11 @@
position: relative;
overflow: hidden;
}
.prc-content-border {
/deep/ .el-input__inner {
padding-left: 30px;
}
}
/deep/ .el-dialog__body {
padding: 0 20px 10px;
color: #606266;
@@ -2817,6 +2834,9 @@
.prc-content-border {
border: none;
padding: 0 20px 0;
/deep/ .el-input__inner {
padding-left: 30px;
}
}
}
position: relative;