|
@@ -14,82 +14,66 @@
|
|
</a-button>
|
|
</a-button>
|
|
<a-tab-pane :tab="itez.flowerName" v-for="(itez,indez) in tabPaneList" :key="indez + 1">
|
|
<a-tab-pane :tab="itez.flowerName" v-for="(itez,indez) in tabPaneList" :key="indez + 1">
|
|
<a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
|
|
<a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
|
|
- <a-col :span="12" >
|
|
|
|
|
|
+ <div style="width:50%;">
|
|
<a-form-item
|
|
<a-form-item
|
|
label="流程名称:"
|
|
label="流程名称:"
|
|
name="flowerName"
|
|
name="flowerName"
|
|
>
|
|
>
|
|
- <a-input v-model="itez.flowerName" placeholder="请输入"/>
|
|
|
|
|
|
+ <a-input v-model="itez.flowerName" :maxLength="20" placeholder="请输入"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </a-col>
|
|
|
|
|
|
+ </div>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
|
|
<a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
|
|
- <a-col :span="12" >
|
|
|
|
|
|
+ <div style="width:50%;">
|
|
<a-form-item
|
|
<a-form-item
|
|
label="关联分类:"
|
|
label="关联分类:"
|
|
- name="categoryId"
|
|
|
|
|
|
+ name="categoryId"
|
|
>
|
|
>
|
|
- <!-- <a-cascader v-model="itez.categoryId"
|
|
|
|
- class="set-input scroll-ckunk"
|
|
|
|
- :popupStyle="{
|
|
|
|
- maxWidth: widthVar + 'px',
|
|
|
|
- 'overflow-x': 'auto'
|
|
|
|
- }"
|
|
|
|
- :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
|
|
|
|
- :options="classifyList"
|
|
|
|
- :fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- changeOnSelect
|
|
|
|
- @change="handleClassifyChange" /> -->
|
|
|
|
- <a-tree-select
|
|
|
|
- :replaceFields="{ key: 'pkId',title: 'name', value: 'pkId', children: 'children' }"
|
|
|
|
- v-model="itez.categoryId"
|
|
|
|
- style="width: 100%"
|
|
|
|
- :tree-data="classifyList"
|
|
|
|
- tree-checkable
|
|
|
|
- :maxTagCount="10"
|
|
|
|
- :treeCheckStrictly="true"
|
|
|
|
- :show-checked-strategy="SHOW_All"
|
|
|
|
- search-placeholder="请选择关联分类"
|
|
|
|
- @select="selectTree"
|
|
|
|
- />
|
|
|
|
|
|
+ <a-tree-select
|
|
|
|
+ :replaceFields="{ key: 'pkId',title: 'name', value: 'pkId', children: 'children' }"
|
|
|
|
+ v-model="itez.categoryId"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :tree-data="classifyList"
|
|
|
|
+ tree-checkable
|
|
|
|
+ :maxTagCount="10"
|
|
|
|
+ :treeCheckStrictly="true"
|
|
|
|
+ :show-checked-strategy="SHOW_All"
|
|
|
|
+ search-placeholder="请选择关联分类"
|
|
|
|
+ @select="selectTree"
|
|
|
|
+ />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </a-col>
|
|
|
|
|
|
+ </div>
|
|
</a-row>
|
|
</a-row>
|
|
- <a-row :gutter="24" style="margin: 0;" v-for="(item,index) in itez.knowledgeApprovalNode" :key="index" class="rowList">
|
|
|
|
- <a-col :span="6" >
|
|
|
|
|
|
+ <a-row type="flex" :gutter="24" style="margin: 0;" v-for="(item,index) in itez.knowledgeApprovalNode" :key="index" class="rowList">
|
|
|
|
+ <div style="width:50%;display:flex;">
|
|
<a-form-item
|
|
<a-form-item
|
|
label="节点名称"
|
|
label="节点名称"
|
|
name="name"
|
|
name="name"
|
|
|
|
+ style="width:50%;"
|
|
>
|
|
>
|
|
<a-input :disabled="item.isFinal == 1" v-model="item.name" placeholder="请输入"/>
|
|
<a-input :disabled="item.isFinal == 1" v-model="item.name" placeholder="请输入"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </a-col>
|
|
|
|
- <a-col :span="6">
|
|
|
|
<a-form-item
|
|
<a-form-item
|
|
label="审批人"
|
|
label="审批人"
|
|
name="approverName"
|
|
name="approverName"
|
|
|
|
+ style="width:50%;"
|
|
>
|
|
>
|
|
<div @click="handleShowAuditClick(index,indez)">
|
|
<div @click="handleShowAuditClick(index,indez)">
|
|
<a-select v-model="item.approverName" :showArrow="false" :open="false" placeholder="请选择组织部门授予知识访问权限"></a-select>
|
|
<a-select v-model="item.approverName" :showArrow="false" :open="false" placeholder="请选择组织部门授予知识访问权限"></a-select>
|
|
</div>
|
|
</div>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </a-col>
|
|
|
|
- <a-col :span="6">
|
|
|
|
- <a-row :gutter="24" type="flex" justify="start">
|
|
|
|
- <a-button :style="{display: (item.isFinal == 1 || itez.knowledgeApprovalNode.length == 1) ? 'none' : ''}" @click="delRow(index,indez)" shape="circle" icon="delete"></a-button>
|
|
|
|
- <a-button v-if="itez.knowledgeApprovalNode.length != (index + 1) || itez.knowledgeApprovalNode.length==1" type="primary" @click="addRow(index,indez)" shape="circle" icon="plus"></a-button>
|
|
|
|
- </a-row>
|
|
|
|
- </a-col>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div style="width:6%;height:40px;display:flex;align-items:center;">
|
|
|
|
+ <a-button :style="{display: (item.isFinal == 1 || itez.knowledgeApprovalNode.length == 1) ? 'none' : ''}" style="margin-right:10px;" @click="delRow(index,indez)" shape="circle" icon="delete"></a-button>
|
|
|
|
+ <a-button v-if="itez.knowledgeApprovalNode.length != (index + 1) || itez.knowledgeApprovalNode.length==1" type="primary" @click="addRow(index,indez)" shape="circle" icon="plus"></a-button>
|
|
|
|
+ </div>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row :gutter="24" style="margin: 40px 0;" class="rowList">
|
|
<a-row :gutter="24" style="margin: 40px 0;" class="rowList">
|
|
- <a-col :span="6" :push="12">
|
|
|
|
- <a-row :gutter="24" type="flex" justify="end">
|
|
|
|
- <a-button @click="$router.back()">取消</a-button>
|
|
|
|
- <a-button v-if="indez != 0" style="margin-right:20px;" @click="handleDelFlowClick(itez.pkId,indez)">删除</a-button>
|
|
|
|
- <a-button type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
|
|
|
|
- </a-row>
|
|
|
|
- </a-col>
|
|
|
|
|
|
+ <div style="width:56%;height:40px;display:flex;align-items:center;justify-content:flex-end;">
|
|
|
|
+ <a-button style="margin-right:20px;" @click="$router.back()">取消</a-button>
|
|
|
|
+ <a-button v-if="indez != 0" style="margin-right:20px;" @click="handleDelFlowClick(itez.pkId,indez)">删除</a-button>
|
|
|
|
+ <a-button type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
|
|
|
|
+ </div>
|
|
</a-row>
|
|
</a-row>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
@@ -229,10 +213,20 @@ export default {
|
|
},200)
|
|
},200)
|
|
},
|
|
},
|
|
async handleSaveClick() {
|
|
async handleSaveClick() {
|
|
|
|
+ const flowerName = this.tabPaneList[this.tabsKeys-1].flowerName
|
|
|
|
+ if(!flowerName) {
|
|
|
|
+ this.$message.error("流程名称不能为空");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
// 判断流程名是否重复
|
|
// 判断流程名是否重复
|
|
- if(this.tabPaneList.filter(item => item.flowerName == this.tabPaneList[this.tabsKeys-1].flowerName).length > 1) {
|
|
|
|
- this.$message.error("流程名称重复");
|
|
|
|
- return
|
|
|
|
|
|
+ if(flowerName == '请设置流程名称') {
|
|
|
|
+ this.$message.error("保存前请重新设置审核流程名称!");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 判断流程名是否重复
|
|
|
|
+ if(this.tabPaneList.filter(item => item.flowerName == flowerName).length > 1) {
|
|
|
|
+ this.$message.error("流程名称重复");
|
|
|
|
+ return
|
|
}
|
|
}
|
|
// 判断信息是否填全
|
|
// 判断信息是否填全
|
|
for(let i of this.tabPaneList[this.tabsKeys-1].knowledgeApprovalNode) {
|
|
for(let i of this.tabPaneList[this.tabsKeys-1].knowledgeApprovalNode) {
|
|
@@ -250,7 +244,7 @@ export default {
|
|
},
|
|
},
|
|
handleAddFlowClick() {
|
|
handleAddFlowClick() {
|
|
this.tabPaneList.push({
|
|
this.tabPaneList.push({
|
|
- flowerName: '流程'+ this.tabPaneList.length,
|
|
|
|
|
|
+ flowerName: '请设置流程名称',
|
|
categoryId: [],
|
|
categoryId: [],
|
|
knowledgeApprovalNode: [
|
|
knowledgeApprovalNode: [
|
|
{
|
|
{
|
|
@@ -261,6 +255,10 @@ export default {
|
|
}
|
|
}
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
+ // console.log(this.tabPaneList.length + 1)
|
|
|
|
+ this.tabsKeys = this.tabPaneList.length
|
|
|
|
+ // this.$nextTick(() => this.tabsKeys = this.tabPaneList.length + 1)
|
|
|
|
+
|
|
},
|
|
},
|
|
handleDelFlowClick(pkId = null,indez) {
|
|
handleDelFlowClick(pkId = null,indez) {
|
|
if(!pkId) {
|
|
if(!pkId) {
|
|
@@ -344,12 +342,6 @@ export default {
|
|
.rowList{
|
|
.rowList{
|
|
margin-bottom: 10px!important;
|
|
margin-bottom: 10px!important;
|
|
}
|
|
}
|
|
- button:first-child {
|
|
|
|
- margin-right: 20px;
|
|
|
|
- }
|
|
|
|
- >button {
|
|
|
|
- margin: 10px;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|