|
|
@@ -741,28 +741,44 @@
|
|
|
</el-form>
|
|
|
</hc-dialog>
|
|
|
<!-- !-- 清除所有数据 - -->
|
|
|
- <hc-new-dialog v-model="clearShow" title="清除数据" widths="400px" :footer="false">
|
|
|
- <div class="text-center">
|
|
|
- <div>
|
|
|
+ <hc-new-dialog v-model="clearShow" title="清除数据" widths="600px" :footer="false">
|
|
|
+ <div style="display: flex; padding: 15px; gap: 20px;">
|
|
|
+ <!-- 左侧列 -->
|
|
|
+ <div style="flex: 1;">
|
|
|
+ <div class="text-orange mb-2" style="font-size: 12px;">
|
|
|
+ *删除当前表单和所有当前表单复制表单所有的字段数据
|
|
|
+ </div>
|
|
|
<el-button
|
|
|
:loading="clearLoading1"
|
|
|
hc-btn
|
|
|
type="primary"
|
|
|
+ style="width: 100%;
|
|
|
+ background-color: #40a6ff;
|
|
|
+ border-color: #4099ff;
|
|
|
+ color: white;
|
|
|
+ padding: 12px 0; /* 增加上下内边距(垂直方向),让按钮变高 */"
|
|
|
@click="clearSaveClick(2)"
|
|
|
>
|
|
|
- 清除所有表单的字段数据
|
|
|
+ 删除当前及所有复制表单字段数据
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <div class="mt-2">
|
|
|
+
|
|
|
+ <!-- 右侧列 -->
|
|
|
+ <div style="flex: 1;">
|
|
|
+ <div class="text-orange mb-2" style="font-size: 12px;">
|
|
|
+ *删除当前表单所有的字段数据,不影响当前表单复制表单
|
|
|
+ </div>
|
|
|
<el-button
|
|
|
:loading="clearLoading2"
|
|
|
- color="#419EFF"
|
|
|
hc-btn
|
|
|
- style="color:white"
|
|
|
-
|
|
|
+ style="width: 100%;
|
|
|
+ background-color: #1e31af;
|
|
|
+ border-color: #1E40AF;
|
|
|
+ color: white;
|
|
|
+ padding: 12px 0; /* 同样增加上下内边距 */"
|
|
|
@click="clearSaveClick(1)"
|
|
|
>
|
|
|
- 仅删除当前表单的字段数据
|
|
|
+ 仅删除当前表单字段数据
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -773,7 +789,7 @@
|
|
|
<div class="dialog-content">
|
|
|
<!-- 提示文本 -->
|
|
|
<p class="mb-4 text-orange">* 提示:多页导入会自动复制表格生成数据</p>
|
|
|
-
|
|
|
+
|
|
|
<!-- 表单内容 -->
|
|
|
<el-form
|
|
|
:model="uploadFileForm"
|
|
|
@@ -781,9 +797,9 @@
|
|
|
<el-form-item label="">
|
|
|
<el-radio-group v-model="uploadFileForm.selectedOption">
|
|
|
<el-radio :value="true">
|
|
|
- 导入前 <el-input
|
|
|
- v-model="uploadFileForm.pageSize"
|
|
|
- style="width: 120px; display: inline-block"
|
|
|
+ 导入前 <el-input
|
|
|
+ v-model="uploadFileForm.pageSize"
|
|
|
+ style="width: 120px; display: inline-block"
|
|
|
placeholder="请输入页码"
|
|
|
type="number"
|
|
|
min="1"
|
|
|
@@ -1150,7 +1166,7 @@ const isOpen = infos['isOpenRandomNumber'] ?? 0
|
|
|
newArr.push({ label: '关联试验文件', key: 'file' })
|
|
|
newArr.push({ label: '公式参数', key: 'formula' })
|
|
|
newArr.push({ label: '含水率', key: 'water' })
|
|
|
-
|
|
|
+
|
|
|
if (isStatus.value !== 3) {
|
|
|
newArr.push({ label: '清除所有数据', key: 'clear' }),
|
|
|
newArr.push({ label: '清除字段数据', key: 'clearcur' })
|
|
|
@@ -1165,7 +1181,7 @@ const isOpen = infos['isOpenRandomNumber'] ?? 0
|
|
|
label: '关联试验文件', key: 'file',
|
|
|
}]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//鼠标右键事件
|
|
|
@@ -1175,7 +1191,7 @@ const tableFormRightTap = (
|
|
|
index,
|
|
|
) => {
|
|
|
console.log(ele, 'ele')
|
|
|
-
|
|
|
+
|
|
|
const { event, KeyName, startPos, endPos, pkeyId, clearFormula, clearautomatic } = ele
|
|
|
const item = listDatas.value[index]
|
|
|
console.log(item, 'item')
|
|
|
@@ -1198,9 +1214,9 @@ const tableFormRightTap = (
|
|
|
label: '恢复公式引用',
|
|
|
key: 'addGs',
|
|
|
})
|
|
|
- }
|
|
|
+ }
|
|
|
console.log(clearautomatic, 'clearautomatic')
|
|
|
-
|
|
|
+
|
|
|
// 先过滤掉可能存在的"取消自动获取数据"(避免重复添加)
|
|
|
tableFormMenu.value = tableFormMenu.value.filter(item => item.key !== 'clearautomatic')
|
|
|
|
|
|
@@ -1222,7 +1238,7 @@ const tableFormRightTap = (
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
contextMenuRef.value?.showMenu(event, false) //展开菜单
|
|
|
}
|
|
|
const checkKeys = ref([])
|
|
|
@@ -1316,7 +1332,7 @@ const handleMenuSelect = async ({ key }) => {
|
|
|
//取消公式引用
|
|
|
handleGsClick(tableFormItemNode.value)
|
|
|
|
|
|
-
|
|
|
+
|
|
|
} else if (key === 'addGs') {
|
|
|
tableFormItemNode.value.status = 1
|
|
|
handleGsClick(tableFormItemNode.value)
|
|
|
@@ -2265,11 +2281,11 @@ const uploadFileClickSave = ()=>{
|
|
|
if (uploadFileForm.value.selectedOption) {
|
|
|
if (!uploadFileForm.value.pageSize) {
|
|
|
window.$message.error('请输入页码')
|
|
|
- return
|
|
|
+ return
|
|
|
}
|
|
|
} else if (uploadFileForm.value.selectedOption === null) {
|
|
|
window.$message.error('请选择导入方式')
|
|
|
- return
|
|
|
+ return
|
|
|
} else if (uploadFileForm.value.selectedOption === false) {
|
|
|
uploadFileForm.value.pageSize = ''
|
|
|
}
|
|
|
@@ -2603,21 +2619,21 @@ const clearSaveClick = async (type)=>{
|
|
|
type:type,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
// listDatas.value[index].isTableRender = false
|
|
|
-
|
|
|
+
|
|
|
// 重新获取表单信息(清除数据后的新数据)
|
|
|
await refs?.getTableFormInfo(pkeyId)
|
|
|
await nextTick()
|
|
|
-
|
|
|
+
|
|
|
// 重新启用表格渲染
|
|
|
listDatas.value[index].isTableRender = true
|
|
|
listDatas.value[index].isTableForm = true
|
|
|
-
|
|
|
+
|
|
|
// 获取重新加载后的表单数据
|
|
|
const itemFormData = refs?.getFormData()
|
|
|
-
|
|
|
+
|
|
|
// 主动调用保存接口 - 使用重新加载后的数据
|
|
|
isRemoveForSubTab.value = 1
|
|
|
await tableFormSaveClick(itemFormData)
|
|
|
@@ -2635,7 +2651,7 @@ const clearSaveClick = async (type)=>{
|
|
|
item.isTableRender = false
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (DragModalTableForm.value.length > 0) {
|
|
|
let draindex = arrIndex(
|
|
|
DragModalTableForm.value,
|
|
|
@@ -2663,7 +2679,7 @@ const clearSaveClick = async (type)=>{
|
|
|
|
|
|
}
|
|
|
//公式引用
|
|
|
-const handleGsClick = async (item) => {
|
|
|
+const handleGsClick = async (item) => {
|
|
|
const { error, code, msg } = await wbsApi.setFormulaReference({
|
|
|
key:item.KeyName,
|
|
|
initTableName:item.initTableName,
|
|
|
@@ -2676,21 +2692,21 @@ const handleGsClick = async (item) => {
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
const clearAutomatic = async ()=>{
|
|
|
const { KeyName, pkeyId } = tableFormItemNode.value
|
|
|
const refs = await getFormRef(pkeyId)
|
|
|
const itemFormData = refs?.getFormData()
|
|
|
-
|
|
|
+
|
|
|
|
|
|
const { error, code, msg, data } = await nodeBaseApi.clearAutomatic(
|
|
|
|
|
|
{
|
|
|
nodeId: treeId.value,
|
|
|
pkeyId: pkeyId,
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
paramName:KeyName,
|
|
|
},
|
|
|
)
|