Selaa lähdekoodia

perf(process/detail):判断流程是否可以撤销

wangpx 1 vuosi sitten
vanhempi
commit
330dd1ec79
2 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6 4
      pages/process/detail/index.vue
  2. 0 2
      pages/process/index.vue

+ 6 - 4
pages/process/detail/index.vue

@@ -110,7 +110,7 @@
 			</uni-card>
 		</view>
 	</view>
-	<view v-else-if="processInfo.username == userStore.user.name">
+	<view v-else-if="isCancel">
 		<view class="remark_container">
 			<uni-card>
 				<uni-section titleFontSize="1.3rem" title="撤销备注" type="line"></uni-section>
@@ -144,13 +144,12 @@ const processInfo = reactive({
 	username: '',
 	tinsId: undefined
 })
-onLoad(({ username, insId, tinsId, insName, control }) => {
+onLoad(({ insId, tinsId, insName, control }) => {
 	// 获取传入的标题参数
 	const title = insName || '流程信息';
 	processInfo.insId = insId
 	processInfo.insName = insName
 	processInfo.control = control
-	processInfo.username = username
 	if (tinsId) {
 		processInfo['tinsId'] = tinsId
 	}
@@ -190,13 +189,13 @@ const formInfo = ref({
 	formInsId: ''
 })
 const fileList = ref([])
+const isCancel = ref(false)
 function initProcessInfo() {
 	if (processInfo.tinsId) {
 		getProcessFormInfoInFlow(userStore.user.useId, processInfo).then(({ returnParams }) => {
 			formElements.value = returnParams.formElements
 			formInfo.value = returnParams.formInfo[0]
 			repeatingForm.value = returnParams.repeatingForm
-			// fileList.value = returnParams.fileList
 			repeatingFormHasValue()
 		})
 	} else {
@@ -204,6 +203,9 @@ function initProcessInfo() {
 			formElements.value = returnParams.formElements
 			repeatingForm.value = returnParams.repeatingForm
 			fileList.value = returnParams.fileList
+			if(returnParams.isCancel == 1) {
+				isCancel.value = true
+			}
 			repeatingFormHasValue()
 		})
 	}

+ 0 - 2
pages/process/index.vue

@@ -154,8 +154,6 @@ function handleToProcessDetail({ username, insId, tinsId, insName, control }) {
 	let url = '/pages/process/detail/index?insId=' + insId + '&insName=' + insName + '&control=' + control
 	if (tinsId) {
 		url = url + '&tinsId=' + tinsId
-	} else if (current.value != 3) {
-		url = url + '&username=' + username
 	}
 	$tab.navigateTo(url)
 }