feat: There is no way the, plan lxd

This commit is contained in:
super_liu
2022-01-18 16:13:56 +08:00
parent 68471bda31
commit dae0e83a6c
5 changed files with 110 additions and 3 deletions
@@ -402,6 +402,17 @@
v-model="addForm.esMatingRelations"
></custom-input-for-all-standards2>
</template>
<el-form-item label="立项单" prop="LXDName" class="add-form-item" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<div v-if="LXDList.length > 0" v-for="(item,index) in LXDList" :key="index" style="color: #409eff;cursor:pointer">
<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 !== '' && DrawerType !== 'see'">
<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-col>
</el-row>
@@ -597,6 +608,7 @@
},
data() {
return {
LXDList: [],
CBList: [],
BZList: [],
TXJGList: [],
@@ -1031,6 +1043,34 @@
this.form.pageSize = pageSize
this.getData()
},
handleFilePreview(file,type) {
let id = ""
let fileName = ""
let fileNam2 = ""
if(this.addForm.esName && this.addForm.esName !== ''){
fileName = this.addForm.esName+'-立项单.docx'
fileNam2 = this.addForm.esName+'-立项单'
}else {
fileName = '立项单.docx'
fileNam2 = '立项单'
}
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.$onlineEditPreview(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
}else {
this.$onlineEdit(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
}
},
handleCommand (command) {
switch (command[1]) {
case '编辑':
@@ -1064,6 +1104,16 @@
drafterName: command[0].drafterName, // 起草人
drafter: command[0].drafter,
}
this.addForm.LXD = command[0].lxd
let fileName1 = ""
if(this.addForm.esName && this.addForm.esName !== ''){
fileName1 = this.addForm.esName+'-立项单'
}else {
fileName1 = '立项单'
}
this.addForm.LXDName = fileName1
this.LXDList=this.assemble(command[0].lxd,fileName1)
console.log(this.LXDList)
if (typeof (this.addForm.area) === 'string') {
this.addForm.area = command[0].area.split(',')
}
@@ -1096,12 +1146,32 @@
this.DrawerType = 'see'
this.addDrawer = true
this.addForm = command[0]
this.addForm.LXD = command[0].lxd
let fileName = ""
if(this.addForm.esName && this.addForm.esName !== ''){
fileName = this.addForm.esName+'-立项单'
}else {
fileName = '立项单'
}
this.addForm.LXDName = fileName
this.LXDList=this.assemble(command[0].lxd,fileName);
console.log(this.LXDList)
if (typeof (this.addForm.area) === 'string') {
this.addForm.area = command[0].area.split(',')
}
break
}
},
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;
},
getData () {
this.loading = true
this.$http.post('esRevisePlan/es-revise-plan/queryAllPlans', this.form, {