|
@@ -642,7 +642,7 @@ const setTableFormMenu = (info) => {
|
|
|
newArr.push({ label: '关联试验数据', key: 'test' })
|
|
|
newArr.push({ label: '关联试验文件', key: 'file' })
|
|
|
newArr.push({ label: '公式参数', key: 'formula' })
|
|
|
- // newArr.push({ label: '清除数据', key: 'clear' })
|
|
|
+ newArr.push({ label: '清除数据', key: 'clear' })
|
|
|
tableFormMenu.value = newArr
|
|
|
}
|
|
|
|
|
@@ -671,12 +671,25 @@ const handleMenuSelect = async ({ key }) => {
|
|
|
formulaModalLoading.value = false
|
|
|
formulaModal.value = true
|
|
|
} else if (key === 'clear') {
|
|
|
- const { pkeyId } = tableFormItemNode.value
|
|
|
+ const { pkeyId, index } = tableFormItemNode.value
|
|
|
const refs = await getFormRef(pkeyId)
|
|
|
delMessageV2(async (action, instance, done) => {
|
|
|
if (action === 'confirm') {
|
|
|
instance.confirmButtonLoading = true
|
|
|
- refs?.getTableFormInfo(1)
|
|
|
+ const { error, code, msg } = await wbsApi.rmTabdataInfo({
|
|
|
+ pkeyId: pkeyId,
|
|
|
+ })
|
|
|
+ if (!error && code === 200 ) {
|
|
|
+ window.$message.success(msg)
|
|
|
+ await refs?.getTableFormInfo(pkeyId)
|
|
|
+ nextTick(()=>{
|
|
|
+ listDatas.value[index].isTableForm = true
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
+ }
|
|
|
instance.confirmButtonLoading = false
|
|
|
done()
|
|
|
} else {
|