Sfoglia il codice sorgente

feat: 调整所有弹窗操作后的回调

luoyali 1 anno fa
parent
commit
dedb0a85a2

+ 2 - 1
src/views/approve/components/addSignDialog.vue

@@ -75,7 +75,7 @@ const formRef = ref(null)
 const uploadLoading = ref(false)
 const userOptList = ref([])
 
-const $myEmit = defineEmits(['update:modelValue', 'confirm'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 // 获取用户
 const getUserList = async () => {
@@ -121,6 +121,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }
 

+ 1 - 1
src/views/approve/components/approvedContent.vue

@@ -83,7 +83,7 @@
 									<el-icon><Switch /></el-icon>
 									回退
 								</el-dropdown-item>
-								<el-dropdown-item>
+								<el-dropdown-item @click.native="openComment('addSignVisible')">
 									<el-icon><Plus /></el-icon>
 									加签
 								</el-dropdown-item>

+ 2 - 10
src/views/approve/components/consentOrRefuseDialog.vue

@@ -47,15 +47,6 @@ const props = defineProps({
 	currentType: {
 		type: String,
 		default: 'agree'
-	},
-	showOrderDesc: {
-		type: Boolean,
-		default: true
-	},
-	// 1-审核 2-复审 3-审核,复审 ,第一版默认审核
-	linkType: {
-		type: String,
-		default: '1'
 	}
 })
 const btnDisabled = ref(false)
@@ -66,7 +57,7 @@ const form = reactive({
 const formRef = ref(null)
 const uploadLoading = ref(false)
 
-const $myEmit = defineEmits(['update:modelValue'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 const submitForm = () => {
 	btnDisabled.value = true
@@ -90,6 +81,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }
 

+ 2 - 1
src/views/approve/components/deliverToReviewDialog.vue

@@ -74,7 +74,7 @@ const form = reactive({
 const formRef = ref(null)
 const uploadLoading = ref(false)
 const userOptList = ref([])
-const $myEmit = defineEmits(['update:modelValue', 'confirm'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 // 获取用户
 const getUserList = async () => {
@@ -120,6 +120,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }
 

+ 3 - 11
src/views/approve/components/loseSignDialog.vue

@@ -41,15 +41,6 @@ const props = defineProps({
 		type: Boolean,
 		default: false
 	},
-	showOrderDesc: {
-		type: Boolean,
-		default: true
-	},
-	// 1-审核 2-复审 3-审核,复审 ,第一版默认审核
-	linkType: {
-		type: String,
-		default: '1'
-	},
 	taskId: {
 		type: String,
 		default: undefined
@@ -86,7 +77,7 @@ const options = [
 	}
 ]
 
-const $myEmit = defineEmits(['update:modelValue', 'confirm'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 const submitForm = () => {
 	btnDisabled.value = true
@@ -95,7 +86,7 @@ const submitForm = () => {
 		.validate()
 		.then(valid => {
 			if (valid) {
-				emit('confirm', formData)
+				emit('successCb', formData)
 				btnDisabled.value = false
 			}
 		})
@@ -106,6 +97,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }
 

+ 2 - 10
src/views/approve/components/reviewDialog.vue

@@ -37,15 +37,6 @@ const props = defineProps({
 		type: Boolean,
 		default: false
 	},
-	showOrderDesc: {
-		type: Boolean,
-		default: true
-	},
-	// 1-审核 2-复审 3-审核,复审 ,第一版默认审核
-	linkType: {
-		type: String,
-		default: '1'
-	},
 	taskId: {
 		type: String,
 		default: undefined
@@ -59,7 +50,7 @@ const form = reactive({
 const formRef = ref(null)
 const uploadLoading = ref(false)
 
-const $myEmit = defineEmits(['update:modelValue'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 // 提交
 const submitForm = () => {
@@ -80,6 +71,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }
 

+ 2 - 11
src/views/approve/components/rollbackDialog.vue

@@ -41,15 +41,6 @@ const props = defineProps({
 		type: Boolean,
 		default: false
 	},
-	showOrderDesc: {
-		type: Boolean,
-		default: true
-	},
-	// 1-审核 2-复审 3-审核,复审 ,第一版默认审核
-	linkType: {
-		type: String,
-		default: '1'
-	},
 	taskId: {
 		type: String,
 		default: undefined
@@ -86,7 +77,7 @@ const options = [
 	}
 ]
 
-const $myEmit = defineEmits(['update:modelValue', 'confirm'])
+const $myEmit = defineEmits(['update:modelValue', 'successCb'])
 
 const submitForm = () => {
 	btnDisabled.value = true
@@ -95,7 +86,6 @@ const submitForm = () => {
 		.validate()
 		.then(valid => {
 			if (valid) {
-				emit('confirm', formData)
 				btnDisabled.value = false
 			}
 		})
@@ -106,6 +96,7 @@ const submitForm = () => {
 }
 
 const closeDialog = () => {
+	$myEmit('successCb')
 	$myEmit('update:modelValue', false)
 }