|
@@ -56,7 +56,7 @@ const props = defineProps({
|
|
|
},
|
|
|
selectId:{
|
|
|
type:String,
|
|
|
- default:'',
|
|
|
+ default:'',
|
|
|
},
|
|
|
isRemianOldCheck:{
|
|
|
type: Boolean,
|
|
@@ -70,7 +70,7 @@ const props = defineProps({
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
const emit = defineEmits([ 'close', 'finish'])
|
|
|
const useAppState = useAppStore()
|
|
@@ -118,10 +118,10 @@ watch(qualityMoadal, (val) => {
|
|
|
if (!isRemianOldCheck.value) {
|
|
|
oriCheckRows.value = []
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
//初始化设置拖动分割线
|
|
|
const setSplitRef = () => {
|
|
@@ -157,11 +157,11 @@ const treeLoadNode = async ({ node, item, level }, resolve) => {
|
|
|
parentId,
|
|
|
classifyType: classifyType.value,
|
|
|
tableOwner:classifyType.value,
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
treeLoading.value = false
|
|
|
resolve(getArrValue(data))
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
const tableColumn = [
|
|
|
{ key: 'partName', name: '分/子分项部位' },
|
|
@@ -178,7 +178,7 @@ const qulModalClose = ()=>{
|
|
|
|
|
|
//搜索表单
|
|
|
const searchForm = ref({
|
|
|
-
|
|
|
+
|
|
|
current: 1, size: 20, total: 0,
|
|
|
})
|
|
|
|
|
@@ -201,7 +201,7 @@ const getTableData = async () => {
|
|
|
contractIdRelation:curTree.value?.contractIdRelation || '',
|
|
|
classifyType: classifyType.value,
|
|
|
selectIds:selectId.value,
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
tableData.value = getArrValue(data['records'])
|
|
|
searchForm.value.total = data.total || 0
|
|
@@ -213,10 +213,10 @@ const getTableData = async () => {
|
|
|
defaultarr.push(item)
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
tabtoggleSelection(defaultarr)
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
const tabtoggleSelection = (rows) => {
|
|
|
if (rows) {
|
|
@@ -227,29 +227,28 @@ const tabtoggleSelection = (rows) => {
|
|
|
})
|
|
|
} else {
|
|
|
qualTable.value?.clearSelection()
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
const curTree = ref(null)
|
|
|
-const nodeElTreeClick = ({ node, data, keys })=>{
|
|
|
+const nodeElTreeClick = ({ data })=>{
|
|
|
curTree.value = data
|
|
|
+ searchForm.value.current = 1
|
|
|
getTableData()
|
|
|
-
|
|
|
}
|
|
|
//多选
|
|
|
const tableKeys = ref([])
|
|
|
const tableSelection = (rows) => {
|
|
|
tableKeys.value = rows.filter(obj => obj.appStatusName === '已审批')
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
const cancelcheck = ref([])
|
|
|
const tableSelect = (rows)=>{
|
|
|
const { selection, row } = rows
|
|
|
|
|
|
const { appStatusName } = row
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if (appStatusName !== '已审批') {
|
|
|
window.$message.warning('只能勾选已审批的数据')
|
|
|
qualTable.value?.toggleRowSelection(row, false)
|
|
@@ -285,7 +284,7 @@ const saveQualModal = ()=>{
|
|
|
const uniqueArray = alarr.reduce((acc, current) => {
|
|
|
// 检查当前对象的某个字段是否已存在于累积数组中
|
|
|
const x = acc.find(item => item.selectId === current.selectId)
|
|
|
-
|
|
|
+
|
|
|
// 如果不存在,则将其添加到累积数组中
|
|
|
if (!x) {
|
|
|
return acc.concat([current])
|
|
@@ -293,14 +292,14 @@ const saveQualModal = ()=>{
|
|
|
return acc
|
|
|
}
|
|
|
}, [])
|
|
|
-
|
|
|
+
|
|
|
alarr = uniqueArray
|
|
|
emit('finish', alarr, cancelcheck.value)
|
|
|
setStoreValue('checkRows', alarr)
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
-</style>
|
|
|
+</style>
|