This commit is contained in:
zhutianqi
2021-12-07 14:36:54 +08:00
parent fd449a232f
commit 3b8be63a25
2 changed files with 45 additions and 247 deletions
+44 -220
View File
@@ -10,6 +10,9 @@
<el-button size="mini" @click="delData" v-btn-permission="'ef6262d0bf66a25633e903d76a93e579'"
><i class="iconfont">&#xe61b;</i>删除</el-button
>
<el-button size="mini" @click="editOcrRecord" v-btn-permission="'ef6262d0bf66a25633e903d76a93e579'"
><i class="iconfont">&#xe611;</i>编辑</el-button
>
</div>
</div>
<div class="content">
@@ -100,26 +103,17 @@
width="120"
>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<el-table-column label="操作" align="center" width="150" fixed="right">
<template slot-scope="scope">
<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.resultContent !== '转换中'" :command="[scope.row, '获取文件']" v-btn-permission="'018cb58e72025fc43a9bfe1bde00c14a'"
>获取文件</el-dropdown-item
>
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'14bdb937d168478e65b139214e982a8c'"
>编辑</el-dropdown-item
>
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'74cffbebad841dbe2e0597792e5aba3f'"
>删除</el-dropdown-item
>
<!-- <el-dropdown-item :command="[scope.row, '在线编辑']" v-btn-permission=""
>在线编辑</el-dropdown-item
>-->
</el-dropdown-menu>
</el-dropdown>
<el-button
:disabled="scope.row.resultContent === '转换中'"
v-btn-permission="'018cb58e72025fc43a9bfe1bde00c14a'"
type="primary"
size="mini"
class="common-button-primary"
@click="downloadFile(scope.row)"
>获取文件</el-button>
</div>
</template>
</el-table-column>
@@ -165,12 +159,14 @@
<el-button
v-if="uploadFilesdfEo.fileName === ''"
type="primary"
size="mini"
class="common-button-primary"
>{{ $t("m.upload")+' PDF'}}</el-button>
<div v-else>
<el-input readonly v-model="uploadFilesdfEo.fileName" class="bead-input" style="width: 62%;margin-right: 14px"></el-input>
<el-button
type="primary"
size="mini"
class="common-button-primary"
>{{ $t("m.upload")+' PDF'}}</el-button>
</div>
@@ -719,6 +715,7 @@ export default {
components: {},
data() {
return {
selectTableDatas: [],
textStatusMap: {}, // 文本状态id与name对应
lawInfoTable:[],
lawInfoTableLoading: true,
@@ -784,184 +781,7 @@ export default {
{ required: true, message: '文件不能为空', trigger: 'change' }
]
},
options: [
// {
// value: "STAND_FILE",
// label: "标准文本",
// },
// {
// value: "DRAFT_FILE",
// label: "草案",
// },
// {
// value: "OPINION_FILE",
// label: "征求意见稿",
// },
// {
// value: "SENT_SCREEN_FILE",
// label: "送审稿",
// },
// {
// value: "APPROVAL_FILE",
// label: "报批稿",
// },
// {
// value: "RELEVANCE_FILE",
// label: "关联文件",
// },
],
/* standRecoColumn: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '序号',
type: 'index',
align: 'center'
},
{
title: '资料类型',
key: 'fileType',
align: 'center',
render: (h, params) => {
let texts
if (params.row.fileType === '1') {
texts = '国内标准法规'
} else if (params.row.fileType === '2') {
texts = '海外标准法规'
} else if (params.row.fileType === '3') {
texts = '政策'
} else if (params.row.fileType === '4') {
texts = '企业标准'
} else {
texts = '标准'
}
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: texts
}
}, texts)
}
},
{
title: '标准号/政策号',
key: 'standNumber',
align: 'center'
},
{
title: '标准名称/政策名称',
key: 'standName',
align: 'center'
},
{
title: '文本状态',
key: 'fileStatus',
align: 'center',
render: (h, params) => {
let texts
if (params.row.fileType === 'STAND_FILE') {
texts = '标准文本'
} else if (params.row.fileType === 'DRAFT_FILE') {
texts = '草案'
} else if (params.row.fileType === 'OPINION_FILE') {
texts = '征求意见稿'
} else if (params.row.fileType === 'SENT_SCREEN_FILE') {
texts = '送审稿'
} else if (params.row.fileType === 'APPROVAL_FILE') {
texts = '报批稿'
} else if (params.row.fileType === 'RELEVANCE_FILE') {
texts = '关联文件'
}
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: texts
}
}, texts)
}
},
{
title: '转换结果',
key: 'resultContent',
align: 'center'
},
{
title: '消耗时间',
key: 'spendTime',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center',
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.downloadFile(params.row)
}
}
}, '获取文件'),
h('Button', {
props: {
type: 'warning',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.editOcrRecord(params.row)
}
}
}, '编辑'),
h('Dropdown', {
props: {
trigger: 'click'
},
on: {
'on-click': (value) => {}
}
}, [
h('Button', {
props: {
type: 'primary',
size: 'small'
}
}, '更多'),
h('DropdownMenu', {
slot: 'list'
},
this.dropdownItems.map(function (type) {
return h('DropdownItem', {
props: {
name: type.val
}
}, type.val)
})
)
])
])
}
}
],*/
options: [],
modalType: "",
standRecoList: [],
selectTableData: [],
@@ -1237,6 +1057,7 @@ export default {
this.selectTableData = [];
for (let i = 0; i < data.length; i++) {
this.selectTableData.push(data[i].id);
this.selectTableDatas.push(data[i])
}
},
// 上传
@@ -1326,28 +1147,32 @@ export default {
this.$refs["importFileAboutStand"].clearFiles();
},
// 编辑
editOcrRecord(row) {
console.log('575',row)
this.modalType = "2";
this.title = "编辑信息";
this.btnName = "保存";
this.uploadFilesdfEo.fileName = row.fileName
this.uploadModal = true;
this.uploadFilesdfEo.standNumber = JSON.parse(
JSON.stringify(row)
).standNumber;
this.uploadFilesdfEo.standName = JSON.parse(
JSON.stringify(row)
).standName;
// this.uploadFilesdfEo.fileType = JSON.parse(JSON.stringify(row)).fileType
this.options.map((item) => {
if (item.attrName === JSON.parse(JSON.stringify(row)).fileType) {
this.uploadFilesdfEo.fileType = item.attrName;
}
});
this.uploadFilesdfEo.id = JSON.parse(JSON.stringify(row)).id;
this.uploadFilesdfEo.attId = "";
this.defaultFileList = [];
editOcrRecord() {
if (this.selectTableDatas.length === 1) {
let row = this.selectTableDatas[0]
this.modalType = "2";
this.title = "编辑信息";
this.btnName = "保存";
this.uploadFilesdfEo.fileName = row.fileName
this.uploadModal = true;
this.uploadFilesdfEo.standNumber = JSON.parse(
JSON.stringify(row)
).standNumber;
this.uploadFilesdfEo.standName = JSON.parse(
JSON.stringify(row)
).standName;
// this.uploadFilesdfEo.fileType = JSON.parse(JSON.stringify(row)).fileType
this.options.map((item) => {
if (item.attrName === JSON.parse(JSON.stringify(row)).fileType) {
this.uploadFilesdfEo.fileType = item.attrName;
}
});
this.uploadFilesdfEo.id = JSON.parse(JSON.stringify(row)).id;
this.uploadFilesdfEo.attId = "";
this.defaultFileList = [];
} else {
this.$message.warning('请选择一条数据进行编辑')
}
},
// 提交
uploadSave() {
@@ -1519,7 +1344,7 @@ export default {
(res) => {
if (res.ok) {
this.standRecoList = res.data.list;
this.total = res.data.list.length;
this.total = res.data.count
}
},
e => {}
@@ -1533,7 +1358,6 @@ export default {
_this: this
}, res => {
this.options = res.data
console.log(this.options);
})
this.getTableData();
},
@@ -18,7 +18,7 @@
:indent="0"
:props="props"
:data="treeList"
default-expanded-keys="['3']"
:default-expanded-keys="['3']"
highlight-current
@node-click="treeClick"
:filter-node-method="filterNode">
@@ -404,11 +404,8 @@
v-btn-permission="'a7a38a95ea374695fc3128037f6feccf'">删除
</el-button>
</div>
<div v-else>
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<el-button title="收藏" class="collection-btn" icon="el-icon-star-off" v-btn-permission="'d9730d984627af948053df56a2db7997'"
v-if="scope.row.collectBtn"
@click="handleCommand([scope.row, '收藏'])"
@@ -419,29 +416,6 @@
@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="'d9730d984627af948053df56a2db7997'"-->
<!-- >-->
<!-- 收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item-->
<!-- v-else-->
<!-- :command="[scope.row, '取消收藏']"-->
<!-- v-btn-permission="'d9730d984627af948053df56a2db7997'"-->
<!-- >-->
<!-- 取消收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'dd4ea796dab7a01b105ba657b1968a84'">编辑</el-dropdown-item>-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="'ESPMBSD4ZP'">分享</el-dropdown-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '授权']" v-btn-permission="'CWBPST294ZH7HSKD4452'" v-if="scope.row.attrInfoMap && scope.row.attrInfoMap.QBMJ === 'ACF675Z88W'">授权</el-dropdown-item>&ndash;&gt;-->
<!-- <el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'a7a38a95ea374695fc3128037f6feccf'">删除</el-dropdown-item>-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '流程']">流程</el-dropdown-item>&ndash;&gt;-->
<!-- </el-dropdown-menu>-->
</el-dropdown>
</div>
</div>