|
@@ -233,6 +233,11 @@ watch(() => [
|
|
|
props.NodeStatus
|
|
|
], ([datas,TabTypeKey,AlllistData,NodeStatus]) => {
|
|
|
listDatas.value = datas
|
|
|
+ listDatas.value.forEach((item)=>{
|
|
|
+ if(item.pKeyId===singleSaveid.value){
|
|
|
+ item.isCancopy=true
|
|
|
+ }
|
|
|
+ })
|
|
|
tabTypeKeyInfo.value=TabTypeKey
|
|
|
alllistDataval.value=AlllistData
|
|
|
NodeStatusval.value=NodeStatus
|
|
@@ -451,6 +456,7 @@ const getBussDataInfo = async (item, index) => {
|
|
|
contractId:contractId
|
|
|
}, false)
|
|
|
console.log(item,'item2222');
|
|
|
+ emit('changesingSaveId', pkeyIds)
|
|
|
if(item.oper){
|
|
|
console.log(11111111);
|
|
|
HTableForm.setPickerKey([item])
|
|
@@ -584,8 +590,12 @@ const toBackClick = () => {
|
|
|
}
|
|
|
//单个保存
|
|
|
const tableFormSaveLoading = ref(false)
|
|
|
+const singleSaveid=ref('')
|
|
|
const tableFormSaveClick = async (item,index) => {
|
|
|
if (isStatus.value !== '3') {
|
|
|
+ console.log(item,'单个保存');
|
|
|
+ singleSaveid.value=item.pKeyId
|
|
|
+ emit('changesingSaveId', item.pKeyId)
|
|
|
if(tabTypeKeyInfo.value==='2'&&baseData.value['detectionResult']===''){
|
|
|
window.$message?.warning('请选择是否合格')
|
|
|
}else{
|
|
@@ -685,24 +695,30 @@ const delClick = async ({pKeyId}) => {
|
|
|
const copyClickLoading=ref(false)
|
|
|
//复制本表
|
|
|
const copyClick = async (item,index) => {
|
|
|
+ console.log(item,'复制item');
|
|
|
const pkeyIds = getValString(item.pKeyId)
|
|
|
if (pkeyIds) {
|
|
|
if (isStatus.value !== '3') {
|
|
|
- if (!item.isRenderTableForm) {
|
|
|
- await copeBussTab(pkeyIds)
|
|
|
- } else if (!item.isTableForm) {
|
|
|
- window?.$message?.warning('暂无表单数据')
|
|
|
- } else if (item.isRenderTableForm) {
|
|
|
- // const res = await saveExcelBussData(item,index,false)
|
|
|
- // if (res) {
|
|
|
- // await copeBussTab(pkeyIds)
|
|
|
- // } else {
|
|
|
- // window?.$message?.warning('复制本表操作失败')
|
|
|
- // }
|
|
|
- await copeBussTab(pkeyIds)
|
|
|
- } else {
|
|
|
- window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pKeyId:${pkeyIds}`)
|
|
|
+ if(item.isRenderTableForm&&!item.isCancopy){
|
|
|
+ window.$message.warning('请先保存数据再复制本表')
|
|
|
+ }else{
|
|
|
+ if (!item.isRenderTableForm) {
|
|
|
+ await copeBussTab(pkeyIds)
|
|
|
+ } else if (!item.isTableForm) {
|
|
|
+ window?.$message?.warning('暂无表单数据')
|
|
|
+ } else if (item.isRenderTableForm) {
|
|
|
+ // const res = await saveExcelBussData(item,index,false)
|
|
|
+ // if (res) {
|
|
|
+ // await copeBussTab(pkeyIds)
|
|
|
+ // } else {
|
|
|
+ // window?.$message?.warning('复制本表操作失败')
|
|
|
+ // }
|
|
|
+ await copeBussTab(pkeyIds)
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pKeyId:${pkeyIds}`)
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
window?.$message?.warning('已上报的资料,不允许复制')
|
|
|
}
|
|
@@ -1216,7 +1232,7 @@ const specialNodeClick = async () => {
|
|
|
}
|
|
|
|
|
|
//事件
|
|
|
-const emit = defineEmits(['renew','offsetTop','updeviceUseIds','upcheckTableId','changesdate','chageorinData','changeIscanclick'])
|
|
|
+const emit = defineEmits(['renew','offsetTop','updeviceUseIds','upcheckTableId','changesdate','chageorinData','changeIscanclick','changesingSaveId'])
|
|
|
|
|
|
//被点击
|
|
|
const getOffsetTop = (key = '') => {
|