[update] 企标制修订和企标更改流程的在线编辑

This commit is contained in:
lideqin
2024-01-24 13:43:25 +08:00
parent a4523b6aed
commit f777d43cca
18 changed files with 309 additions and 78 deletions
@@ -10,9 +10,8 @@
</div>
<a-form-model-item class="item-model">
<div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p>
<a-button type="primary">{{ $t('view') }}</a-button>
<p>{{ $t('enterpriseStandard') }}</p>
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
</div>
</a-form-model-item>
</div>
@@ -53,6 +52,9 @@
import BaseInfoForm from './BaseInfoForm'
import JTable from '@/components/jero/JTable'
import CommentModal from './CommentModal'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'CommentObjectEnterBaseInfo',
@@ -118,7 +120,8 @@ export default {
width: 200
}
],
dataSource: []
dataSource: [],
onEditFile: '' // 在线编辑的文件id
}
},
methods: {
@@ -134,6 +137,7 @@ export default {
...item
}
})
this.onEditFile = data.onEditFile
// 给表单赋值
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
@@ -163,15 +167,15 @@ export default {
},
// 新增征求意见
handleAdd () {
// 不知道左侧预览哪个文件
const file = ''
// 左侧预览在线编辑的文件
const file = this.onEditFile
this.$refs.commentModal.title = this.$t('newlyAdded')
this.$refs.commentModal.add(file)
},
// 征求意见的编辑
handleEdit (record) {
// 不知道左侧预览哪个文件
const file = ''
// 左侧预览在线编辑的文件
const file = this.onEditFile
this.$refs.commentModal.title = this.$t('edit')
this.$refs.commentModal.edit(file, record, record.uid)
},
@@ -200,6 +204,11 @@ export default {
}
this.dataSource.push({ uid: uidGenerator(), ...value })
}
},
// 在线编辑的查看
onlineEditView () {
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
kkFilePreview(fileFullUrl)
}
}
}