|
|
@ -60,6 +60,9 @@ |
|
|
> |
|
|
> |
|
|
<i v-if="item.isInputClass === 'popover'" slot="suffix" class="el-input__icon iconfont icon-gengduo1" @click="handleCurrentFieldName(item)" /> |
|
|
<i v-if="item.isInputClass === 'popover'" slot="suffix" class="el-input__icon iconfont icon-gengduo1" @click="handleCurrentFieldName(item)" /> |
|
|
</el-input> |
|
|
</el-input> |
|
|
|
|
|
<!-- <div v-if="shouldShowIcon(item)" :class="loadingStatus[item.fieldName] ?'auto-box loading-style':'auto-box'" :disabled="loadingStatus[item.fieldName]"> |
|
|
|
|
|
<i ref="iconRef" class="iconfont icon-zidonggengxin" @click="handleIconClick(item)" /> |
|
|
|
|
|
</div> --> |
|
|
<!-- date --> |
|
|
<!-- date --> |
|
|
<!-- <el-date-picker |
|
|
<!-- <el-date-picker |
|
|
v-if="item.isInputClass === 'date'" |
|
|
v-if="item.isInputClass === 'date'" |
|
|
@ -188,6 +191,7 @@ import { getCurrentTime } from '@/utils/index' |
|
|
import { reDocumentUpload } from '@/utils/upload' |
|
|
import { reDocumentUpload } from '@/utils/upload' |
|
|
import PreUpload from './preUpload4' |
|
|
import PreUpload from './preUpload4' |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
import Vue from 'vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'PreviewForm', |
|
|
name: 'PreviewForm', |
|
|
@ -286,7 +290,16 @@ export default { |
|
|
fileList: [], |
|
|
fileList: [], |
|
|
archivesSummaryResponse: {}, |
|
|
archivesSummaryResponse: {}, |
|
|
pickerDateMap: {}, |
|
|
pickerDateMap: {}, |
|
|
minioPreResult: {} |
|
|
|
|
|
|
|
|
minioPreResult: {}, |
|
|
|
|
|
iconShowRule: { |
|
|
|
|
|
'3-1': 'item_no', |
|
|
|
|
|
'3-2': 'record_no', |
|
|
|
|
|
'4-2': 'item_no', |
|
|
|
|
|
'3-3': 'record_no', |
|
|
|
|
|
'4-3': 'item_no' |
|
|
|
|
|
}, |
|
|
|
|
|
isMaxLoading: false, |
|
|
|
|
|
loadingStatus: {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -318,6 +331,47 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
shouldShowIcon(item) { |
|
|
|
|
|
if (item.isInputClass !== 'number') return false |
|
|
|
|
|
const ruleKey = `${this.isTitleType}-${this.selectedCategory.arrangeType}` |
|
|
|
|
|
const targetField = this.iconShowRule[ruleKey] |
|
|
|
|
|
return targetField && targetField === item.fieldName |
|
|
|
|
|
}, |
|
|
|
|
|
async handleIconClick(item) { |
|
|
|
|
|
const fieldName = item.fieldName |
|
|
|
|
|
// 防重复点击:判断当前字段的加载状态 |
|
|
|
|
|
if (this.loadingStatus[fieldName]) { |
|
|
|
|
|
console.log(`字段${fieldName}正在加载,禁止重复点击`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Vue.set(this.loadingStatus, fieldName, true) |
|
|
|
|
|
console.log(`字段${fieldName}加载状态:`, this.loadingStatus[fieldName]) |
|
|
|
|
|
|
|
|
|
|
|
// try { |
|
|
|
|
|
|
|
|
|
|
|
// // 2. 模拟接口请求(替换为真实接口) |
|
|
|
|
|
// // const response = await new Promise((resolve) => { |
|
|
|
|
|
// // setTimeout(() => { |
|
|
|
|
|
// // resolve({ data: { code: 200, data: `NO-${Date.now().slice(-6)}` }}) |
|
|
|
|
|
// // }, 2000) |
|
|
|
|
|
// // }) |
|
|
|
|
|
|
|
|
|
|
|
// // // 3. 处理接口结果 |
|
|
|
|
|
// // if (response.data.code === 200) { |
|
|
|
|
|
// // this.inputValue = response.data.data |
|
|
|
|
|
// // this.$message?.success('编号生成成功') || alert('生成成功') |
|
|
|
|
|
// // } |
|
|
|
|
|
// } catch (error) { |
|
|
|
|
|
// console.error('接口请求失败:', error) |
|
|
|
|
|
// this.$message?.error('生成失败') || alert('生成失败') |
|
|
|
|
|
// } finally { |
|
|
|
|
|
// // 4. 无论成功/失败,重置为false |
|
|
|
|
|
// Vue.set(this.loadingStatus, fieldName, false) |
|
|
|
|
|
// console.log('请求结束,isMaxLoading重置为:', this.isMaxLoading) |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
preUplpadClose() { |
|
|
preUplpadClose() { |
|
|
this.$refs.preUploadRefs.handleClearData() |
|
|
this.$refs.preUploadRefs.handleClearData() |
|
|
}, |
|
|
}, |
|
|
@ -1576,4 +1630,21 @@ export default { |
|
|
::v-deep .hidden-picker-input .el-input__prefix { |
|
|
::v-deep .hidden-picker-input .el-input__prefix { |
|
|
left: 3px !important; |
|
|
left: 3px !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auto-box{ |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
right: 38px; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
i::before{ |
|
|
|
|
|
margin-right:0 !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.loading-style{ |
|
|
|
|
|
animation: rotate 3s linear infinite; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes rotate { |
|
|
|
|
|
0% { transform: rotate(0deg); } |
|
|
|
|
|
100% {transform: rotate(-360deg) } |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |