修改企标制修订-技术标准的历史版本

This commit is contained in:
范强强
2024-03-26 11:51:33 +08:00
parent d2e973d769
commit e6736363e8
5 changed files with 155 additions and 25 deletions
@@ -212,19 +212,37 @@
clearable clearable
/> />
<div style="display: flex;justify-content: space-between;margin-left: 12px;"> <div style="display: flex;justify-content: space-between;margin-left: 12px;">
<div style="width: 80%;margin-top: 13px"> <div v-if="isTrue" style="width: 80%;margin-top: 13px">
<div <div
v-for="(item,index) in LSBBBUSSFileList" v-for="(item,index) in LSBBBUSSFileList"
:key="index" :key="index"
style="color: #409eff;cursor:pointer" style="color: #409eff;cursor:pointer"
class="fileClass" class="fileClass"
> >
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span> <span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">--> <span style="margin-left: 7px;">
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />--> <i class="el-icon-view" style="font-size: 18px" title="预览" @click="viewOnlyOffice(item)" />
<!-- </span>--> </span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>-->
</div>
</div> </div>
</div>
<div v-if="!isTrue" style="width: 80%;margin-top: 13px">
<div
v-for="(item,index) in LSBBBUSSFileList"
:key="index"
style="color: #409eff;cursor:pointer"
class="fileClass"
>
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>-->
</div>
</div>
<div style="width: 20%;"> <div style="width: 20%;">
<el-button <el-button
type="primary" type="primary"
@@ -802,6 +820,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import ProcessTitle from '../../../components/ProcessTitle' import ProcessTitle from '../../../components/ProcessTitle'
import { onlyOfficeUrl } from '@/sysConfig'
export default { export default {
name: 'FormEditList', name: 'FormEditList',
@@ -1023,6 +1042,20 @@ export default {
} }
}, },
methods: { methods: {
viewOnlyOffice (item) {
const key = new Date().getTime()
let oldFileName = item.name
let index1 = oldFileName.lastIndexOf('.')
let fileSuffix = oldFileName.substring(index1+1, oldFileName.length)
fileSuffix = fileSuffix.toLowerCase()
oldFileName = oldFileName.substring(0, index1)
if (fileSuffix == 'pdf' || fileSuffix == 'doc' || fileSuffix == 'docx'){
window.open(onlyOfficeUrl + '/viewHistoryOnlyOffice?oldFileName=' + oldFileName + '&fileType=' + fileSuffix +
'&attId=' + item.id + '&key=' + key + '&userName=' + this.$store.getters.userInfo.uName)
}else{
this.$message.warning('此文件不支持onlyoffice预览')
}
},
filterOp (data) { filterOp (data) {
if (!data) { if (!data) {
return '' return ''
@@ -229,14 +229,25 @@
clearable clearable
/> />
<div style="display: flex;justify-content: space-between;margin-left: 12px;"> <div style="display: flex;justify-content: space-between;margin-left: 12px;">
<div style="width: 80%;margin-top: 13px"> <div v-if="isTrue" style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass"> <div v-for="(item,index) in LSBBBUSSFileList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span> <span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
<span style="margin-left: 7px;">
<i class="el-icon-view" style="font-size: 18px" title="预览" @click="viewOnlyOffice(item)" />
</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">--> <!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />--> <!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>--> <!-- </span>-->
</div> </div>
</div> </div>
<div v-if="!isTrue" style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>-->
</div>
</div>
<div style="width: 20%;"> <div style="width: 20%;">
<el-button <el-button
type="primary" type="primary"
@@ -767,6 +778,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessTitle from '../../../components/ProcessTitle' import ProcessTitle from '../../../components/ProcessTitle'
import CurrentOrder from '@/pages/processCenter/pages/components/CurrentOrder'; import CurrentOrder from '@/pages/processCenter/pages/components/CurrentOrder';
@@ -999,6 +1011,20 @@ export default {
} }
}, },
methods: { methods: {
viewOnlyOffice (item) {
const key = new Date().getTime()
let oldFileName = item.name
let index1 = oldFileName.lastIndexOf('.')
let fileSuffix = oldFileName.substring(index1+1, oldFileName.length)
fileSuffix = fileSuffix.toLowerCase()
oldFileName = oldFileName.substring(0, index1)
if (fileSuffix == 'pdf' || fileSuffix == 'doc' || fileSuffix == 'docx'){
window.open(onlyOfficeUrl + '/viewHistoryOnlyOffice?oldFileName=' + oldFileName + '&fileType=' + fileSuffix +
'&attId=' + item.id + '&key=' + key + '&userName=' + this.$store.getters.userInfo.uName)
}else{
this.$message.warning('此文件不支持onlyoffice预览')
}
},
queryOrder () { queryOrder () {
this.$refs.CurrentOrderRef.open(this.form.standSort, this.form.standNum) this.$refs.CurrentOrderRef.open(this.form.standSort, this.form.standNum)
}, },
@@ -173,17 +173,36 @@
<!-- </div>--> <!-- </div>-->
</el-form-item> </el-form-item>
<el-form-item label="历史版本" prop="LSBBBUSSName" class="add-form-item form-item-disabled"> <el-form-item label="历史版本" prop="LSBBBUSSName" class="add-form-item form-item-disabled">
<div <div v-if="isTrue">
v-for="(item,index) in LSBBBUSSFileList" <div
v-if="LSBBBUSSFileList.length > 0" v-for="(item,index) in LSBBBUSSFileList"
:key="index" v-if="LSBBBUSSFileList.length > 0"
style="color: #409eff;cursor:pointer;margin-left: 12px;margin-top: 13px" :key="index"
class="fileClass" style="color: #409eff;cursor:pointer;margin-left: 12px;margin-top: 13px"
> class="fileClass"
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')"> {{ item.name }}</span> >
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">--> <span style="" :title="item.name" @click="handleFilePreview(item,'preview')"> {{ item.name }}</span>
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />--> <span style="margin-left: 7px;">
<!-- </span>--> <i class="el-icon-view" style="font-size: 18px" title="预览" @click="viewOnlyOffice(item)" />
</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>-->
</div>
</div>
<div v-if="!isTrue">
<div
v-for="(item,index) in LSBBBUSSFileList"
v-if="LSBBBUSSFileList.length > 0"
:key="index"
style="color: #409eff;cursor:pointer;margin-left: 12px;margin-top: 13px"
class="fileClass"
>
<span style="" :title="item.name" @click="handleFilePreview(item,'preview')"> {{ item.name }}</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview(item,'down')" />-->
<!-- </span>-->
</div>
</div> </div>
<!-- <div v-if="LSBBBUSSFileList.length>0" v-for="(value,index) in this.LSBBBUSSFileList" :key="index" style="cursor: pointer;color: #00b7ee" @click="downloadFile(value)">--> <!-- <div v-if="LSBBBUSSFileList.length>0" v-for="(value,index) in this.LSBBBUSSFileList" :key="index" style="cursor: pointer;color: #00b7ee" @click="downloadFile(value)">-->
<!-- &lt;!&ndash; {{ value.name }} &ndash;&gt;--> <!-- &lt;!&ndash; {{ value.name }} &ndash;&gt;-->
@@ -597,6 +616,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import ProcessTitle from '../../../components/ProcessTitle' import ProcessTitle from '../../../components/ProcessTitle'
import { onlyOfficeUrl } from '@/sysConfig'
import axios from 'axios'; import axios from 'axios';
export default { export default {
@@ -741,6 +761,20 @@ export default {
this.getDataAsync() this.getDataAsync()
}, },
methods: { methods: {
viewOnlyOffice (item) {
const key = new Date().getTime()
let oldFileName = item.name
let index1 = oldFileName.lastIndexOf('.')
let fileSuffix = oldFileName.substring(index1+1, oldFileName.length)
fileSuffix = fileSuffix.toLowerCase()
oldFileName = oldFileName.substring(0, index1)
if (fileSuffix == 'pdf' || fileSuffix == 'doc' || fileSuffix == 'docx'){
window.open(onlyOfficeUrl + '/viewHistoryOnlyOffice?oldFileName=' + oldFileName + '&fileType=' + fileSuffix +
'&attId=' + item.id + '&key=' + key + '&userName=' + this.$store.getters.userInfo.uName)
}else{
this.$message.warning('此文件不支持onlyoffice预览')
}
},
filterOp (data) { filterOp (data) {
if (!data) { if (!data) {
return '' return ''
@@ -172,6 +172,9 @@
class="fileClass" class="fileClass"
> >
<span style="" :title="item.name" @click="handleFilePreview2(item,'preview')"> {{ item.name }}</span> <span style="" :title="item.name" @click="handleFilePreview2(item,'preview')"> {{ item.name }}</span>
<span style="margin-left: 7px;">
<i class="el-icon-view" style="font-size: 18px" title="预览" @click="viewOnlyOffice(item)" />
</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">--> <!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')" />--> <!-- <i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')" />-->
<!-- </span>--> <!-- </span>-->
@@ -1513,6 +1516,7 @@
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import { onlyOfficeUrl } from '@/sysConfig'
import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription' import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription'
import { import {
saveTaskFirst, saveTaskFirst,
@@ -3090,6 +3094,20 @@ export default {
}, e => { }, e => {
}) })
}, },
viewOnlyOffice (item) {
const key = new Date().getTime()
let oldFileName = item.name
let index1 = oldFileName.lastIndexOf('.')
let fileSuffix = oldFileName.substring(index1+1, oldFileName.length)
fileSuffix = fileSuffix.toLowerCase()
oldFileName = oldFileName.substring(0, index1)
if (fileSuffix == 'pdf' || fileSuffix == 'doc' || fileSuffix == 'docx'){
window.open(onlyOfficeUrl + '/viewHistoryOnlyOffice?oldFileName=' + oldFileName + '&fileType=' + fileSuffix +
'&attId=' + item.id + '&key=' + key + '&userName=' + this.$store.getters.userInfo.uName)
}else{
this.$message.warning('此文件不支持onlyoffice预览')
}
},
beginImportFile (file) { beginImportFile (file) {
const filename = file.name const filename = file.name
const index1 = filename.lastIndexOf('.') const index1 = filename.lastIndexOf('.')
@@ -253,9 +253,12 @@
:key="index" :key="index"
style="color: #409eff;cursor:pointer;margin-left: 12px;" style="color: #409eff;cursor:pointer;margin-left: 12px;"
class="fileClass" class="fileClass"
@click="handleFilePreview(item)"
> >
<!-- @click="handleFilePreview(item)"-->
<span style="" :title="item.name" @click="handleFilePreview2(item,'preview')"> {{ item.name }}</span> <span style="" :title="item.name" @click="handleFilePreview2(item,'preview')"> {{ item.name }}</span>
<span style="margin-left: 7px;">
<i class="el-icon-view" style="font-size: 18px" title="预览" @click="viewOnlyOffice(item)" />
</span>
<!-- <span v-if="item.id !== ''" style="margin-left: 7px;">--> <!-- <span v-if="item.id !== ''" style="margin-left: 7px;">-->
<!-- <i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')" />--> <!-- <i class="el-icon-download" title="下载" @click="handleFilePreview2(item,'down')" />-->
<!-- </span>--> <!-- </span>-->
@@ -1776,6 +1779,7 @@ import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from '@/components/treeSelect/treeSelectModule.vue'; import treeSelectModule from '@/components/treeSelect/treeSelectModule.vue';
import { selectByIdAtt } from '@/api/flow/index.js' import { selectByIdAtt } from '@/api/flow/index.js'
import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription' import ReceiptDescription from '@/components/hzwlComponents/ReceiptDescription'
import { onlyOfficeUrl } from '@/sysConfig'
const Base64 = require('js-base64').Base64; const Base64 = require('js-base64').Base64;
@@ -2700,6 +2704,20 @@ export default {
XCSJBUSS: this.dateFormatter(), XCSJBUSS: this.dateFormatter(),
} // 标准信息 } // 标准信息
}, },
viewOnlyOffice (item) {
const key = new Date().getTime()
let oldFileName = item.name
let index1 = oldFileName.lastIndexOf('.')
let fileSuffix = oldFileName.substring(index1+1, oldFileName.length)
fileSuffix = fileSuffix.toLowerCase()
oldFileName = oldFileName.substring(0, index1)
if (fileSuffix == 'pdf' || fileSuffix == 'doc' || fileSuffix == 'docx'){
window.open(onlyOfficeUrl + '/viewHistoryOnlyOffice?oldFileName=' + oldFileName + '&fileType=' + fileSuffix +
'&attId=' + item.id + '&key=' + key + '&userName=' + this.$store.getters.userInfo.uName)
}else{
this.$message.warning('此文件不支持onlyoffice预览')
}
},
filterObj (obj) { filterObj (obj) {
if (obj && obj !== '') { if (obj && obj !== '') {
if (obj instanceof Array) { if (obj instanceof Array) {
@@ -3833,6 +3851,7 @@ export default {
} else { } else {
attId = file.response.data.id attId = file.response.data.id
} }
console.log(file);
if (file.name == this.form.standName) { if (file.name == this.form.standName) {
let fileName = '' let fileName = ''
let fileNam2 = '' let fileNam2 = ''