Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-12-05 15:35:21 +08:00
14 changed files with 237 additions and 24 deletions
@@ -241,6 +241,15 @@ export default {
comityTel: [], comityTel: [],
comityOpRole: '', comityOpRole: '',
comityInRoleId: '', comityInRoleId: '',
fillPeople: '',
fillPeopleId: '',
fillUnit: '',
fillDept: '',
fillPost: '',
fillTel: '',
fillMail: '',
fillLeader: '',
fillLeaderId: '',
}, },
roleForm: {}, roleForm: {},
commentText: '', commentText: '',
@@ -153,7 +153,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" prop="rh_pageData.fillLeader" label="参与人部门领导:"> <el-form-item class="add-form-item" prop="fillLeader" label="参与人部门领导:">
<el-input <el-input
style="width: 100%" style="width: 100%"
readonly readonly
@@ -165,11 +165,27 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="资料:"> <el-form-item class="add-form-item" label="资料:">
<el-input <el-upload
style="width: 100%" style="width: 100%"
placeholder="请填写" class="upload_style"
v-model="rh_pageData.fillFile" :disabled="acceptShow"
/> multiple
ref="uploadFile"
:action="uploadPath"
name="file"
:file-list="fillFileList"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="handleBeforeUpload"
:before-remove="handleBeforeRemove"
:on-success="handleOnsuccess"
>
<el-button
type="primary"
class="common-button-primary"
size="mini">
点击上传
</el-button>
</el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -323,7 +339,7 @@ export default {
fillMail: '', fillMail: '',
fillLeader: '', fillLeader: '',
fillLeaderId: '', fillLeaderId: '',
fillFile: '', fillFile: [],
}, },
rh_rules: { rh_rules: {
fillLeader: [ fillLeader: [
@@ -345,7 +361,15 @@ export default {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
commentText: '', commentText: '',
infoSourcesLength: '' infoSourcesLength: '',
/** 上传相关 */
acceptShow: false,
// 上传路径
uploadPath: 'api/att/attFile/upload',
// 上传所储存文件数组
fillFileList: [],
newDataList: [],
} }
}, },
computed: { computed: {
@@ -385,11 +409,12 @@ export default {
getFormFieldList(item) { getFormFieldList(item) {
this.$nextTick(() => { this.$nextTick(() => {
this.rh_pageData = JSON.parse(JSON.stringify(item)).rh_pageData this.rh_pageData = JSON.parse(JSON.stringify(item)).rh_pageData
this.rh_pageData.fillLeader = ''
this.rh_pageData.fillPeople = this.$store.getters.userInfo.userName this.rh_pageData.fillPeople = this.$store.getters.userInfo.userName
this.rh_pageData.fillPeopleId = this.$store.getters.userInfo.userId this.rh_pageData.fillPeopleId = this.$store.getters.userInfo.userId
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
this.infoSourcesLength = this.rh_pageData.infoSources.length this.infoSourcesLength = this.rh_pageData.infoSources.length
// this.rh_pageData.comityFileNum = this.fileTextList // this.rh_pageData.comityFileNum = this.fillFileList
}) })
}, },
// 右上标签页面切换 // 右上标签页面切换
@@ -458,6 +483,65 @@ export default {
}) })
}, },
// 文件上传限制条件
handleBeforeUpload(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ZIP' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
return true
} else {
this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传ZIP/DOCX或XLS文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 移除上传的文件
handleBeforeRemove(file, fileList) {
this.fileData = fileList
this.fillFileList.forEach((item, index) => {
if (item.name === file.name || item.id === file.id) {
this.fillFileList.splice(index, 1)
}
})
this.rh_pageData.fillFile = this.fillFileList
},
// 文件上传成功
handleOnsuccess(res, file, fileList) {
if (res.ok) {
if (this.fillFileList !== null) {
this.newDataList = this.fillFileList
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
} else {
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
}
this.rh_pageData.fillFile = this.newDataList
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
this.fileMadel = false
}
},
/** 点击对应附件进行下载*/ /** 点击对应附件进行下载*/
previews(val) { previews(val) {
let attId = val let attId = val
@@ -107,7 +107,14 @@
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="身份"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"/> <el-table-column prop="fillFile" align="center" label="资料" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span>
<span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
{{ item.name }} {{ ';' }}
</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -146,7 +146,14 @@
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="身份"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"/> <el-table-column prop="fillFile" align="center" label="资料" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span>
<span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
{{ item.name }} {{ ';' }}
</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -109,7 +109,14 @@
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="身份"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"/> <el-table-column prop="fillFile" align="center" label="资料" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span>
<span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
{{ item.name }} {{ ';' }}
</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -112,7 +112,14 @@
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="身份"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"/> <el-table-column prop="fillFile" align="center" label="资料" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span>
<span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
{{ item.name }} {{ ';' }}
</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -214,7 +214,17 @@ export default {
active: '1', active: '1',
acceptShow: false, acceptShow: false,
ch_pageData: {}, ch_pageData: {
fillPeopleId: '',
fillPeople: '',
fillUnit: '',
fillDept: '',
fillPost: '',
fillTel: '',
fillMail: '',
fillLeader: '',
fillFile: '',
},
ch_rules: {}, ch_rules: {},
nodeList: [], nodeList: [],
commentText: '', commentText: '',
@@ -335,7 +345,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -123,7 +123,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" prop="ch_pageData.fillLeader" label="参与人部门领导:"> <el-form-item class="add-form-item" prop="fillLeader" label="参与人部门领导:">
<el-input <el-input
style="width: 100%" style="width: 100%"
readonly readonly
@@ -418,7 +418,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -349,7 +349,14 @@ export default {
}); });
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -318,7 +318,7 @@ export default {
this.deleteDataList.map(item => { this.deleteDataList.map(item => {
let index; let index;
index = this.ch_pageData.myPartRole.findIndex(items => { index = this.ch_pageData.myPartRole.findIndex(items => {
return items.id === item; return items === item;
}); });
if (index > -1) { if (index > -1) {
this.ch_pageData.myPartRole.splice(index, 1); this.ch_pageData.myPartRole.splice(index, 1);
@@ -377,7 +377,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -414,7 +414,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -213,7 +213,17 @@ export default {
active: '1', active: '1',
acceptShow: false, acceptShow: false,
ch_pageData: {}, ch_pageData: {
fillPeopleId: '',
fillPeople: '',
fillUnit: '',
fillDept: '',
fillPost: '',
fillTel: '',
fillMail: '',
fillLeader: '',
fillFile: '',
},
ch_rules: {}, ch_rules: {},
nodeList: [], nodeList: [],
commentText: '', commentText: '',
@@ -334,7 +344,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -348,7 +348,14 @@ export default {
}); });
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -276,6 +276,10 @@ export default {
}, },
getData() { getData() {
if (this.taskInfo === '标准法规工程师修订完毕') {
this.passTitle = '回执说明',
this.passHolder = '请输入回执说明'
}
const params = { const params = {
taskIds: this.taskIds, taskIds: this.taskIds,
pId: this.pId, pId: this.pId,
@@ -343,6 +347,12 @@ export default {
json.president = this.roleForm.engineerUserId json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') { } else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser json.engineerSumDone = this.roleForm.startUser
} else {
json = {
ch_pageData: this.ch_pageData,
commentText: this.textarea,
roleList: this.roleForm
}
} }
this.$refs['ch_pageData'].validate((valid) => { this.$refs['ch_pageData'].validate((valid) => {
if (valid) { if (valid) {
@@ -377,6 +387,12 @@ export default {
json.president = this.roleForm.engineerUserId json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') { } else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser json.engineerSumDone = this.roleForm.startUser
} else {
json = {
ch_pageData: this.ch_pageData,
commentText: this.textarea,
roleList: this.roleForm
}
} }
this.$refs['ch_pageData'].validate((valid) => { this.$refs['ch_pageData'].validate((valid) => {
if (valid) { if (valid) {
@@ -395,7 +411,14 @@ export default {
} }
}) })
} },
/** 点击对应附件进行下载*/
previews(val) {
let attId = val
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>