未符合项整改流程第二步添加查询

This commit is contained in:
shen_yan_pu
2021-07-14 16:14:57 +08:00
parent 9b02ed06a5
commit b2e04ae8ca
@@ -12,23 +12,23 @@
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<el-form :modal="dataList" inline class="label-input-form">
<el-form :modal="nonSearch" inline class="label-input-form">
<el-form-item label="标准号/标准名称" class="search-item">
<el-input v-model="dataList.standId"
<el-input v-model="nonSearch.standId"
size="small"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="项目名称" class="search-item">
<el-input v-model="dataList.productName"
<el-input v-model="nonSearch.productName"
size="small"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="责任部门" class="search-item">
<el-input v-model="dataList.responsibleUnit" v-show="false"/>
<el-input v-model="nonSearch.responsibleUnit" v-show="false"/>
<el-popover
placement="bottom"
popper-class="user-dept-popper"
@@ -38,7 +38,7 @@
<el-input
size="small"
slot="reference"
v-model="dataList.responseUnitShow"
v-model="nonSearch.responseUnitShow"
placeholder="根据责任部门查找"
readonly
clearable
@@ -62,7 +62,7 @@
class="common-button-primary"
size="mini"
v-btn-permission="'b3aaea6d18f5871b68825d3783eb736a'"
@click="getTableByPage">
@click="getTableByPage(nonSearch)">
查询
</el-button>
</el-form-item>
@@ -105,15 +105,15 @@
<el-table-column prop="dutyEngineer" label="责任工程师"/>
<el-table-column label="选择分发责任人" prop="dutyPeopleInfo">
<template slot-scope="scope">
<span v-if="scope.row.show">
<el-input
style="display: none"
v-model="scope.row.dutyPeopleInfo"
size="mini"
placeholder="请输入内容"
@click.native="choiceDuty"
/>
</span>
<span v-else>{{scope.row.dutyPeopleInfo}}</span>
/>
<div v-if="scope.row.dutyPeopleInfo" class="fileClass">
{{ scope.row.dutyPeopleInfo || '-'}}
</div>
</template>
</el-table-column>
</el-table>
@@ -187,7 +187,7 @@ export default {
ListModel: false, // 新增编辑抽屉开关
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
nonConformitySearch: {
nonSearch: {
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
@@ -206,15 +206,6 @@ export default {
myLoading: false,
// 责任部门
zNodesSItem: [],
unqualidiedData: [{
standId: '',
productName: '',
itemsNum: '',
itemsName: '',
planCloseTime: '',
responsibleUnit: '',
dutyEngineer: ''
}],
clearSelection: false,
nodeList: [],
drawerTitle: '', //drawer标题
@@ -244,11 +235,19 @@ export default {
this.getData()
this.getTree()
},
methods: {
watch: {
nonSearch(val) {
this.nonSearch = val
}
},
methods: {
getData() {
const params = {
taskIds: this.taskIds,
pId: this.pId,
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
}
inboundLiaisonDetail(params).then(res => {
const processForm = JSON.parse(res.mesg)
@@ -261,30 +260,19 @@ export default {
})
},
// 批量选择分发责任人
dutyEngineerList() {
dutyEngineerList(id) {
if (this.multipleSelection.length === 0) {
this.$message.warning("请选择至少一条数据进行分发责任人");
} else {
this.multipleSelection.map((i, index)=> {
i.show = true
this.$set(this.dataList, i, index)
})
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
}
},
// 选择勾选项的集合
handleSelectionChange(value) {
this.multipleSelection = value
},
// 选择分发责任人时
choiceDuty(type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.type = type
this.drawerTitle = title
this.modalshowflag = true
},
selectPeople(row) {
this.modalshowflag = true
console.log(value)
},
handleTabs(name) {
this.active = name
@@ -313,10 +301,7 @@ export default {
}
let json = {
dockUserList: list,
// engineer: this.$store.getters.userInfo.userId,
// standardInfoList: list[0].standardInfoList,
}
console.log(json)
let flag=false
this.dataList.forEach(item => {
if (item.dutyPeopleInfo === '') {
@@ -364,19 +349,13 @@ export default {
// 流程节点负责人抽屉保存按钮
saveUserInfo () {
// 选取负责人时的操作
for (let i = 0; i < this.multipleSelection.length; i++ ) {
this.multipleSelection[i].dutyPeopleInfo = this.roleRow[0].name
this.multipleSelection[i].dutyPeopleInfoId = this.roleRow[0].id
for (let b = 0; b < this.multipleSelection.length; b++) {
this.dataList[b].dutyPeopleInfo = this.multipleSelection[i].dutyPeopleInfo
this.dataList[b].dutyPeopleInfoId = this.multipleSelection[i].dutyPeopleInfoId
this.dataList.forEach(val=> {
val.show = false
})
}
this.lastDataList = this.dataList
this.$refs.multipleTable.clearSelection();
}
this.multipleSelection.forEach(item => {
item.dutyPeopleInfo = this.roleRow[0].name
item.dutyPeopleInfoId = this.roleRow[0].id
})
this.lastDataList = this.dataList
this.$refs.multipleTable.clearSelection();
// 选取流程信息完成
this.roleForm.dutyUserInfoName = this.roleRow.name
this.modalshowflag = false
},
@@ -385,17 +364,37 @@ export default {
this.modalshowflag = false
},
//查询按钮
getTableByPage() {
this.getData()
},
getTableByPage({ standId, productName, responsibleUnit }) {//多条件和模糊查询
this.realList = this.dataList.filter(item => {
let matchId = true; // 标准号 筛选
let matchName = true; // 项目名称 筛选
let matchUnit = true; // 部门 筛选
if (standId) {
const keysId = standId
.toUpperCase() // 转大写
.replace(' ', '') // 删掉空格
.split('') // 切割成 单个字
matchId = keysId.every(key => item.standId.toUpperCase().includes(key));
}
if (productName) {
matchName = item.productName === productName;
}
if (responsibleUnit) {
matchUnit = item.responsibleUnit === responsibleUnit;
}
return matchId && matchName && matchUnit;
})
this.dataList = this.realList
},
// 清空 查询条件
clearAllSearch (search = true) {
this.nonConformitySearch = {
clearAllSearch () {
this.nonSearch = {
standId: '',
productName: '',
responsibleUnit: ''
}
this.getTableByPage()
this.getData()
},
// 分页事件
pageChange (page) {