修改文档库传参

This commit is contained in:
qq787203167
2022-03-01 16:01:19 +08:00
parent 877d467713
commit 6cd41c8eb6
8 changed files with 85 additions and 43 deletions
+11
View File
@@ -375,4 +375,15 @@ module.exports = {
cancelConfirmSubscribe:'Are you sure you want to cancel the subscribe',
ConfirmDelete:'Confirm Delete ?',
ConfirmBatchDeletion:'Confirm Batch Deletion ? ',
download:'download',
UpdateLog:'update log',
DocumentSplitting:'Document splitting',
DocumentTranslation:'Document translation',
DocumentComparison:'Document comparison',
KnowledgeDatabase:'Knowledge Q & a database',
StandardDetails:'Standard details',
whole:'whole',
DocumentLibrary:'Document Library',
DocumentComparisonLibrary:'Document comparison Library',
weekly:'weekly',
}
+11
View File
@@ -379,4 +379,15 @@ module.exports = {
cancelConfirmSubscribe:'确定取消订阅?',
ConfirmDelete:'确定删除?',
ConfirmBatchDeletion:'确定批量删除',
download:'下载',
UpdateLog:'更新log',
DocumentSplitting:'文档拆分',
DocumentTranslation:'文档翻译',
DocumentComparison:'文档对比',
KnowledgeDatabase:'知识问答库',
StandardDetails:'标准详情',
whole:'全部',
DocumentLibrary:'文档库',
DocumentComparisonLibrary:'文档对比库',
weekly:'周报',
}
@@ -1,14 +1,10 @@
<template>
<div>
<div class="box-title-text">
<!-- <div class="title-text">-->
<!-- <span class="Required">*</span>-->
<!-- <span :class="{'title-text-text':false}">{{query.enName}}</span><br>-->
<!-- <span :class="{'title-text-text':false}">{{query.name}}</span>-->
<!-- </div>-->
<a-input class="box-input" :value="value" @input="indexclick($event)"
:placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
<a-button type="primary" class="button-box" @click="standardClick">
:disabled="isDisabled"
:placeholder="!isDisabled?$t('PleaseEnterOrSelect')+query.db_field_txt:query.db_field_txt"/>
<a-button v-if="!isDisabled" type="primary" class="button-box" @click="standardClick">
{{this.$t('standardSelection')}}
</a-button>
</div>
@@ -65,6 +61,14 @@
currencySearch
},
props: ['query', 'value', 'replace_standard_id'],
computed: {
isDisabled() {
if (this.query.db_field_name === 'replaced_standard') {
return true
}
return false
}
},
data() {
return {
visible: false,
@@ -238,4 +242,9 @@
text-align: right;
margin-top: 20px;
}
</style>
<style>
/*.ant-input-disabled{*/
/* background-color: #f5f5f5!important;*/
/*}*/
</style>
@@ -69,10 +69,10 @@
methods: {
initDictData() {
//优先从缓存中读取字典配置
/* if(getDictItemsFromCache(this.dictCode)){
if(getDictItemsFromCache(this.dictCode)){
this.dictOptions = getDictItemsFromCache(this.dictCode);
return
}*/
}
//根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => {
@@ -88,11 +88,11 @@
this.dictOptions = [...this.options]
}else{
//优先从缓存中读取字典配置
// let cacheOption = getDictItemsFromCache(this.dictCode)
// if(cacheOption && cacheOption.length>0){
// this.dictOptions = cacheOption
// return
// }
let cacheOption = getDictItemsFromCache(this.dictCode)
if(cacheOption && cacheOption.length>0){
this.dictOptions = cacheOption
return
}
//根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
@@ -268,6 +268,7 @@
validatorRules: {},
confirmLoading: false,
uploadName: '',
type: 'add',
headerText: [
{
text: this.$t('essentialInformation'),
@@ -329,7 +330,7 @@
}
},
mounted() {
this.getForm()
},
methods: {
sumber() {
@@ -447,16 +448,18 @@
this.isFormInline = true
this.confirmLoading = false
},
getForm() {
getForm(callBack) {
this.confirmLoading = true
let params = {
flag: this.flag
flag: this.flag,
type: this.type
}
getAction(this.url.getAddForm, params).then((res) => {
if (res.success) {
this.dataList = res.result
this.ruleList = res.result
this.IntegrateData()
callBack && callBack()
this.headerText.forEach((res) => {
res.content = []
this.dataList.forEach(val => {
@@ -469,18 +472,23 @@
})
},
edit(item) {
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
if (res.success) {
this.formInline = res.result[0]
}
this.type = 'edit'
this.getForm(() => {
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
if (res.success) {
this.formInline = res.result[0]
}
})
})
},
add() {
this.formInline = {}
this.type = 'add'
this.getForm()
},
StandardselectionChange(id){
StandardselectionChange(id) {
this.formInline.replace_standard_id = id
},
}
}
}
</script>
@@ -4,28 +4,28 @@
<div class="doc-detail-header">
<div class="doc-detail-title">
<a-icon type="home" style="margin-right: 4px"/>
{{this.$route.query.serial_number}} 《{{this.$route.query.title}}》 标准详情
{{this.$route.query.serial_number}} 《{{this.$route.query.title}}》 {{$t('StandardDetails')}}
</div>
<div class="doc-detail-right">
<div @click="UpdateLog" class="operator-text">
<a-icon type="reload"/>
更新log
{{$t('UpdateLog')}}
</div>
<div @click="DocumentSplitting" class="operator-text">
<a-icon type="codepen"/>
文档拆分
{{$t('DocumentSplitting')}}
</div>
<div @click="UpdateLog" class="operator-text">
<a-icon type="file-pdf"/>
文档翻译
{{$t('DocumentTranslation')}}
</div>
<div @click="UpdateLog" class="operator-text">
<a-icon type="wallet"/>
文档对比
{{$t('DocumentComparison')}}
</div>
<div @click="UpdateLog" class="operator-text">
<a-icon type="folder"/>
知识问答库
{{$t('KnowledgeDatabase')}}
</div>
</div>
</div>
@@ -34,13 +34,13 @@
<div class="header-text">
{{val}}
</div>
<div class="content-text" v-if="val == '基本信息'">
<div class="content-text" v-if="val == $t('essentialInformation')">
<div class="text-field" v-for="(ol,index1) in item[val]">
<span class="text-field-left">{{ol.db_field_txt}}</span>
<span class="text-field-right">{{ol.value ? ol.value : '--'}}</span>
</div>
</div>
<div class="TextInformation" v-if="val == '文本信息'">
<div class="TextInformation" v-if="val == $t('textInformation')">
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
<span class="TextInformationContentLeft">
<span>{{ol.db_field_txt}}</span>
@@ -51,12 +51,12 @@
</span>
<span class="TextInformationContentright" v-show="ol.value" @click="download(ol.value)">
<a-icon type="vertical-align-bottom"/>
下载
{{$t('download')}}
</span>
</span>
</div>
</div>
<div class="TextInformation" v-else-if="val == '关联信息'">
<div class="TextInformation" v-else-if="val == $t('relatedInformation')">
<div class="TextInformationContent" v-for="(ol,index1) in item[val]" style="width: 100%">
<span class="TextInformationContentLeft">
{{ol.db_field_txt}}
@@ -347,7 +347,8 @@
font-weight: 400;
text-align: center;
}
.TextInformationContentcontentButton{
.TextInformationContentcontentButton {
width: calc(100% - 268px);
border-top: 1px #eff1f3 solid;
border-left: 1px #eff1f3 solid;
@@ -38,13 +38,13 @@
<div class="search-center-content">
<div class="search-con-header">
<div class="search-header-left">
<a-tabs default-active-key="全部" @change="callback">
<a-tab-pane key="全部" tab="全部"></a-tab-pane>
<a-tab-pane key="文档库" tab="文档库" force-render>
<a-tabs :default-active-key="$t('whole')" @change="callback">
<a-tab-pane :key="$t('whole')" :tab="$t('whole')"></a-tab-pane>
<a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')" force-render>
</a-tab-pane>
<a-tab-pane key="知识问题库" tab="知识问题库"></a-tab-pane>
<a-tab-pane key="文档对比库" tab="文档对比库"></a-tab-pane>
<a-tab-pane key="周报" tab="周报"></a-tab-pane>
<a-tab-pane :key="$t('KnowledgeDatabase')" :tab="$t('KnowledgeDatabase')"></a-tab-pane>
<a-tab-pane :key="$t('DocumentComparisonLibrary')" :tab="$t('DocumentComparisonLibrary')"></a-tab-pane>
<a-tab-pane :key="$t('weekly')" :tab="$t('weekly')"></a-tab-pane>
</a-tabs>
</div>
</div>
@@ -585,6 +585,7 @@
position: relative;
padding: 26px 0 22px 0;
box-sizing: border-box;
.search-text-title {
padding: 0 0 22px 0;
@@ -635,7 +636,7 @@
.search-text-list {
ul {
padding:0 0 0 18px;
padding: 0 0 0 18px;
margin: 0;
li {
@@ -695,9 +696,10 @@
box-sizing: border-box;
margin-left: 38px;
}
.text-right-right{
.text-right-right {
border-left: 2px solid #E6E7EC;
padding: 24px 0 24px 24px!important;
padding: 24px 0 24px 24px !important;
box-sizing: border-box;
}
</style>