Merge branch 'secondStage'
This commit is contained in:
@@ -103,7 +103,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
@@ -296,7 +296,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
@@ -309,7 +309,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileSuffix)
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
|
||||
@@ -441,7 +441,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.response.result.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
console.log(fileSuffix)
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
|
||||
@@ -3,14 +3,33 @@ import { USER_INFO } from '../store/mutation-types'
|
||||
import { Base64 } from 'js-base64'
|
||||
import md5 from 'md5'
|
||||
|
||||
function fillZero (str) {
|
||||
let realNum
|
||||
if (str < 10) {
|
||||
realNum = '0' + str
|
||||
} else {
|
||||
realNum = str
|
||||
}
|
||||
return realNum
|
||||
}
|
||||
|
||||
/**
|
||||
* kkFile预览文件并添加水印
|
||||
* @param fileUrl
|
||||
*/
|
||||
export const kkFilePreview = (fileUrl) => {
|
||||
const userInfo = Vue.ls.get(USER_INFO)
|
||||
// 获取当前时间
|
||||
const date = new Date()
|
||||
const year = date.getFullYear()
|
||||
const month = date.getMonth() + 1
|
||||
const day = date.getDate()
|
||||
const hour = date.getHours()
|
||||
const minute = date.getMinutes()
|
||||
const second = date.getSeconds()
|
||||
const time = `${year}${fillZero(month)}${fillZero(day)}${fillZero(hour)}${fillZero(minute)}${fillZero(second)}`
|
||||
// 水印内容
|
||||
const watermarkTxt = `${userInfo.username} ${userInfo.realname}`
|
||||
const watermarkTxt = `${userInfo.username} ${userInfo.realname} ${time}`
|
||||
// 客户环境预览需要加的加密参数
|
||||
const watermarkSign = md5(watermarkTxt + 'cnhtc')
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileUrl))}&watermarkTxt=${encodeURIComponent(watermarkTxt)}&watermarkSign=${watermarkSign}`
|
||||
|
||||
@@ -5,7 +5,7 @@ const getToken = () => Vue.ls.get(ACCESS_TOKEN)
|
||||
|
||||
// 预览pdf
|
||||
const previewPdf = (id) => {
|
||||
const url = `${window._CONFIG.domianURL}/sys/common/view/${id}?type=view&token=${getToken()}`
|
||||
const url = `${window._CONFIG.domianURL}/sys/common/view/${id}?type=view&at=${getToken()}`
|
||||
return `${process.env.BASE_URL}pdfjs/web/viewer.html?file=` + encodeURIComponent(url) + '&.pdf'
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ import Vue from 'vue'
|
||||
import * as api from '@/api/api'
|
||||
import { isURL } from '@/utils/validate'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getFileInfo } from '@/api/api'
|
||||
import { dealUrl, kkFilePreview } from './kkFilePreview'
|
||||
import { previewPdf } from './previewPdf'
|
||||
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
||||
|
||||
//
|
||||
@@ -678,3 +681,37 @@ export function getConfusionCode (tableName, fieldName) {
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过文件id在当前窗口预览文件
|
||||
* @param fileId
|
||||
*/
|
||||
export function previewFileCurrentWindowByFileId (fileId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getFileInfo({ id: fileId }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result || {}
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1] : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
reject('该文件类型不支持预览')
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
// pdf预览
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(file.id)
|
||||
window.open(url, '_self')
|
||||
return
|
||||
}
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
const kkFileUrl = dealUrl(fileFullUrl)
|
||||
window.open(kkFileUrl, '_self')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a-col :span="6">
|
||||
<a-form-item :label="$t('businessSupport.questionAnswer.classify')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag
|
||||
:placeholder="$t('pleaseEnter')+$t('businessSupport.questionAnswer.classify')"
|
||||
:placeholder="$t('pleaseSelect')+$t('businessSupport.questionAnswer.classify')"
|
||||
dict-code="problem_library_type"
|
||||
v-model="queryParam.type">
|
||||
</j-dict-select-tag>
|
||||
@@ -128,6 +128,8 @@ import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
|
||||
export default {
|
||||
name: 'QuestionAnswerList',
|
||||
@@ -223,7 +225,15 @@ export default {
|
||||
handleAttachClick (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : ''
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading(this.$t('uploadFile.cannotPreview')).then(() => {
|
||||
this.handleDownload(record.declareFile, record.declareFileName)
|
||||
})
|
||||
return
|
||||
}
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.declareFile)
|
||||
@@ -240,13 +250,12 @@ export default {
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// word用KKfile预览
|
||||
if (fileSuffix === 'doc' || fileSuffix === 'docx') {
|
||||
kkFilePreview(fileFullUrl)
|
||||
return
|
||||
}
|
||||
// 如果都不能预览就下载
|
||||
downloadFile(`/sys/common/download/${record.declareFile}`, record.declareFileName)
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
kkFilePreview(fileFullUrl)
|
||||
},
|
||||
handleDownload (id, name) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${id}`, name)
|
||||
},
|
||||
// 查看
|
||||
handleDetail (record) {
|
||||
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
@@ -53,6 +53,8 @@ import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
|
||||
export default {
|
||||
name: 'CheckReportModal',
|
||||
@@ -149,7 +151,15 @@ export default {
|
||||
handleRelatedMaterialClick (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : ''
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
this.$message.loading(this.$t('uploadFile.cannotPreview')).then(() => {
|
||||
this.handleDownload(record.declareFile, record.declareFileName)
|
||||
})
|
||||
return
|
||||
}
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.declareFile)
|
||||
@@ -166,13 +176,12 @@ export default {
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// word用KKfile预览
|
||||
if (fileSuffix === 'doc' || fileSuffix === 'docx') {
|
||||
kkFilePreview(fileFullUrl)
|
||||
return
|
||||
}
|
||||
// 如果都不能预览就下载
|
||||
downloadFile(`/sys/common/download/${record.declareFile}`, record.declareFileName)
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
kkFilePreview(fileFullUrl)
|
||||
},
|
||||
handleDownload (id, name) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${id}`, name)
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
|
||||
@@ -224,7 +224,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
handleRelatedMaterialClick (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.declareFileName ? record.declareFileName.split('.')[record.declareFileName.split('.').length - 1] : ''
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.declareFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.declareFileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.declareFile)
|
||||
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
this.imageUrl = getFileAccessHttpUrl(file.id)
|
||||
@@ -236,4 +236,4 @@ export default {
|
||||
.basis-description {
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -378,7 +378,7 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
console.log(fileFullUrl)
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix.toLowerCase())) {
|
||||
|
||||
+16
-42
@@ -22,13 +22,14 @@
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.sectionNumber')"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
v-decorator.trim="[ 'standardNo', validatorRules.sectionNumber ]" />
|
||||
v-decorator.trim="[ 'clause', validatorRules.sectionNumber ]" />
|
||||
</a-form-item>
|
||||
<!-- 标准内容或要求 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.standardContentOrDemand')"
|
||||
:maxLength="500"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
v-decorator.trim="[ 'requirement', validatorRules.standardContentOrDemand ]" />
|
||||
</a-form-item>
|
||||
@@ -58,7 +59,8 @@ import { getFileInfo } from '@/api/api'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { addInspectionContentTable, editInspectionContentTable, getFileByInspectId } from '@api/workCenter'
|
||||
import { getFileByInspectId } from '@api/workCenter'
|
||||
import moment from 'moment/moment'
|
||||
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
@@ -98,7 +100,7 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
index: undefined, // 编辑的表格的下标
|
||||
index: -1, // 编辑的表格的下标
|
||||
iframeSrc: '' // 左侧预览的路径
|
||||
}
|
||||
},
|
||||
@@ -152,8 +154,8 @@ export default {
|
||||
// pdf预览
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
} else if (['doc', 'docx'].includes(fileSuffix)) {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
@@ -162,7 +164,7 @@ export default {
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.index = undefined
|
||||
this.index = -1
|
||||
this.iframeSrc = ''
|
||||
},
|
||||
handleCancel () {
|
||||
@@ -170,53 +172,26 @@ export default {
|
||||
},
|
||||
// 提交并新增
|
||||
handleSubmitAddAdd () {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, this.model, values)
|
||||
if (!param.processEsInspectId) {
|
||||
param.processEsInspectId = this.data.id
|
||||
if (!param.createTime) {
|
||||
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
console.log(param)
|
||||
const fn = param.id ? editInspectionContentTable : addInspectionContentTable
|
||||
fn(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok', param, this.index)
|
||||
this.form.resetFields()
|
||||
this.model = {}
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
this.$emit('ok', param, this.index)
|
||||
this.form.resetFields()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, this.model, values)
|
||||
if (!this.model.processEsInspectId) {
|
||||
param.processEsInspectId = this.data.id
|
||||
if (!param.createTime) {
|
||||
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
console.log(param)
|
||||
const fn = param.id ? editInspectionContentTable : addInspectionContentTable
|
||||
fn(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -232,7 +207,6 @@ export default {
|
||||
.content-left {
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
iframe {
|
||||
height: calc(100% - 20px) !important;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
|
||||
+149
-127
@@ -17,7 +17,7 @@
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="standard-file-div">
|
||||
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.standardFile_dictText }}</a>
|
||||
<a class="link-a" @click="handleLookUploadStandard(record)">{{ record.fileId_dictText }}</a>
|
||||
<a class="download-a" @click="handleDownloadUploadStandard(record)">{{ $t('download') }}</a>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
@@ -26,106 +26,103 @@
|
||||
</j-table>
|
||||
</div>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<div class="form-flex-box">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参会人员 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 参会人员 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
|
||||
{{ $t('workCenter.enStandardRevision.conferee') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="conferee">
|
||||
<user-selection v-model="formInline.conferee"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
|
||||
:disabled="disabled"
|
||||
filedName="conferee"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.conferee_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 会议纪要 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
||||
<a-form-model-item class="item-model" prop="meetingUsers">
|
||||
<user-selection v-model="formInline.meetingUsers"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
|
||||
:disabled="disabled"
|
||||
filedName="meetingUsers"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.meetingUsers_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 会议纪要 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
|
||||
{{ $t('workCenter.enStandardRevision.meetingSummary') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="meetingSummary">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
|
||||
{{
|
||||
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|
||||
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 编制说明 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.compilationIllustration')">
|
||||
<a-form-model-item class="item-model" prop="meetingSummary">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
|
||||
{{
|
||||
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|
||||
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 编制说明 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.compilationIllustration')">
|
||||
{{ $t('workCenter.enStandardRevision.compilationIllustration') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="comp_illustration">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('comp_illustration')">
|
||||
{{
|
||||
(formInline.comp_illustration === 'null' || formInline.comp_illustration === ''
|
||||
|| formInline.comp_illustration === null || formInline.comp_illustration === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 是否需要稽查 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isNeedAudit')">
|
||||
<a-form-model-item class="item-model" prop="compIllustration">
|
||||
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('compIllustration')">
|
||||
{{
|
||||
(formInline.compIllustration === 'null' || formInline.compIllustration === ''
|
||||
|| formInline.compIllustration === null || formInline.compIllustration === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 稽查内容 -->
|
||||
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
|
||||
<!-- 是否需要稽查 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isNeedAudit')">
|
||||
{{ $t('workCenter.enStandardRevision.isNeedAudit') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="isNeedAudit">
|
||||
<a-radio-group v-model="formInline.isNeedAudit">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="2">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="inspectFlag">
|
||||
<a-radio-group v-model="formInline.inspectFlag">
|
||||
<a-radio value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio value="0">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
<!-- 是否需要稽查选择是,需要填写稽查内容,否则隐藏稽查内容区域 -->
|
||||
<template v-if="formInline.isNeedAudit === 1">
|
||||
<!-- 稽查内容 -->
|
||||
<p class="base-info-inner-title">{{ $t('enterpriseStandardLibrary.standard.auditContent') }}</p>
|
||||
|
||||
<template v-if="formInline.inspectFlag === '1'">
|
||||
<!-- 操作区域 -->
|
||||
<div v-if="!disabled" class="table-operator">
|
||||
<!-- 新增 -->
|
||||
@@ -149,7 +146,7 @@
|
||||
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
|
||||
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
<a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
|
||||
</j-table>
|
||||
@@ -204,32 +201,32 @@ export default {
|
||||
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingUnit_dictText',
|
||||
dataIndex: 'dept_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草人
|
||||
title: this.$t('workCenter.enStandardRevision.drafter'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'drafter_dictText',
|
||||
dataIndex: 'user_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 起草范围
|
||||
title: this.$t('workCenter.enStandardRevision.draftingScope'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'draftingScope',
|
||||
dataIndex: 'scope',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 截止日期
|
||||
title: this.$t('expirationDate'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'expirationDate',
|
||||
dataIndex: 'deadline',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 企标文本
|
||||
dataIndex: 'standardFile_dictText',
|
||||
dataIndex: 'fileId_dictText',
|
||||
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
|
||||
scopedSlots: { customRender: 'standardFile' },
|
||||
align: 'center',
|
||||
@@ -237,12 +234,12 @@ export default {
|
||||
}
|
||||
],
|
||||
// 起草人表格数据
|
||||
drafterDataSource: [{id: 1, standardFile: '1715299701232504833', standardFile_dictText: '测试上传excel测试测试测试测试.xls'}],
|
||||
drafterDataSource: [],
|
||||
drafterLoading: false,
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 参会人员
|
||||
conferee: [
|
||||
meetingUsers: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
|
||||
@@ -257,8 +254,16 @@ export default {
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 编制说明
|
||||
compIllustration: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.compilationIllustration') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
// 是否需要稽查
|
||||
isNeedAudit: [
|
||||
inspectFlag: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
|
||||
@@ -268,25 +273,35 @@ export default {
|
||||
},
|
||||
// 稽查内容表格列
|
||||
columns: [
|
||||
{
|
||||
{ // 条款
|
||||
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'clause',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
{ // 标准内容和要求
|
||||
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'requirement',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改部门
|
||||
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'rectificationDepartment',
|
||||
customRender: (value, row, index) => {
|
||||
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
|
||||
backDepart={true} />
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
// 稽查内容表格数据
|
||||
@@ -294,27 +309,27 @@ export default {
|
||||
loading: false,
|
||||
fileMaxSize: undefined,
|
||||
image: false,
|
||||
imageUrl: ''
|
||||
imageUrl: '',
|
||||
uploadName: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.drafterDataSource =
|
||||
// this.dataSource =
|
||||
// this.formInline =
|
||||
this.drafterDataSource = data.otherDraftUserVOS
|
||||
this.dataSource = data.inspectContents || []
|
||||
this.formInline = Object.assign({}, data)
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
// })
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.formInline
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource || []
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -322,10 +337,19 @@ export default {
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
if (this.formInline.inspectFlag === '1' && this.dataSource && this.dataSource.length > 0) {
|
||||
if (this.dataSource.map(item => item.rectificationDepartment).every(item => !!item)) {
|
||||
// 每一个的整改部门都填了
|
||||
// 有数据可以抛出
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource || []
|
||||
} else {
|
||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||
data = false
|
||||
}
|
||||
} else if (this.formInline.inspectFlag === '0') {
|
||||
// 有数据可以抛出
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.formInline
|
||||
data = Object.assign({}, this.formInline)
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
@@ -339,7 +363,7 @@ export default {
|
||||
// 查看企标文本
|
||||
handleLookUploadStandard (record) {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = record.standardFile_dictText ? record.standardFile_dictText.split('.')[record.standardFile_dictText.split('.').length - 1].toLowerCase() : ''
|
||||
const fileSuffix = record.fileId_dictText ? record.fileId_dictText.split('.')[record.fileId_dictText.split('.').length - 1].toLowerCase() : ''
|
||||
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
|
||||
// 判断是否为可预览格式的文件
|
||||
if (!canPreview) {
|
||||
@@ -348,10 +372,10 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.fileId}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileId_dictText}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(record.standardFile)
|
||||
this.imageUrl = getFileAccessHttpUrl(record.fileId)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
@@ -361,22 +385,17 @@ export default {
|
||||
}
|
||||
// pdf预览
|
||||
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(record.standardFile)
|
||||
const url = previewPdf(record.fileId)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// word用KKfile预览
|
||||
if (canPreview && (fileSuffix === 'doc' || fileSuffix === 'docx')) {
|
||||
kkFilePreview(fileFullUrl)
|
||||
return
|
||||
}
|
||||
// 如果都不能预览就下载
|
||||
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
kkFilePreview(fileFullUrl)
|
||||
},
|
||||
// 下载企标文本
|
||||
handleDownloadUploadStandard (record) {
|
||||
// 下载文件
|
||||
downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
|
||||
downloadFile(`/sys/common/download/${record.fileId}`, record.fileId_dictText)
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
@@ -384,11 +403,6 @@ export default {
|
||||
},
|
||||
// 点击文件上传
|
||||
clickButtonToUpload (fieldName) {
|
||||
if (fieldName === 'uploadAttachment') {
|
||||
this.fileMaxSize = 10
|
||||
} else {
|
||||
this.fileMaxSize = undefined
|
||||
}
|
||||
this.$refs.uploadFile.open(this.formInline[fieldName])
|
||||
this.uploadName = fieldName
|
||||
},
|
||||
@@ -420,7 +434,13 @@ export default {
|
||||
},
|
||||
// 稽查内容的删除
|
||||
handleDelete (index) {
|
||||
this.dataSource.splice(index, 1)
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('areYouSure'),
|
||||
onOk: () => {
|
||||
this.dataSource.splice(index, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 稽查内容新增编辑完成
|
||||
checkContentOk (value, index) {
|
||||
@@ -439,9 +459,10 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
|
||||
.form-add {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.online-edit-wrapper {
|
||||
@@ -456,6 +477,7 @@ export default {
|
||||
}
|
||||
|
||||
.base-info-inner-title {
|
||||
width: 100%;
|
||||
color: #1D2129;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
getFileInfo({ id: fileId }).then(res => {
|
||||
if (res.success) {
|
||||
const fileInfo = res.result || {}
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${fileInfo.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${fileInfo.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${fileInfo.fileName}`
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = (fileInfo.fileName ? fileInfo.fileName.split('.')[fileInfo.fileName.split('.').length - 1] : '').toLowerCase()
|
||||
switch (fileSuffix) {
|
||||
@@ -261,4 +261,4 @@ export default {
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user