diff --git a/src/pages/localTool/standardRecognition/index.vue b/src/pages/localTool/standardRecognition/index.vue
index 21838c0db..a7cdcad16 100644
--- a/src/pages/localTool/standardRecognition/index.vue
+++ b/src/pages/localTool/standardRecognition/index.vue
@@ -10,6 +10,9 @@
删除
+ 编辑
@@ -100,26 +103,17 @@
width="120"
>
-
+
-
-
-
- 获取文件
- 编辑
- 删除
-
-
-
+ 获取文件
@@ -165,12 +159,14 @@
{{ $t("m.upload")+' PDF'}}
{{ $t("m.upload")+' PDF'}}
@@ -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();
},
diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
index c945e6ca6..64a078d7d 100644
--- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
+++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
@@ -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'">删除
-