Merge branch 'develop' into FOTON

This commit is contained in:
super_liu
2022-03-08 20:12:55 +08:00
6 changed files with 135 additions and 67 deletions
+131 -46
View File
@@ -20,51 +20,67 @@
></el-input>
</el-form-item>
</el-form>
<el-tree
v-if="open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
@check-change="checkChange"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
show-checkbox
ref="tree"
:load="loadNode"
lazy>
<div class="divTree">
<el-tree
v-if="open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
@check-change="checkChange"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
show-checkbox
ref="tree"
:load="loadNode"
lazy>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
</span>
</el-tree>
<el-tree
v-if="!open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
:data="treeData1"
:props="defaultProps"
@check-change="checkChange2"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
default-expand-all
show-checkbox
ref="tree">
</el-tree>
<el-tree
v-if="!open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
:data="treeData1"
:props="defaultProps"
@check-change="checkChange2"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
default-expand-all
show-checkbox
ref="tree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
</span>
</el-tree>
</el-tree>
</div>
<div class="divDel">
<div class="divDel_title">已选中人员</div>
<div class="divDel_box">
<el-tag
v-for="tag in delList"
:key="tag.id"
size="mini"
@close="handleClose(tag)"
closable>
{{tag.name}}
</el-tag>
<el-tag v-show="delList.length > 0" type="danger" closable size="mini" @close="handleCloseAll()">全部删除</el-tag>
</div>
</div>
<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>
@@ -108,6 +124,7 @@
},
data () {
return {
delList: [],
roleList: [],
isVisible2: false,
filterText: '',
@@ -128,6 +145,36 @@
}
},
methods: {
handleClose (tag) {
for (let a = 0; a < this.delList.length; a++) {
if (tag.id === this.delList[a].id) {
this.delList.splice(a, 1)
}
}
for (let b = 0; b < this.nodeList.length; b++) {
if (tag.id === this.nodeList[b]) {
this.nodeList.splice(b, 1)
}
}
},
handleCloseAll () {
this.$msgbox({
title: '提示',
message: '是否删除当前选中人员',
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
this.delList = []
this.nodeList = []
}).catch(() => {
this.$message({
type: 'info',
message: '取消删除'
});
}
)
},
changeInput:debounce(function (val) {
if (val.length) {
this.open1 = false
@@ -219,14 +266,6 @@
} else if (getlist.length === 1) {
this.roleList = [data]
}
// var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
// if(getlist.length == 1) {
// this.roleRow = getlist[0]
// } else {
// this.$refs.tree.setCheckedKeys([data.id])
// this.roleRow = this.$refs.tree.getCheckedNodes()[0]
// }
// this.roleList = [this.roleRow]
} else { // 多选
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
@@ -256,6 +295,30 @@
watch: {
isVisible (val) {
this.isVisible2 = val
if (val) {
if (this.nodeList.length > 0 && this.nodeList[0].length !== 0) {
let ids = ''
this.nodeList.forEach(item => {
if (ids.length > 0) {
ids += ','
ids += item
} else {
ids = item
}
})
this.$http.get('SarInstitution/institution/getNextById', {
ids: ids
}, {
_this: this
}, res => {
this.delList = res
})
} else {
this.delList = []
}
} else {
this.delList = []
}
},
isVisible2 (val) {
this.$emit('update:isVisible', val)
@@ -268,7 +331,29 @@
</script>
<style lang="less" scoped>
/deep/ .icon-tree {
.divTree {
overflow: auto;
height: calc(~'100% - 300px');
}
.divDel {
border-top: 1px solid #000;
height: 300px;
.divDel_title {
margin: 10px;
}
.divDel_box {
height: 266px;
padding: 0px 0 10px;
display: flex;
flex-wrap: wrap;
overflow: auto;
margin: 10px;
span {
margin: 0px 5px 5px 0;
}
}
}
/deep/ .icon-tree {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
@@ -2529,7 +2529,7 @@ export default {
this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId + '&userId=' + this.$store.getters.userInfo.userId
} else {
this.$message.error('请选择要下载的文件')
}
@@ -1625,7 +1625,7 @@ export default {
this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId + '&userId=' + this.$store.getters.userInfo.userId
} else {
this.$message.error('请选择要下载的文件')
}
@@ -87,6 +87,7 @@
</el-table-column>
<el-table-column
align="center"
width="180"
label="标准号"
>
<template slot-scope="scope">
@@ -40,7 +40,7 @@
@selection-change="selectStandChange">
<el-table-column align="center" type="selection" width="55">
</el-table-column>
<el-table-column label="标准号" prop="standNumber">
<el-table-column label="标准号" width="180" prop="standNumber">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber
@@ -119,18 +119,6 @@
align="center"
label="责任工程师">
</el-table-column>
<el-table-column
prop="authEngineer"
width="150"
align="center"
label="认证工程师">
</el-table-column>
<el-table-column
prop="qaEngineer"
width="150"
align="center"
label="质量工程师">
</el-table-column>
<el-table-column
prop="actualCloseTime"
width="130"
@@ -194,12 +182,6 @@
<el-form-item class="add-form-item" label="责任工程师:">
<div class="seeItem">{{historySeeForm.dutyEngineer}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="认证工程师:">
<div class="seeItem">{{historySeeForm.authEngineer}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="质量工程师:">
<div class="seeItem">{{historySeeForm.qaEngineer}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="要求关闭时间:">
<div class="seeItem">{{historySeeForm.actualCloseTime ? historySeeForm.actualCloseTime.substring(0, 11) : '-'}}</div>
</el-form-item>