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.deptUserId" style="display: none;"/>
<el-input <el-input
v-model="roleForm.deptUserIdName" v-model="roleForm.deptUserIdName"
placeholder="选择标准法规部部长·" placeholder="选择标准法规部部长"
@click.native="choiceZRR('deptUserId', '选择标准法规部部长', roleForm.deptUserId)" @click.native="choiceZRR('deptUserId', '选择标准法规部部长', roleForm.deptUserId)"
/> />
</div> </div>
@@ -526,6 +526,7 @@
}, },
choiceZRRS (row, type, index) { choiceZRRS (row, type, index) {
if (type === 1) { if (type === 1) {
this.nodeList2 = []
this.zrIndex= index this.zrIndex= index
this.zrType = type this.zrType = type
this.nodeList2.push(row) this.nodeList2.push(row)
@@ -9,7 +9,7 @@
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
</div> </div>
<div class="content" v-show="active === '1'"> <div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto;"> <div style="overflow: auto;">
<el-form <el-form
ref="bzzqyjForm" ref="bzzqyjForm"
:model="form" :model="form"
@@ -39,19 +39,63 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </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-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
</div> </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 accordion>
<el-collapse-item title="意见填写"> <el-collapse-item title="意见填写">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
@@ -76,28 +120,29 @@
> >
</ProcessFooter> </ProcessFooter>
<el-drawer <el-drawer
title="选择责任人" title="选择责任部门对接人"
:visible.sync="modalshowflag" :visible.sync="modalshowflag2"
:wrapperClosable="false" :wrapperClosable="false"
size="800px"> size="800px">
<el-tree <el-tree
v-if="modalshowflag" v-if="modalshowflag2"
style="height: 100%; overflow: auto;"
node-key="id" node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree" class="filter-tree"
:data="treeData" :data="treeData"
:props="defaultProps" :props="defaultProps"
:default-checked-keys="nodeList" :default-checked-keys="nodeList2"
highlight-current highlight-current
check-strictly check-strictly
@check="drawerCheck2"
default-expand-all default-expand-all
:expand-on-click-node="false" :expand-on-click-node="false"
show-checkbox show-checkbox
ref="tree"> ref="tree2">
</el-tree> </el-tree>
<div id="roleFormButton" class="demo-drawer-footer"> <div id="roleFormButton2" 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-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="cancleUserInfo">取消</el-button> <el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo2">取消</el-button>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
@@ -113,18 +158,22 @@
name: "bzjdStep2", name: "bzjdStep2",
data() { data() {
return { return {
commentText: '', zxIndex: '',
taskIds: this.$route.query.taskIds, zxType: '',
pId: this.$route.query.prcId, zxIdList: [],
roleRow: {}, modalshowflag2: false,
nodeList: [], treeData: [],
type: '', nodeList2: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
treeData: [], // 人员数据 loading: false,
modalshowflag: false, // drawer开关 commentText: '',
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
roleRow: {},
type: '',
drawerTitle: '', //drawer标题 drawerTitle: '', //drawer标题
textarea: '', // 意见 textarea: '', // 意见
ListModel: false, // 新增编辑抽屉开关 ListModel: false, // 新增编辑抽屉开关
@@ -142,7 +191,8 @@
{ required: true, message: '请选择执行人', trigger: 'change' }, { required: true, message: '请选择执行人', trigger: 'change' },
] ]
}, },
json: {} json: {},
itemList: []
} }
}, },
components: { components: {
@@ -151,10 +201,37 @@
ProcessTitle ProcessTitle
}, },
methods: { 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 idList = ''
var nameList = '' 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) { if (nameList.length > 0) {
nameList += ',' nameList += ','
idList += ',' idList += ','
@@ -162,19 +239,23 @@
idList += item.id idList += item.id
nameList += item.name nameList += item.name
}) })
this.form.zxUserId = idList if (this.zxType == 1) {
this.form.zxUserIdName = nameList this.itemList[this.zxIndex].zxUserId = idList
this.modalshowflag = false this.itemList[this.zxIndex].zxUserIdName = nameList
}, } else {
cancleUserInfo () { this.itemList.forEach( item => {
this.modalshowflag = false this.zxIdList.forEach( items => {
}, if (item.id === items) {
choiceZRR () { item.zxUserId = idList
this.nodeList = [] item.zxUserIdName = nameList
if (this.form.zxUserId.length > 0) { }
this.nodeList = this.form.zxUserId.split(',') })
})
} }
this.modalshowflag = true this.modalshowflag2 = false
},
cancleUserInfo2 () {
this.modalshowflag2 = false
}, },
getTree () { getTree () {
this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> { this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> {
@@ -189,16 +270,8 @@
this.$refs['bzzqyjForm'].validate((valid) => { this.$refs['bzzqyjForm'].validate((valid) => {
if (valid) { if (valid) {
var json = this.json var json = this.json
json.itemList = this.itemList
json.commentText = this.commentText 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', { this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json), json: JSON.stringify(json),
taskId: this.taskIds, taskId: this.taskIds,
@@ -214,6 +287,12 @@
} }
}) })
}, },
handleSelectionChange (val){
this.zxIdList = []
val.forEach( item => {
this.zxIdList.push(item.id)
})
},
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
inboundLiaisonDetail({ inboundLiaisonDetail({
@@ -224,6 +303,13 @@
this.form.number = data.number this.form.number = data.number
this.form.name = data.name this.form.name = data.name
this.json = data this.json = data
var arr = []
arr = JSON.parse(data.itemList)
arr.forEach(item => {
item.zxUserId = ''
item.zxUserIdName = ''
})
this.itemList = arr
}).catch(e => { }).catch(e => {
}) })
}) })
@@ -9,7 +9,7 @@
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
</div> </div>
<div class="content" v-show="active === '1'"> <div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto;"> <div style="overflow: auto;">
<el-form <el-form
ref="bzzqyjForm" ref="bzzqyjForm"
:model="form" :model="form"
@@ -39,19 +39,60 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </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-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
</div> </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 accordion>
<el-collapse-item title="意见填写"> <el-collapse-item title="意见填写">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
@@ -113,6 +154,8 @@
name: "bzjdStep3", name: "bzjdStep3",
data() { data() {
return { return {
itemList: [],
loading: false,
commentText: '', commentText: '',
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
@@ -151,6 +194,7 @@
ProcessTitle ProcessTitle
}, },
methods: { methods: {
handleSelectionChange () {},
saveUserInfo () { saveUserInfo () {
var idList = '' var idList = ''
var nameList = '' var nameList = ''
@@ -224,6 +268,7 @@
this.form.number = data.number this.form.number = data.number
this.form.name = data.name this.form.name = data.name
this.json = data this.json = data
this.itemList = JSON.parse(data.itemList)
}).catch(e => { }).catch(e => {
}) })
}) })