国内海外企标的操作只有收藏,删除和编辑单拎出来

This commit is contained in:
yanyizhou
2021-11-26 18:00:54 +08:00
parent d5d59cac1f
commit 87814496cc
3 changed files with 268 additions and 85 deletions
@@ -145,12 +145,12 @@
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
v-btn-permission="'8871ed1be74cf65851659514880bb50a'"><i class="iconfont">&#xe6e9;</i>导出
</el-button>
<!-- <el-button class="common-button-default delete-button"
<el-button class="common-button-default delete-button"
:loading="delLoading"
size="mini"
@click="deleteStand(2)"
v-btn-permission="'4d01342db0f56f01bfceaee7b46904f4'"><i class="iconfont">&#xe61b;</i>批量删除
</el-button>-->
</el-button>
<el-button class="common-button-default"
size="mini" @click="configurationStandard"
v-btn-permission="'590049684c0af005c6b3d1f0ebcf897e'"><i class="iconfont">&#xe669;</i>配置标准
@@ -160,6 +160,10 @@
@click="deleteStandFromKind(2)"
v-btn-permission="'29bf24bbd156c06f136cc89b1c7b2bb0'"><i class="iconfont">&#xe611;</i>移除标准
</el-button>
<el-button class="common-button-default"
size="mini" @click="OCRAdd('2')"
v-btn-permission="'247cebaefa7cf1683092af160af11502'"><i class="iconfont">&#xe611;</i>编辑
</el-button>
<!--&lt;!&ndash; <el-button class="common-button-default"
size="mini" :loading="searching"
@click="uploadImportModal(1)"
@@ -313,7 +317,7 @@
<span v-else style="color: #333333">{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" v-if="isPermission('f9745194958bc9ed3ee5127459795dbc,e8d690904ee1895dd0d17d9c794fbcd7,b299fa5edb3f3f35badb2adb6bda9f2e')>0" label="操作" align="center" width="100">
<el-table-column fixed="right" v-if="isPermission('f9745194958bc9ed3ee5127459795dbc,e8d690904ee1895dd0d17d9c794fbcd7,b299fa5edb3f3f35badb2adb6bda9f2e')>0" label="操作" align="center" width="50">
<template slot-scope="scope">
<div v-if="isPermission('f9745194958bc9ed3ee5127459795dbc,e8d690904ee1895dd0d17d9c794fbcd7,b299fa5edb3f3f35badb2adb6bda9f2e') == 1"
@@ -341,30 +345,40 @@
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-if="scope.row.collectBtn"
:command="[scope.row, '收藏']"
v-btn-permission="'f9745194958bc9ed3ee5127459795dbc'"
>
收藏
</el-dropdown-item>
<el-dropdown-item
v-else
:command="[scope.row, '取消收藏']"
v-btn-permission="'47e155667f521467ed941c89d118e770'"
>
取消收藏
</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'e8d690904ee1895dd0d17d9c794fbcd7'">
编辑
</el-dropdown-item>
<!-- <el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="'413e676a155d6eb2dfbe08df8cbcf682'">分享</el-dropdown-item>-->
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'b299fa5edb3f3f35badb2adb6bda9f2e'">
删除
</el-dropdown-item>
</el-dropdown-menu>
<el-button title="收藏" class="collection-btn" icon="el-icon-star-off" v-btn-permission="'f9745194958bc9ed3ee5127459795dbc'"
v-if="scope.row.collectBtn"
@click="handleCommand([scope.row, '收藏'])"
>
</el-button>
<el-button title="取消收藏" class="collection-btn" icon="el-icon-star-off" style="color: #f56c6c;" v-btn-permission="'f9745194958bc9ed3ee5127459795dbc'"
v-else
@click="handleCommand([scope.row, '取消收藏'])"
>
</el-button>
<!-- <i class="iconfont">&#xe61e;</i>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item-->
<!-- v-if="scope.row.collectBtn"-->
<!-- :command="[scope.row, '收藏']"-->
<!-- v-btn-permission="'f9745194958bc9ed3ee5127459795dbc'"-->
<!-- >-->
<!-- 收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item-->
<!-- v-else-->
<!-- :command="[scope.row, '取消收藏']"-->
<!-- v-btn-permission="'47e155667f521467ed941c89d118e770'"-->
<!-- >-->
<!-- 取消收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'e8d690904ee1895dd0d17d9c794fbcd7'">-->
<!-- 编辑-->
<!-- </el-dropdown-item>-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="'413e676a155d6eb2dfbe08df8cbcf682'">分享</el-dropdown-item>&ndash;&gt;-->
<!-- <el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'b299fa5edb3f3f35badb2adb6bda9f2e'">-->
<!-- 删除-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
</el-dropdown>
</div>
@@ -2242,6 +2256,9 @@ export default {
orgName: '',
validFlag: '0'
},
OCRType: '',
OCRTitle: '',
ocrList: [],
standItemList: [],
drawerWidth: 1400,
// 配置标准相关 开始
@@ -3126,6 +3143,7 @@ export default {
},
// 修改成表格样式后,选择项勾选改变
standSelectChange(data) {
this.ocrList = data
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
@@ -4180,6 +4198,47 @@ export default {
this.configStandFlag = false
this.selectConfigStand = []
},
OCRAdd (type) {
let text = ''
this.OCRType = type
if (type === '0') {
text = 'OCR识别'
this.OCRTitle = '选择OCR实别文件'
} else if(type === '1') {
text = '拆分'
this.OCRTitle = '选择拆分文件'
}else if(type === '2') {
text = '编辑'
this.OCRTitle = '选择编辑文件'
}
if (this.ocrList.length > 1 && (type === '0' || type === '1' || type === '2')) {
this.$message.warning('仅能选择一条数据进行' + text)
} else if (this.ocrList.length === 0 && (type === '0' || type === '1' || type === '2')) {
this.$message.warning('请选择一条数据进行' + text)
} else if (this.ocrList.length === 1 && (type === '0' || type === '1')) {
this.OCRModel = true
this.OCRLoading = true
this.$http.get('lawss/sarStandFile/queryFileInfoNew', {
type: type,
standId: this.selectedList[0]
},{
_this: this
}, res => {
this.OCRLoading = false
if (res.ok) {
if (res.data.length > 0) {
this.OCRData = res.data
} else {
this.$message.warning('当前标准没有' + text + '文件')
this.this.OCRData = []
}
}
})
} else if (this.ocrList.length === 1 && type === '2'){
console.log('4228',this.ocrList)
this.selectStandardPro(this.ocrList[0], 'edit')
}
},
// 表对应标准移除分类到
deleteStandFromKind(flag, item) {
// this.getMenu().then(boolean => {
@@ -5092,6 +5151,21 @@ export default {
overflow: hidden;
display: flex;
flex-direction: column;
.collection-btn {
padding: 0;
border: none;
color: #4788c0;
font-size: 18px;
width: 18px;
height: 18px;
background-color: transparent;
/*background: rgba(244, 162, 39, 0.1);*/
//.icon-collection {
// background-image: url("~assets/images/shangqi/standardDetails/collection.png");
//}
}
}
.pagination {