Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
396572590@qq.com
2022-07-14 16:42:45 +08:00
4 changed files with 317 additions and 26 deletions
@@ -461,7 +461,7 @@ export default {
},
treeClick(treeNode) {
this.selectSarMenu = treeNode
this.dataCenterSearch.treeId = treeNode.id
this.dataCenterSearch.treeId = treeNode.id === '1' ? '' : treeNode.id
this.searchInfo()
},
// 树节点鼠标移入移出
@@ -706,6 +706,7 @@ export default {
dataType: '',
dataTitle: '',
attachFileId: '',
treeId: this.selectSarMenu.id
}
this.fileList = []
},
@@ -1122,7 +1122,8 @@
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@sort-change="sortChangeConfig"
@selection-change="selectConfigStandChange">
@select="handleSelectConfigStand"
@select-all="selectConfigStandAll">
<el-table-column
type="selection"
align="center">
@@ -1185,6 +1186,36 @@
:total="configTotal"
@pageChange="configuraPageChange"
@pageSizeChange="configuraPageSizeChange"></pagination>
<div class="divDel">
<div class="divDel_title">已选标准</div>
<div class="divDel_box">
<el-tag
v-for="tag in selectConfigStandList"
:key="tag.id"
size="mini"
@close="handleTagClose(tag)"
closable>
<a v-if="tag.standYear && textStatusMap[tag.textStatus] === '废止' || textStatusMap[tag.textStatus] === '被代替'"
class="table-jump" style="color: #F56C6C"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else-if="tag.standYear && textStatusMap[tag.textStatus] === '参考' "
class="table-jump" style="color: #98E165"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else-if="tag.standYear" class="table-jump" style="color: #333333"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else @click="handlePreview(tag)" class="table-jump" style="color: #333333">
{{ tag.standSortShow }}
{{ tag.standNumber }}</a>
</el-tag>
<!-- <el-tag v-show="delList.length > 0 && !checkBox" type="danger" closable size="mini" @close="handleCloseAll()">全部删除</el-tag>-->
</div>
</div>
</div>
<div class="demo-drawer-footer">
<el-button
@@ -2925,6 +2956,8 @@ export default {
configStandList: [],
configStandtotal: 0,
selectConfigStand: [],
selectConfigStandList: [],
selectConfigStandMap: new Map(),
collectBtn: false,
formFieldList: [],
reloadAddForm: false,
@@ -4719,6 +4752,13 @@ export default {
this.configStandList = res.data.list
this.configTotal = res.data.count
this.selectConfigStand = []
this.$nextTick(()=>{
this.configStandList.forEach(item=>{
if(this.selectConfigStandMap.get(item.id)){
this.$refs.selection.toggleRowSelection(item,true)
}
})
})
}, e => {
})
},
@@ -5265,6 +5305,8 @@ export default {
cancelConfigStand() {
this.configStandFlag = false
this.selectConfigStand = []
this.selectConfigStandList = []
this.selectConfigStandMap = new Map()
},
//
deleteStandFromKind(flag, item) {
@@ -5348,10 +5390,47 @@ export default {
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
selectConfigStandChange(alldata) {
this.selectConfigStand = []
for (let i = 0; i < alldata.length; i++) {
this.selectConfigStand.push(alldata[i].id)
// -
handleTagClose(row){
this.handleSelectConfigStand({},row)
this.$refs.selection.toggleRowSelection(row,false)
},
// --
handleSelectConfigStand(selection, row){
if(this.selectConfigStandMap.get(row.id)){
this.selectConfigStandMap.delete(row.id)
for(let i=0; i<this.selectConfigStandList.length; i++){
if(this.selectConfigStandList[i].id === row.id){
this.selectConfigStandList.splice(i,1)
return
}
}
}else{
this.selectConfigStandMap.set(row.id,row)
this.selectConfigStandList.push(row)
}
},
// --
selectConfigStandAll(selection) {
if(selection.length !== 0 ){
for (let i = 0; i < selection.length; i++) {
if(!this.selectConfigStandMap.get(selection[i].id)){
this.selectConfigStandList.push(selection[i])
this.selectConfigStandMap.set(selection[i].id, selection[i])
}
}
}else{
for(let i=0; i<this.configStandList.length; i++){
this.selectConfigStandMap.delete(this.configStandList[i].id)
}
if(this.selectConfigStandMap.size === 0){
this.selectConfigStandList = []
}else{
this.selectConfigStandList = []
this.selectConfigStandMap.forEach(item=>{
this.selectConfigStandList.push(item)
})
}
}
},
// -
@@ -5409,14 +5488,17 @@ export default {
saveConfigStand() {
let search = {}
search.menuId = this.selectSarMenu.id
if (this.selectConfigStand.length === 0) {
if (this.selectConfigStandList.length === 0) {
this.$message({
showClose: true,
message: '请至少选择一条标准',
type: 'warning'
})
} else {
search.idlist = this.selectConfigStand
search.idlist = []
for (let i = 0; i < this.selectConfigStandList.length; i++) {
search.idlist.push(this.selectConfigStandList[i].id)
}
this.$http.postData('sarStandardsInfo/sar-standards-info/saveStandardsMenu', search, {
_this: this,
loading: 'isSubmit'
@@ -6324,7 +6406,7 @@ export default {
.el-drawer__wrapper {
.demo-drawer-content {
.drawer-content {
height: calc(~'100% - 52px - 56px');
height: calc(~'100% - 52px - 56px - 100px');
flex: auto;
display: flex;
flex-direction: column;
@@ -6358,4 +6440,24 @@ export default {
.classDisplay {
display: none;
}
.divDel {
border-top: 1px solid #000;
height: 100px;
.divDel_title {
margin: 10px;
}
.divDel_box {
height: 55px;
padding: 0px;
display: flex;
flex-wrap: wrap;
overflow: auto;
margin: 10px;
align-content: flex-start;
span {
margin: 0px 5px 5px 0;
}
}
}
</style>
@@ -965,7 +965,8 @@
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@sort-change="sortChangeConfig"
@selection-change="selectConfigStandChange">
@select="handleSelectConfigStand"
@select-all="selectConfigStandAll">
<el-table-column
type="selection"
width="55"
@@ -1018,6 +1019,20 @@
@pageChange="configuraPageChange"
@pageSizeChange="configuraPageSizeChange"></pagination>
<loading :loading="configLoading">加载中...</loading>
<div class="divDel">
<div class="divDel_title">已选标准</div>
<div class="divDel_box">
<el-tag
v-for="tag in selectConfigStandList"
:key="tag.id"
size="mini"
@close="handleTagClose(tag)"
closable>
{{tag.standCode}}
</el-tag>
<!-- <el-tag v-show="delList.length > 0 && !checkBox" type="danger" closable size="mini" @close="handleCloseAll()">全部删除</el-tag>-->
</div>
</div>
</div>
<div class="demo-drawer-footer">
<el-button
@@ -2320,6 +2335,8 @@ export default {
configStandtotal: 0,
height: null,
selectConfigStand: [],
selectConfigStandList: [],
selectConfigStandMap: new Map(),
configLoading: false, // 配置表格加载中
searchConfigNodes: [], // 责任部门树结构
zNodesSItem: [],
@@ -3374,6 +3391,8 @@ export default {
this.sarConfigStandSearch.replaceStandNum = ''
this.configPage = 1
this.selectConfigStand = []
this.selectConfigStandList = []
this.selectConfigStandMap = new Map()
},
async saveConfStand(item) {
if(item.menuId && item.menuId !== ''){
@@ -3401,14 +3420,17 @@ export default {
search.menuId = this.selectSarMenu.id
search.menuName = this.selectSarMenu.menuName
search.treeType = this.selectSarMenu.treeType
if (this.selectConfigStand.length === 0) {
if (this.selectConfigStandList.length === 0) {
this.$message({
showClose: true,
message: '请至少选择一条标准',
type: 'warning'
})
} else {
search.idlist = this.selectConfigStand
search.idlist = []
for (let i = 0; i < this.selectConfigStandList.length; i++) {
search.idlist.push(this.selectConfigStandList[i].id)
}
this.$http.postData('lawss/sarBussionessStand/saveStandardsMenu', search, {
_this: this,
loading: 'isSubmit'
@@ -3459,13 +3481,50 @@ export default {
}
this.selectConfiguraStand()
},
// 表格
selectConfigStandChange(alldata) {
this.selectConfigStand = []
for (let i = 0; i < alldata.length; i++) {
this.selectConfigStand.push(alldata[i].id)
// 已选标准-删除
handleTagClose(row){
this.handleSelectConfigStand({},row)
this.$refs.selection.toggleRowSelection(row,false)
},
// 配置标准弹窗-表格-单选
handleSelectConfigStand(selection, row){
if(this.selectConfigStandMap.get(row.id)){
this.selectConfigStandMap.delete(row.id)
for(let i=0; i<this.selectConfigStandList.length; i++){
if(this.selectConfigStandList[i].id === row.id){
this.selectConfigStandList.splice(i,1)
return
}
}
}else{
this.selectConfigStandMap.set(row.id,row)
this.selectConfigStandList.push(row)
}
},
// 配置标准弹窗-表格-全选
selectConfigStandAll(selection) {
if(selection.length !== 0 ){
for (let i = 0; i < selection.length; i++) {
if(!this.selectConfigStandMap.get(selection[i].id)){
this.selectConfigStandList.push(selection[i])
this.selectConfigStandMap.set(selection[i].id, selection[i])
}
}
}else{
for(let i=0; i<this.configStandList.length; i++){
this.selectConfigStandMap.delete(this.configStandList[i].id)
}
if(this.selectConfigStandMap.size === 0){
this.selectConfigStandList = []
}else{
this.selectConfigStandList = []
this.selectConfigStandMap.forEach(item=>{
this.selectConfigStandList.push(item)
})
}
}
},
SearchTreeConfigDblClick(treeId, treeNode) {
this.sarConfigStandSearch.responsibleUnit = treeNode.id
this.sarConfigStandSearch.orgName = treeNode.name
@@ -4555,6 +4614,13 @@ export default {
this.configStandList = res.data.list
this.configTotal = res.data.count
this.selectConfigStand = []
this.$nextTick(()=>{
this.configStandList.forEach(item=>{
if(this.selectConfigStandMap.get(item.id)){
this.$refs.selection.toggleRowSelection(item,true)
}
})
})
}, e => {
})
},
@@ -5578,7 +5644,7 @@ export default {
.el-drawer__wrapper {
.demo-drawer-content {
.drawer-content {
//height: calc(~'100% - 52px - 56px');
height: calc(~'100% - 52px - 56px - 100px');
flex: auto;
display: flex;
flex-direction: column;
@@ -5607,4 +5673,24 @@ export default {
::v-deep .el-drawer {
outline: none !important;
}
.divDel {
border-top: 1px solid #000;
height: 100px;
.divDel_title {
margin: 10px;
}
.divDel_box {
height: 55px;
padding: 0px;
display: flex;
flex-wrap: wrap;
overflow: auto;
margin: 10px;
align-content: flex-start;
span {
margin: 0px 5px 5px 0;
}
}
}
</style>
@@ -1499,7 +1499,8 @@
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
height="100%"
@selection-change="selectConfigStandChange">
@select="handleSelectConfigStand"
@select-all="selectConfigStandAll">
<el-table-column
type="selection"
width="55"
@@ -1556,6 +1557,36 @@
:total="configTotal"
@pageChange="configuraPageChange"
@pageSizeChange="configuraPageSizeChange"></pagination>
<div class="divDel">
<div class="divDel_title">已选标准</div>
<div class="divDel_box">
<el-tag
v-for="tag in selectConfigStandList"
:key="tag.id"
size="mini"
@close="handleTagClose(tag)"
closable>
<a v-if="tag.standYear && textStatusMap[tag.textStatus] === '废止' || textStatusMap[tag.textStatus] === '被代替'"
class="table-jump" style="color: #F56C6C"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else-if="tag.standYear && textStatusMap[tag.textStatus] === '参考' "
class="table-jump" style="color: #98E165"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else-if="tag.standYear" class="table-jump" style="color: #333333"
@click="handlePreview(tag)">{{ tag.standSortShow }} {{
tag.standNumber
}}-{{ tag.standYear }}</a>
<a v-else @click="handlePreview(tag)" class="table-jump" style="color: #333333">
{{ tag.standSortShow }}
{{ tag.standNumber }}</a>
</el-tag>
<!-- <el-tag v-show="delList.length > 0 && !checkBox" type="danger" closable size="mini" @close="handleCloseAll()">全部删除</el-tag>-->
</div>
</div>
</div>
<div class="demo-drawer-footer">
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" :loading="isSubmit" @click="saveConfigStand">
@@ -2521,6 +2552,8 @@ export default {
configStandList: [],
configStandtotal: 0,
selectConfigStand: [],
selectConfigStandList: [],
selectConfigStandMap: new Map(),
collectBtn: false,
formFieldList: [],
reloadAddForm: false,
@@ -4108,6 +4141,13 @@ export default {
this.configStandList = res.data.list
this.configTotal = res.data.count
this.selectConfigStand = []
this.$nextTick(()=>{
this.configStandList.forEach(item=>{
if(this.selectConfigStandMap.get(item.id)){
this.$refs.selection.toggleRowSelection(item,true)
}
})
})
}, e => {
})
},
@@ -4597,6 +4637,8 @@ export default {
cancelConfigStand() {
this.configStandFlag = false
this.selectConfigStand = []
this.selectConfigStandList = []
this.selectConfigStandMap = new Map()
},
OCRAdd(type) {
let text = ''
@@ -4722,24 +4764,64 @@ export default {
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
selectConfigStandChange(alldata) {
this.selectConfigStand = []
for (let i = 0; i < alldata.length; i++) {
this.selectConfigStand.push(alldata[i].id)
// 已选标准-删除
handleTagClose(row){
this.handleSelectConfigStand({},row)
this.$refs.selection.toggleRowSelection(row,false)
},
// 配置标准弹窗-表格-单选
handleSelectConfigStand(selection, row){
if(this.selectConfigStandMap.get(row.id)){
this.selectConfigStandMap.delete(row.id)
for(let i=0; i<this.selectConfigStandList.length; i++){
if(this.selectConfigStandList[i].id === row.id){
this.selectConfigStandList.splice(i,1)
return
}
}
}else{
this.selectConfigStandMap.set(row.id,row)
this.selectConfigStandList.push(row)
}
},
// 配置标准弹窗-表格-全选
selectConfigStandAll(selection) {
if(selection.length !== 0 ){
for (let i = 0; i < selection.length; i++) {
if(!this.selectConfigStandMap.get(selection[i].id)){
this.selectConfigStandList.push(selection[i])
this.selectConfigStandMap.set(selection[i].id, selection[i])
}
}
}else{
for(let i=0; i<this.configStandList.length; i++){
this.selectConfigStandMap.delete(this.configStandList[i].id)
}
if(this.selectConfigStandMap.size === 0){
this.selectConfigStandList = []
}else{
this.selectConfigStandList = []
this.selectConfigStandMap.forEach(item=>{
this.selectConfigStandList.push(item)
})
}
}
},
// 提交配置搜索项
saveConfigStand() {
let search = {}
search.menuId = this.selectSarMenu.id
if (this.selectConfigStand.length === 0) {
if (this.selectConfigStandList.length === 0) {
this.$message({
showClose: true,
message: '请至少选择一条标准',
type: 'warning'
})
} else {
search.idlist = this.selectConfigStand
search.idlist = []
for (let i = 0; i < this.selectConfigStandList.length; i++) {
search.idlist.push(this.selectConfigStandList[i].id)
}
this.$http.postData('sarStandardsInfo/sar-standards-info/saveStandardsMenu', search, {
_this: this,
loading: 'isSubmit'
@@ -5634,7 +5716,7 @@ export default {
.el-drawer__wrapper {
.demo-drawer-content {
.drawer-content {
//height: calc(~'100% - 52px - 56px');
height: calc(~'100% - 52px - 56px - 100px');
flex: auto;
display: flex;
flex-direction: column;
@@ -5765,4 +5847,24 @@ export default {
display: none;
}
}
.divDel {
border-top: 1px solid #000;
height: 100px;
.divDel_title {
margin: 10px;
}
.divDel_box {
height: 55px;
padding: 0px;
display: flex;
flex-wrap: wrap;
overflow: auto;
margin: 10px;
align-content: flex-start;
span {
margin: 0px 5px 5px 0;
}
}
}
</style>