feat: There is no way the, LXD
This commit is contained in:
@@ -448,6 +448,22 @@ export function processModelHisOne (data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function saveEditFile (data) {
|
||||
return axios({
|
||||
url: '/api/lawss/activiti/saveEditFile',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function processEditFile (data) {
|
||||
return axios({
|
||||
url: '/api/lawss/activiti/processEditFile',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function processModelHisOneCount (data) {
|
||||
return axios({
|
||||
url: '/api/lawss/activiti/processModelHisOneCount',
|
||||
|
||||
+13
-1
@@ -6,6 +6,8 @@ import base64 from './base64'
|
||||
import dateFormat from './date'
|
||||
import hasPermission from './hasPermission'
|
||||
import preview from './preview'
|
||||
import onlineEdit from './onlineEdit'
|
||||
import onlinePreview from './onlinePreview'
|
||||
|
||||
// 表单验证
|
||||
import verify from './verify'
|
||||
@@ -38,7 +40,17 @@ const install = function (Vue) {
|
||||
get () {
|
||||
return preview
|
||||
}
|
||||
}
|
||||
},
|
||||
$onlinePreview: {
|
||||
get () {
|
||||
return onlinePreview
|
||||
}
|
||||
},
|
||||
$onlineEdit: {
|
||||
get () {
|
||||
return onlineEdit
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
export default {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 在线编辑
|
||||
*/
|
||||
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
||||
import { processEditFile } from 'api/process'
|
||||
let Base64 = require('js-base64').Base64;
|
||||
export default (id,nodeName,userId,userName) => {
|
||||
processEditFile({
|
||||
id
|
||||
}).then(res => {
|
||||
if(res){
|
||||
const editFileInfo = res
|
||||
const showName = nodeName
|
||||
const editFilePath = editFileInfo.editFilePath.split("/")
|
||||
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
|
||||
editFileInfo.fileName = editFilePath[2]
|
||||
editFileInfo.userId = userId
|
||||
editFileInfo.userName = userName
|
||||
if(editFileInfo.pid){
|
||||
editFileInfo.pId = editFileInfo.pid
|
||||
}
|
||||
const nowTime = new Date().getTime()
|
||||
window.open(onlyOfficeUrl+'/editor?pid='+editFileInfo.pId+'&taskIds='+editFileInfo.taskId+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
|
||||
}
|
||||
}).catch(e => {
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 工作流文件预览
|
||||
*/
|
||||
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
|
||||
import { processEditFile } from 'api/process'
|
||||
let Base64 = require('js-base64').Base64;
|
||||
export default id => {
|
||||
processEditFile({
|
||||
id
|
||||
}).then(res => {
|
||||
if(res){
|
||||
const editFileInfo = res
|
||||
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
|
||||
}
|
||||
}).catch(e => {
|
||||
})
|
||||
}
|
||||
@@ -171,6 +171,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>
|
||||
</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 选择企业标准弹窗-->
|
||||
<el-drawer
|
||||
@@ -367,6 +378,7 @@ export default {
|
||||
cbcdOptions: [],
|
||||
BZList: [],
|
||||
qcdwOptions: [],
|
||||
LXDList: [],
|
||||
qbfsForm: {
|
||||
type: "5",
|
||||
unit: "", // 单位
|
||||
@@ -386,7 +398,9 @@ export default {
|
||||
drafter: "", // 起草人
|
||||
drafterName: "",
|
||||
esMatingRelations: "", //配套标准
|
||||
newReason: "" //立项原因
|
||||
newReason: "", //立项原因
|
||||
LXDName: "", //立项单名称
|
||||
LXD: "", //立项单
|
||||
// remarks: '', // 备注
|
||||
},
|
||||
qbfsFormRules: {
|
||||
@@ -428,6 +442,15 @@ export default {
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'qbfsForm.esName': {
|
||||
handler: function(val) {
|
||||
if(val && val !== ''){
|
||||
this.qbfsForm.LXDName = val+'-立项单'
|
||||
this.LXDList = []
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,val+'-立项单');
|
||||
}
|
||||
}
|
||||
},
|
||||
message: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
@@ -449,10 +472,58 @@ export default {
|
||||
this.standSortOptions = res.data.BUSSSTANDCLASS // 标准类别
|
||||
this.standSystemOptions = res.data.TXLBBUSS // 体系结构
|
||||
this.qcdwOptions = res.data.QCDW // 起草单位
|
||||
|
||||
})
|
||||
if(this.$route.query.bpnId === undefined && this.$route.query.taskIds === undefined){
|
||||
this.$http.get('/lawss/activiti/saveEditFile', '',{
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log(res)
|
||||
if(res){
|
||||
this.qbfsForm.LXD = res.id
|
||||
this.qbfsForm.LXDName = '立项单'
|
||||
this.LXDList=this.assemble(res.id,'立项单');
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
//体系结构单选
|
||||
handleClick(data,checked, node){
|
||||
if(checked){
|
||||
|
||||
@@ -153,6 +153,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '5'" label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<!-- <span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">-->
|
||||
<!-- <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>-->
|
||||
<!-- </span>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '1'" label="合并原因" prop="mergeReason" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
disabled
|
||||
@@ -337,6 +348,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
LXDList: [],
|
||||
BZList: [],
|
||||
active: '1',
|
||||
type: '',
|
||||
@@ -368,6 +380,32 @@ export default {
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
processTable() {
|
||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||
prcNum: this.$route.query.prcNum,
|
||||
@@ -403,8 +441,19 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.qbfsForm = JSON.parse(JSON.stringify(item))
|
||||
this.type = item.type
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,this.qbfsForm.LXDName);
|
||||
})
|
||||
},
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
handleTabs(name){
|
||||
this.active = name
|
||||
},
|
||||
|
||||
@@ -153,6 +153,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '5'" label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<!-- <span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">-->
|
||||
<!-- <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>-->
|
||||
<!-- </span>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '1'" label="合并原因" prop="mergeReason" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
disabled
|
||||
@@ -337,6 +348,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
LXDList: [],
|
||||
BZList: [],
|
||||
standSortOptions: [],
|
||||
active: '1',
|
||||
@@ -369,6 +381,32 @@ export default {
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
processTable() {
|
||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||
prcNum: this.$route.query.prcNum,
|
||||
@@ -405,8 +443,19 @@ export default {
|
||||
this.qbfsForm = JSON.parse(JSON.stringify(item))
|
||||
console.log(item.area.join(','));
|
||||
this.type = item.type
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,this.qbfsForm.LXDName);
|
||||
})
|
||||
},
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
handleTabs(name){
|
||||
this.active = name
|
||||
},
|
||||
|
||||
@@ -153,6 +153,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '5'" label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<!-- <span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">-->
|
||||
<!-- <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>-->
|
||||
<!-- </span>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '1'" label="合并原因" prop="mergeReason" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
disabled
|
||||
@@ -335,6 +346,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
LXDList: [],
|
||||
BZList: [],
|
||||
active: '1',
|
||||
type: '',
|
||||
@@ -366,6 +378,32 @@ export default {
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
processTable() {
|
||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||
prcNum: this.$route.query.prcNum,
|
||||
@@ -401,8 +439,19 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.qbfsForm = JSON.parse(JSON.stringify(item))
|
||||
this.type = item.type
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,this.qbfsForm.LXDName);
|
||||
})
|
||||
},
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
handleTabs(name){
|
||||
this.active = name
|
||||
},
|
||||
|
||||
@@ -153,6 +153,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '5'" label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<!-- <span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">-->
|
||||
<!-- <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>-->
|
||||
<!-- </span>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '1'" label="合并原因" prop="mergeReason" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
disabled
|
||||
@@ -337,6 +348,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
LXDList: [],
|
||||
BZList: [],
|
||||
active: '1',
|
||||
type: '',
|
||||
@@ -368,6 +380,33 @@ export default {
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
processTable() {
|
||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||
prcNum: this.$route.query.prcNum,
|
||||
@@ -403,8 +442,19 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.qbfsForm = JSON.parse(JSON.stringify(item))
|
||||
this.type = item.type
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,this.qbfsForm.LXDName);
|
||||
})
|
||||
},
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
handleTabs(name){
|
||||
this.active = name
|
||||
},
|
||||
|
||||
@@ -153,6 +153,17 @@
|
||||
placeholder="请输入立项原因"
|
||||
:maxlength="500"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '5'" label="立项单" prop="LXDName" class="add-form-item form-item-disabled">
|
||||
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer" class="fileClass">
|
||||
<span style="width: 80%;" @click="handleFilePreview(item,'preview')">{{ item.name }}</span>
|
||||
<span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">
|
||||
<el-button type="primary" size="mini" plain icon="el-icon-download" @click="handleFilePreview(item,'down')"></el-button>
|
||||
</span>
|
||||
<!-- <span style="width: 20%;margin-left: 15px;" v-if="item.id !== ''">-->
|
||||
<!-- <el-button type="primary" size="mini" plain icon="el-icon-edit" @click="handleFilePreview(item,'onlineEdit')"></el-button>-->
|
||||
<!-- </span>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type === '1'" label="合并原因" prop="mergeReason" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
disabled
|
||||
@@ -337,6 +348,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
LXDList: [],
|
||||
BZList: [],
|
||||
active: '1',
|
||||
type: '',
|
||||
@@ -368,6 +380,32 @@ export default {
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 文件预览及下载
|
||||
handleFilePreview(file,type) {
|
||||
let id = ""
|
||||
let fileName = ""
|
||||
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
|
||||
fileName = this.qbfsForm.esName+'-立项单.docx'
|
||||
}else {
|
||||
fileName = '立项单.docx'
|
||||
}
|
||||
if(file && file.id){
|
||||
id = file.id
|
||||
}else {
|
||||
id = file.response.data.id
|
||||
}
|
||||
if (type === 'down') {
|
||||
if (id) {
|
||||
window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
|
||||
} else {
|
||||
this.$message.warning('文件不存在,下载失败')
|
||||
}
|
||||
} else if(type === 'preview'){
|
||||
this.$onlinePreview(id)
|
||||
}else {
|
||||
this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
|
||||
}
|
||||
},
|
||||
processTable() {
|
||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||
prcNum: this.$route.query.prcNum,
|
||||
@@ -403,8 +441,19 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.qbfsForm = JSON.parse(JSON.stringify(item))
|
||||
this.type = item.type
|
||||
this.LXDList=this.assemble(this.qbfsForm.LXD,this.qbfsForm.LXDName);
|
||||
})
|
||||
},
|
||||
assemble(ids,names){
|
||||
let list= new Array();
|
||||
let idArray=ids.split(',');
|
||||
let nameArray=names.split(',');
|
||||
for(let i=0; i<idArray.length; i++){
|
||||
list.push({id:idArray[i],name:nameArray[i]});
|
||||
}
|
||||
|
||||
return list;
|
||||
},
|
||||
handleTabs(name){
|
||||
this.active = name
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user