@@ -201,6 +201,8 @@
+
+
@@ -269,8 +271,7 @@ export default {
if (_this.editStatus&&_this.form.toolCode&&_this.form.toolRespDept) {
checkToolExist({toolId:_this.form.toolId,toolCode:_this.form.toolCode,toolRespDept:_this.form.toolRespDept}).then((response) => {
if (response.data) {
- let deptName = _this.getDeptName(_this.deptOptions, _this.form.toolRespDept)
- callback(new Error(deptName+"下已存在编号为"+_this.form.toolCode+'的工具,请勿重复添加!'))
+ callback(new Error(_this.form.toolRespDeptName+"下已存在编号为"+_this.form.toolCode+'的工具,请勿重复添加!'))
} else {
callback()
}
@@ -283,6 +284,7 @@ export default {
toolPrincipalsChoose: false,
// 新增时的关联附件
docList: [],
+ addDocShow: false,
docQueryParams: {
pageNum: 1,
pageSize: 10,
@@ -720,7 +722,12 @@ export default {
handleDelete(dataList,index){
dataList.splice(index,1)
},
-
+ /**
+ * 新增上传附件
+ */
+ handleDocAdd() {
+ this.addDocShow = true
+ },
getDocumentList(toolId) {
this.loading = true
this.docQueryParams.toolId = toolId
@@ -731,29 +738,15 @@ export default {
}
);
},
- getDeptName(items, id) {
- let label = ''
- items.forEach(item => {
- if(item['id'] == id){
- label = item['label']
- return
- }
- })
- if(label == ''){
- items.forEach(item => {
- if (item.children) {
- label = this.getDeptName(item.children, id)
- }
- })
- }
- return label
- },
submitPeople(peopleList){
this.$set(this.form,'toolPrincipals',peopleList[0]['userId'])
this.$set(this.form,'toolPrincipalsName',peopleList[0]['nickName'])
this.toolPrincipalsChoose = false;
this.$refs['eForm'].validateField("toolPrincipals");
},
+ handleSelectNode(node){
+ this.$set(this.form,'toolRespDeptName',node.label)
+ },
handleFileAdd(fileList){
console.log(fileList)
}
diff --git a/src/views/workflowList/addWorkflow/use_apply.vue b/src/views/workflowList/addWorkflow/use_apply.vue
index 0a66fa7..97af939 100644
--- a/src/views/workflowList/addWorkflow/use_apply.vue
+++ b/src/views/workflowList/addWorkflow/use_apply.vue
@@ -274,7 +274,14 @@ export default {
rest(data){
let _this = this
_this.activeName = "info"
- this.dataList = [{...data}]
+ _this.dataList = [{...data}]
+ _this.form={
+ userId:_this.userInfo.userId,
+ nickName:_this.userInfo.nickName,
+ deptId:_this.userInfo.deptId,
+ deptName:_this.userInfo.dept.deptName,
+ reason: ""
+ }
},
procInstInfoAndStatus(procInstId){
let _this = this