This commit is contained in:
zhutianqi
2021-07-15 19:38:46 +08:00
parent d936597828
commit fe64b29164
3 changed files with 192 additions and 60 deletions
@@ -136,7 +136,7 @@
<el-input v-model="roleForm.deptUserId" style="display: none;"/>
<el-input
v-model="roleForm.deptUserIdName"
placeholder="选择标准法规部部长·"
placeholder="选择标准法规部部长"
@click.native="choiceZRR('deptUserId', '选择标准法规部部长', roleForm.deptUserId)"
/>
</div>
@@ -526,6 +526,7 @@
},
choiceZRRS (row, type, index) {
if (type === 1) {
this.nodeList2 = []
this.zrIndex= index
this.zrType = type
this.nodeList2.push(row)
@@ -9,7 +9,7 @@
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto;">
<div style="overflow: auto;">
<el-form
ref="bzzqyjForm"
:model="form"
@@ -39,19 +39,63 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="执行人" prop="responUserList" class="add-form-item form-item-disabled">
<el-input
v-model="form.zxUserId"
style="display: none;"
clearable
></el-input>
<el-input v-model="form.zxUserIdName" placeholder="请选择执行人" @click.native="choiceZRR"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
<ProcessTitle>
<template slot="title">拆分信息</template>
</ProcessTitle>
<div class="action-bar">
<el-button type="primary" class="common-button-primary add-button" size="mini" @click="choiceZRRS('', 2, '')">批量编辑</el-button>
</div>
<el-table border
ref="selection"
:data="itemList"
tooltip-effect="dark"
style="width: 100%;"
height="100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="itemsNum"
label="条款号"
width="170"
align="center">
</el-table-column>
<el-table-column
prop="itemsName"
label="条款名称"
width="170"
align="center">
</el-table-column>
<el-table-column
prop="itermsConditions"
label="条款内容"
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column
label="责任人"
width="170"
prop="zrUserIdName"
align="center">
</el-table-column>
<el-table-column
label="执行人"
width="170"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.zxUserId" style="display: none;"/>
<el-input v-model="scope.row.zxUserIdName" placeholder="请选择执行人" @click.native="choiceZRRS(scope.row.zxUserId, 1, scope.$index)"/>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">数据获取中</loading>
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
@@ -76,28 +120,29 @@
>
</ProcessFooter>
<el-drawer
title="选择责任人"
:visible.sync="modalshowflag"
title="选择责任部门对接人"
:visible.sync="modalshowflag2"
:wrapperClosable="false"
size="800px">
<el-tree
v-if="modalshowflag"
style="height: 100%; overflow: auto;"
v-if="modalshowflag2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
:default-checked-keys="nodeList2"
highlight-current
check-strictly
@check="drawerCheck2"
default-expand-all
:expand-on-click-node="false"
show-checkbox
ref="tree">
ref="tree2">
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo">取消</el-button>
<div id="roleFormButton2" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo2">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo2">取消</el-button>
</div>
</el-drawer>
</div>
@@ -113,18 +158,22 @@
name: "bzjdStep2",
data() {
return {
commentText: '',
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
roleRow: {},
nodeList: [],
type: '',
zxIndex: '',
zxType: '',
zxIdList: [],
modalshowflag2: false,
treeData: [],
nodeList2: [],
defaultProps: {
children: 'children',
label: 'name'
},
treeData: [], // 人员数据
modalshowflag: false, // drawer开关
loading: false,
commentText: '',
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
roleRow: {},
type: '',
drawerTitle: '', //drawer标题
textarea: '', // 意见
ListModel: false, // 新增编辑抽屉开关
@@ -142,7 +191,8 @@
{ required: true, message: '请选择执行人', trigger: 'change' },
]
},
json: {}
json: {},
itemList: []
}
},
components: {
@@ -151,10 +201,37 @@
ProcessTitle
},
methods: {
saveUserInfo () {
drawerCheck2 (data) {
var getlist = this.$refs.tree2.getCheckedNodes().concat(this.$refs.tree2.getHalfCheckedNodes());
if(getlist.length == 1) {
this.roleRow = getlist[0]
}else {
this.$refs.tree2.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree2.getCheckedNodes()[0]
}
},
choiceZRRS (row, type, index) {
if (type === 1) {
this.nodeList2 = []
this.zxIndex= index
this.zxType = type
this.nodeList2.push(row)
this.modalshowflag2 = true
} else {
// 批量
if (this.zxIdList.length > 0) {
this.zxType = type
this.nodeList2 = []
this.modalshowflag2 = true
} else {
this.$message.warning('请选择要编辑的数据')
}
}
},
saveUserInfo2 () {
var idList = ''
var nameList = ''
this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()).forEach( item => {
this.$refs.tree2.getCheckedNodes().concat(this.$refs.tree2.getHalfCheckedNodes()).forEach( item => {
if (nameList.length > 0) {
nameList += ','
idList += ','
@@ -162,19 +239,23 @@
idList += item.id
nameList += item.name
})
this.form.zxUserId = idList
this.form.zxUserIdName = nameList
this.modalshowflag = false
},
cancleUserInfo () {
this.modalshowflag = false
},
choiceZRR () {
this.nodeList = []
if (this.form.zxUserId.length > 0) {
this.nodeList = this.form.zxUserId.split(',')
if (this.zxType == 1) {
this.itemList[this.zxIndex].zxUserId = idList
this.itemList[this.zxIndex].zxUserIdName = nameList
} else {
this.itemList.forEach( item => {
this.zxIdList.forEach( items => {
if (item.id === items) {
item.zxUserId = idList
item.zxUserIdName = nameList
}
})
})
}
this.modalshowflag = true
this.modalshowflag2 = false
},
cancleUserInfo2 () {
this.modalshowflag2 = false
},
getTree () {
this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> {
@@ -189,16 +270,8 @@
this.$refs['bzzqyjForm'].validate((valid) => {
if (valid) {
var json = this.json
json.itemList = this.itemList
json.commentText = this.commentText
var arr = this.form.zxUserId.split(',')
var newArr = []
arr.forEach(item => {
var json1 = {}
json1.id = item
newArr.push(json1)
})
json.zxUserId = newArr
json.zxUserIdName = this.form.zxUserIdName
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json),
taskId: this.taskIds,
@@ -214,6 +287,12 @@
}
})
},
handleSelectionChange (val){
this.zxIdList = []
val.forEach( item => {
this.zxIdList.push(item.id)
})
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
@@ -224,6 +303,13 @@
this.form.number = data.number
this.form.name = data.name
this.json = data
var arr = []
arr = JSON.parse(data.itemList)
arr.forEach(item => {
item.zxUserId = ''
item.zxUserIdName = ''
})
this.itemList = arr
}).catch(e => {
})
})
@@ -9,7 +9,7 @@
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto;">
<div style="overflow: auto;">
<el-form
ref="bzzqyjForm"
:model="form"
@@ -39,19 +39,60 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="执行人" prop="responUserList" class="add-form-item form-item-disabled">
<el-input
v-model="form.zxUserId"
style="display: none;"
clearable
></el-input>
<el-input v-model="form.zxUserIdName" placeholder="请选择执行人" @click.native="choiceZRR"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
<ProcessTitle>
<template slot="title">拆分信息</template>
</ProcessTitle>
<div class="action-bar">
<el-button type="primary" class="common-button-primary add-button" size="mini" @click="choiceZRRS('', 2, '')">批量编辑</el-button>
</div>
<el-table border
ref="selection"
:data="itemList"
tooltip-effect="dark"
style="width: 100%;"
height="100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="itemsNum"
label="条款号"
width="170"
align="center">
</el-table-column>
<el-table-column
prop="itemsName"
label="条款名称"
width="170"
align="center">
</el-table-column>
<el-table-column
prop="itermsConditions"
label="条款内容"
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column
label="责任人"
width="170"
prop="zrUserIdName"
align="center">
</el-table-column>
<el-table-column
label="执行人"
width="170"
prop="zxUserIdName"
align="center">
</el-table-column>
</el-table>
<loading :loading="loading">数据获取中</loading>
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
@@ -113,6 +154,8 @@
name: "bzjdStep3",
data() {
return {
itemList: [],
loading: false,
commentText: '',
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
@@ -151,6 +194,7 @@
ProcessTitle
},
methods: {
handleSelectionChange () {},
saveUserInfo () {
var idList = ''
var nameList = ''
@@ -224,6 +268,7 @@
this.form.number = data.number
this.form.name = data.name
this.json = data
this.itemList = JSON.parse(data.itemList)
}).catch(e => {
})
})