标准详情,添加ocr按钮

This commit is contained in:
zhaokaiyao@91isoft.com
2021-08-23 15:40:06 +08:00
parent 99c3f9752d
commit 93f9c65625
@@ -287,6 +287,8 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/> />
<el-button v-if="file.fileSuffix='pdf'" type="primary" round>OCR</el-button>
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>
</template> </template>
<template v-else> <template v-else>
@@ -306,12 +308,12 @@
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>
</template> </template>
</p> </p>
<!-- <el-button--> <!-- <el-button-->
<!-- v-if="child.attrField === 'FBGBJBD' || child.attrField === 'SSG' || child.attrField === 'ZQYJG' || child.attrField === 'BPG' || child.attrField === 'ZBJBD' || child.attrField === 'CA'"--> <!-- v-if="child.attrField === 'FBGBJBD' || child.attrField === 'SSG' || child.attrField === 'ZQYJG' || child.attrField === 'BPG' || child.attrField === 'ZBJBD' || child.attrField === 'CA'"-->
<!-- @click="showItemsModel(child.attrField)"--> <!-- @click="showItemsModel(child.attrField)"-->
<!-- class="decomposition-btn"--> <!-- class="decomposition-btn"-->
<!-- icon="icon-separate"--> <!-- icon="icon-separate"-->
<!-- >标准分解单</el-button>--> <!-- >标准分解单</el-button>-->
</div> </div>
</div> </div>
@@ -383,6 +385,11 @@
class="icon-download2" class="icon-download2"
v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'" v-btn-permission="$route.params.pageType === 'INLAND_STAND' ? 'd5b28957b5105c805e90a16fd5056a45' : '824f3bf9edef83fc7488917136167232'"
/> />
<!-- OCR按钮,根据文件名取后缀判断是否出现-->
<el-button v-if="judgeSuffix(file.fileName)" type="primary" size="mini" style="margin: 5px" @click="ocrFunction(file)" plain>OCR</el-button>
<span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span> <span class="time-text">上传时间:{{ dateFormat(file.modifyTime) }}</span>
</template> </template>
<template v-else> <template v-else>
@@ -1513,6 +1520,14 @@ export default {
props: {}, props: {},
watch: {}, watch: {},
methods: { methods: {
judgeSuffix(fileName){
if ('pdf'===fileName.substring(fileName.lastIndexOf('.') + 1)){
return true;
}else return false;
},
ocrFunction(file){
return "ocr"
},
FormatDate(date) { FormatDate(date) {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
}, },
@@ -2089,16 +2104,11 @@ export default {
}, },
// 分页点击后方法 // 分页点击后方法
pageChange(page) { pageChange(page) {
console.log("page");
console.log(page);
this.standItemSearch.page = page this.standItemSearch.page = page
this.selectSarStandItems() this.selectSarStandItems()
}, },
// 分页每页显示数改变后方法 // 分页每页显示数改变后方法
pageSizeChange(pageSize) { pageSizeChange(pageSize) {
console.log("pageSize");
console.log(pageSize);
// this.standItemSearch.pageSize = this.$store.getters.userInfo.configContent // this.standItemSearch.pageSize = this.$store.getters.userInfo.configContent
this.standItemSearch.pageSize = pageSize; this.standItemSearch.pageSize = pageSize;
this.selectSarStandItems() this.selectSarStandItems()
@@ -2124,7 +2134,7 @@ export default {
if (this.sarStandardsInfoEO.replaceStandNum != null && this.sarStandardsInfoEO.replaceStandNum !== '') { if (this.sarStandardsInfoEO.replaceStandNum != null && this.sarStandardsInfoEO.replaceStandNum !== '') {
this.replaceNumList = this.sarStandardsInfoEO.replaceStandNum.split(',') this.replaceNumList = this.sarStandardsInfoEO.replaceStandNum.split(',')
} }
// eslint-disable-next-line no-mixed-operators // // eslint-disable-next-line no-mixed-operators
Object.keys((this.sarStandardsInfoEO && this.sarStandardsInfoEO.attrInfoMap) || {}).forEach((key) => { Object.keys((this.sarStandardsInfoEO && this.sarStandardsInfoEO.attrInfoMap) || {}).forEach((key) => {
if (this.sarStandardsInfoEO.attrInfoMap[key]) { if (this.sarStandardsInfoEO.attrInfoMap[key]) {
this.sarStandardsInfoEO[key] = this.sarStandardsInfoEO.attrInfoMap[key] this.sarStandardsInfoEO[key] = this.sarStandardsInfoEO.attrInfoMap[key]
@@ -2502,9 +2512,7 @@ export default {
}, },
// 分解单-查看 // 分解单-查看
handlePreview(item) { handlePreview(item) {
console.log(item);
this.standShowItemEO = item this.standShowItemEO = item
console.log(this.standShowItemEO);
this.showItemInfoModal = true this.showItemInfoModal = true
let fileList = [] let fileList = []
item.defaultFileList = [] item.defaultFileList = []
@@ -2608,8 +2616,6 @@ export default {
// const { data: { STAND: data } } = res // const { data: { STAND: data } } = res
const {data = {}} = res const {data = {}} = res
this.formFieldListData = data[this.$route.params.pageType] this.formFieldListData = data[this.$route.params.pageType]
console.log('this.formFieldListData')
console.log(this.formFieldListData);
// this.resolveFormFieldList() // this.resolveFormFieldList()
resolve(data[this.$route.params.pageType]) resolve(data[this.$route.params.pageType])
} else { } else {
@@ -2836,14 +2842,14 @@ export default {
this.setMap(res.data.SARPROPERTY) // 标准性质 this.setMap(res.data.SARPROPERTY) // 标准性质
}, e => { }, e => {
}) })
Promise.all([this.queryDisplayLocation(), this.selectStandMessage(), this.getAddFormFieldList()]).then((values) => { Promise.all([this.queryDisplayLocation(), this.selectStandMessage(), this.getAddFormFieldList()]).then ((values) => {
const [displayLocation, standEO, formFieldList] = values const [displayLocation, standEO, formFieldList] = values
const dynamicFormField = standEO ? standEO.attrInfoMap : {} const dynamicFormField = standEO ? standEO.attrInfoMap : {}
formFieldList.forEach((field) => { formFieldList.forEach((field) => {
// 相关流程权限 // 相关流程权限
// if (field.attrField === 'XGLC' && !this.$_has('6A52PZCAX8BAUUJ2TSQ4')) { if (field.attrField === 'XGLC' && !this.$_has('6A52PZCAX8BAUUJ2TSQ4')) {
// return return
// } }
displayLocation.forEach((location) => { displayLocation.forEach((location) => {
location.isShowImp = '0' location.isShowImp = '0'
if (dynamicFormField) { if (dynamicFormField) {
@@ -2893,6 +2899,8 @@ export default {
location.half = half location.half = half
location.showAll = false location.showAll = false
}) })
console.log(standEO);
this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list', { this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list', {
id: this.$route.params.id id: this.$route.params.id
}, { }, {
@@ -2911,7 +2919,6 @@ export default {
} }
}) })
this.dynamicFormField = displayLocation this.dynamicFormField = displayLocation
console.log(this.dynamicFormField)
}) })
sessionStorage.setItem('displayLocation', JSON.stringify(displayLocation)) sessionStorage.setItem('displayLocation', JSON.stringify(displayLocation))
this.loading = false this.loading = false