|
@@ -466,11 +466,15 @@ const props = defineProps({
|
|
type: [Object],
|
|
type: [Object],
|
|
default: () => ({}),
|
|
default: () => ({}),
|
|
},
|
|
},
|
|
|
|
+ newlistdata:{
|
|
|
|
+ type: [Array],
|
|
|
|
+ default: () => ([]),
|
|
|
|
+ },
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
//事件
|
|
//事件
|
|
-const emit = defineEmits(['renew', 'offsetTop'])
|
|
|
|
|
|
+const emit = defineEmits(['renew', 'offsetTop', 'getList'])
|
|
|
|
|
|
//初始变量
|
|
//初始变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
@@ -488,6 +492,7 @@ const listDatas = ref([])
|
|
const draw_type = ref(props.drawType)
|
|
const draw_type = ref(props.drawType)
|
|
const tree_AutoExpandKeys = ref(props.treeAutoExpandKeys)
|
|
const tree_AutoExpandKeys = ref(props.treeAutoExpandKeys)
|
|
const treenodeDataInfo = ref(props.treenodeDataInfo)
|
|
const treenodeDataInfo = ref(props.treenodeDataInfo)
|
|
|
|
+const newlistdata = ref(props.newlistdata)
|
|
|
|
|
|
|
|
|
|
//表单变量
|
|
//表单变量
|
|
@@ -549,7 +554,8 @@ watch(() => [
|
|
props.status,
|
|
props.status,
|
|
props.classify,
|
|
props.classify,
|
|
props.primaryKeyId,
|
|
props.primaryKeyId,
|
|
-], ([pid, cid, temp_id, tid, type, status, class_id, tree_id]) => {
|
|
|
|
|
|
+ props.newlistdata,
|
|
|
|
+], ([pid, cid, temp_id, tid, type, status, class_id, tree_id, Newlistdata]) => {
|
|
projectId.value = pid
|
|
projectId.value = pid
|
|
contract_id.value = cid
|
|
contract_id.value = cid
|
|
wbsTemp_id.value = temp_id
|
|
wbsTemp_id.value = temp_id
|
|
@@ -558,6 +564,7 @@ watch(() => [
|
|
isStatus.value = parseInt(status)
|
|
isStatus.value = parseInt(status)
|
|
classifys.value = class_id
|
|
classifys.value = class_id
|
|
treeId.value = tree_id
|
|
treeId.value = tree_id
|
|
|
|
+ newlistdata.value = Newlistdata
|
|
})
|
|
})
|
|
|
|
|
|
//渲染完成
|
|
//渲染完成
|
|
@@ -1163,13 +1170,25 @@ const copeBussTab = async (pkeyId) => {
|
|
copyClickLoading.value = false
|
|
copyClickLoading.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window?.$message?.success('操作成功')
|
|
window?.$message?.success('操作成功')
|
|
- renewData()
|
|
|
|
|
|
+ console.log(1111212)
|
|
|
|
+ // renewData()
|
|
|
|
+ getNewList()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//获取表单列表
|
|
|
|
+const getNewList = ()=>{
|
|
|
|
+ emit('getList')
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ let newObj = newlistdata.value
|
|
|
|
+ let oldObj = listDatas.value
|
|
|
|
+ const addedObject = newObj.find(obj => !oldObj.some(oldObj => oldObj.pkeyId === obj.pkeyId))
|
|
|
|
+ listDatas.value.push(addedObject)
|
|
|
|
+ }, 1000)
|
|
|
|
+}
|
|
//隐藏本表
|
|
//隐藏本表
|
|
const tableFormHideLoading = ref(false)
|
|
const tableFormHideLoading = ref(false)
|
|
-const hideClick = async ({ pkeyId, isBussShow }) => {
|
|
|
|
|
|
+const hideClick = async ({ pkeyId, isBussShow }, index) => {
|
|
if (pkeyId) {
|
|
if (pkeyId) {
|
|
if (isStatus.value !== 3) {
|
|
if (isStatus.value !== 3) {
|
|
tableFormHideLoading.value = true
|
|
tableFormHideLoading.value = true
|
|
@@ -1183,11 +1202,16 @@ const hideClick = async ({ pkeyId, isBussShow }) => {
|
|
tableFormHideLoading.value = false
|
|
tableFormHideLoading.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window?.$message?.success('操作成功')
|
|
window?.$message?.success('操作成功')
|
|
|
|
+ if (isBussShow === 2) {
|
|
|
|
+ listDatas.value[index]. isBussShow = 1
|
|
|
|
+ } else {
|
|
|
|
+ listDatas.value[index]. isBussShow = 2
|
|
|
|
+ }
|
|
if (bussShow === 2) {
|
|
if (bussShow === 2) {
|
|
//判断是否存在窗口,如果存在,就删除窗口
|
|
//判断是否存在窗口,如果存在,就删除窗口
|
|
delWindowRefs(pkeyId)
|
|
delWindowRefs(pkeyId)
|
|
}
|
|
}
|
|
- renewData()
|
|
|
|
|
|
+ // renewData()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
window?.$message?.warning('已上报的资料,不允许隐藏')
|
|
window?.$message?.warning('已上报的资料,不允许隐藏')
|