|
@@ -89,6 +89,8 @@
|
|
|
</HcTooltip>
|
|
|
</div>
|
|
|
<div class="btn-action">
|
|
|
+ <el-button v-if="isEnableBulk" color="#3794FF" size="small" style="color: white" @click="enableBulkReplication">关闭批量复制</el-button>
|
|
|
+ <el-button v-else color="#3794FF" size="small" style="color: white" @click="enableBulkReplication">开启批量复制</el-button>
|
|
|
<HcTooltip keys="wbs_save_table">
|
|
|
<el-button
|
|
|
:disabled="!item?.isTableForm" :loading="tableFormSaveLoading"
|
|
@@ -297,7 +299,6 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, onActivated, onDeactivated, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
|
-import { getStoreValue } from '~src/utils/storage'
|
|
|
import HTableForm from '~src/plugins/HTableForm'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
@@ -315,6 +316,7 @@ import {
|
|
|
arrIndex, deepClone,
|
|
|
downloadBlob, getArrValue, getObjVal, getObjValue, isNullES, setPosRange,
|
|
|
} from 'js-fast-way'
|
|
|
+import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import { HcDelMsg, HcUploadFileApi } from 'hc-vue3-ui'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
|
//参数
|
|
@@ -390,7 +392,7 @@ const draw_type = ref(props.drawType)
|
|
|
const tree_AutoExpandKeys = ref(props.treeAutoExpandKeys)
|
|
|
const treenodeDataInfo = ref(props.treenodeDataInfo)
|
|
|
const newlistdata = ref(props.newlistdata)
|
|
|
-
|
|
|
+const isEnableBulk = ref(true)
|
|
|
|
|
|
//表单变量
|
|
|
const formDataList = ref([])
|
|
@@ -470,7 +472,10 @@ onMounted(() => {
|
|
|
setTableFormMenu(useAppState.projectInfo)
|
|
|
const { offsetHeight } = document.body
|
|
|
DragModalHeight.value = offsetHeight - 200
|
|
|
- setMountOnEventKey()
|
|
|
+ const isBulk = getStoreValue('isEnableBulk') || true
|
|
|
+ isEnableBulk.value = isBulk
|
|
|
+ HTableForm.setEnableBulk(isBulk)
|
|
|
+ if (isBulk) setMountOnEventKey()
|
|
|
})
|
|
|
|
|
|
//处理变动的数据
|
|
@@ -1386,9 +1391,26 @@ const excelTableFormClick = (key) => {
|
|
|
|
|
|
//缓存被激活时
|
|
|
onActivated(() => {
|
|
|
- setMountOnEventKey()
|
|
|
+ if (isEnableBulk.value) {
|
|
|
+ setMountOnEventKey()
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
+//开启/关闭 批量复制
|
|
|
+const enableBulkReplication = async () => {
|
|
|
+ const res = !isEnableBulk.value
|
|
|
+ HTableForm.setEnableBulk(res)
|
|
|
+ if (res) {
|
|
|
+ setMountOnEventKey()
|
|
|
+ } else {
|
|
|
+ HTableForm.unmountEventKey()
|
|
|
+ const refs = await setOnFuncFormRef()
|
|
|
+ refs?.setIsCtrlKey(false)
|
|
|
+ }
|
|
|
+ isEnableBulk.value = res
|
|
|
+ setStoreValue('isEnableBulk', res)
|
|
|
+}
|
|
|
+
|
|
|
//缓存时被移除
|
|
|
onDeactivated(() => {
|
|
|
HTableForm.unmountEventKey()
|
|
@@ -1401,6 +1423,7 @@ onUnmounted(() => {
|
|
|
|
|
|
const setMountOnEventKey = () => {
|
|
|
HTableForm.setOnEventKey({
|
|
|
+ vEnableBulk: isEnableBulk.value,
|
|
|
//按下ctrl键 或 control 键
|
|
|
onCtrlDown: async () => {
|
|
|
//window.$HcLog('全局按键', '按下ctrl键 或 control 键')
|