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-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tree <div class="divTree">
v-if="open1 && isVisible2" <el-tree
node-key="id" v-if="open1 && isVisible2"
style="height: 100%; overflow: auto;" node-key="id"
class="filter-tree tree-line" style="height: 100%; overflow: auto;"
icon-class="icon-tree" class="filter-tree tree-line"
@check-change="checkChange" icon-class="icon-tree"
:data="treeData" @check-change="checkChange"
:props="defaultProps" :data="treeData"
:default-checked-keys="nodeList" :props="defaultProps"
highlight-current :default-checked-keys="nodeList"
check-strictly highlight-current
@check="drawerCheck" check-strictly
:expand-on-click-node="true" @check="drawerCheck"
show-checkbox :expand-on-click-node="true"
ref="tree" show-checkbox
:load="loadNode" ref="tree"
lazy> :load="loadNode"
lazy>
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span> <span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span> <span> {{ node.label }} </span>
</span> </span>
</el-tree> </el-tree>
<el-tree <el-tree
v-if="!open1 && isVisible2" v-if="!open1 && isVisible2"
node-key="id" node-key="id"
style="height: 100%; overflow: auto;" style="height: 100%; overflow: auto;"
class="filter-tree tree-line" class="filter-tree tree-line"
icon-class="icon-tree" icon-class="icon-tree"
:data="treeData1" :data="treeData1"
:props="defaultProps" :props="defaultProps"
@check-change="checkChange2" @check-change="checkChange2"
:default-checked-keys="nodeList" :default-checked-keys="nodeList"
highlight-current highlight-current
check-strictly check-strictly
@check="drawerCheck" @check="drawerCheck"
:expand-on-click-node="true" :expand-on-click-node="true"
default-expand-all default-expand-all
show-checkbox show-checkbox
ref="tree"> ref="tree">
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span> <span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span> <span> {{ node.label }} </span>
</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"> <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-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
@@ -108,6 +124,7 @@
}, },
data () { data () {
return { return {
delList: [],
roleList: [], roleList: [],
isVisible2: false, isVisible2: false,
filterText: '', filterText: '',
@@ -128,6 +145,36 @@
} }
}, },
methods: { 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) { changeInput:debounce(function (val) {
if (val.length) { if (val.length) {
this.open1 = false this.open1 = false
@@ -219,14 +266,6 @@
} else if (getlist.length === 1) { } else if (getlist.length === 1) {
this.roleList = [data] 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 { // 多选 } else { // 多选
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()) this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
} }
@@ -256,6 +295,30 @@
watch: { watch: {
isVisible (val) { isVisible (val) {
this.isVisible2 = 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) { isVisible2 (val) {
this.$emit('update:isVisible', val) this.$emit('update:isVisible', val)
@@ -268,7 +331,29 @@
</script> </script>
<style lang="less" scoped> <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; margin: 0 5px 0 10px;
position: relative; position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png'); background: url('~@/assets/images/shangqi/img/tree-add.png');
@@ -2529,7 +2529,7 @@ export default {
this.$message.error('水印下载仅支持PDF,pdf格式文件') this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else { } else {
if (attId != null && attId !== '') { 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 { } else {
this.$message.error('请选择要下载的文件') this.$message.error('请选择要下载的文件')
} }
@@ -1625,7 +1625,7 @@ export default {
this.$message.error('水印下载仅支持PDF,pdf格式文件') this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else { } else {
if (attId != null && attId !== '') { 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 { } else {
this.$message.error('请选择要下载的文件') this.$message.error('请选择要下载的文件')
} }
@@ -87,6 +87,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
width="180"
label="标准号" label="标准号"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@@ -40,7 +40,7 @@
@selection-change="selectStandChange"> @selection-change="selectStandChange">
<el-table-column align="center" type="selection" width="55"> <el-table-column align="center" type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column label="标准号" prop="standNumber"> <el-table-column label="标准号" width="180" prop="standNumber">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" <a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber
@@ -119,18 +119,6 @@
align="center" align="center"
label="责任工程师"> label="责任工程师">
</el-table-column> </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 <el-table-column
prop="actualCloseTime" prop="actualCloseTime"
width="130" width="130"
@@ -194,12 +182,6 @@
<el-form-item class="add-form-item" label="责任工程师:"> <el-form-item class="add-form-item" label="责任工程师:">
<div class="seeItem">{{historySeeForm.dutyEngineer}}</div> <div class="seeItem">{{historySeeForm.dutyEngineer}}</div>
</el-form-item> </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="要求关闭时间:"> <el-form-item class="add-form-item" label="要求关闭时间:">
<div class="seeItem">{{historySeeForm.actualCloseTime ? historySeeForm.actualCloseTime.substring(0, 11) : '-'}}</div> <div class="seeItem">{{historySeeForm.actualCloseTime ? historySeeForm.actualCloseTime.substring(0, 11) : '-'}}</div>
</el-form-item> </el-form-item>